Skip to main content

Use black with formate.

Project description

Use black with formate.

Tests

Linux Test Status Windows Test Status macOS Test Status Coverage

PyPI

PyPI - Package Version PyPI - Supported Python Versions PyPI - Supported Implementations PyPI - Wheel

Activity

GitHub last commit GitHub commits since tagged version Maintenance PyPI - Downloads

QA

CodeFactor Grade Flake8 Status mypy status

Other

License GitHub top language Requirements Status

Installation

formate-black can be installed from PyPI.

To install with pip:

$ python -m pip install formate-black

Hooks

formate-black provides a single hook for formate, which allows the black code formatter to be used.

black

Calls black, using the given keyword arguments as its configuration.

This hook only takes keyword arguments.

The max line length can be provided via the line_length keyword argument or in the config table as line_length.

The indent can also be set to tabs via the use_tabs keyword argument or in the config table as indent.

Example Configuration

[hooks]
reformat-generics = 40
collections-import-rewrite = 20
noqa-reformat = 60
ellipsis-reformat = 70

[hooks.black]
priority = 50

[hooks.black.kwargs]
string_normalization = false
magic_trailing_comma = false

[config]
indent = "\t"
line_length = 115

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

formate_black-0.3.0.tar.gz (4.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

formate_black-0.3.0-py3-none-any.whl (5.7 kB view details)

Uploaded Python 3

File details

Details for the file formate_black-0.3.0.tar.gz.

File metadata

  • Download URL: formate_black-0.3.0.tar.gz
  • Upload date:
  • Size: 4.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for formate_black-0.3.0.tar.gz
Algorithm Hash digest
SHA256 6020cd3643a3a9347b3e8e33ea92f3b3a499f9331a94a782639d4899ef124606
MD5 1df7e323de0e7f62fb70d457c7c3e5a3
BLAKE2b-256 a95f8e839601219ccae4c56e5026db9e7d825223a267ef08d02db0cf5217f98c

See more details on using hashes here.

File details

Details for the file formate_black-0.3.0-py3-none-any.whl.

File metadata

  • Download URL: formate_black-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 5.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for formate_black-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8ddb3ead869d45334da96892e4be6c383b8d78d3286eaafbee50e76cefe3fcd4
MD5 960a96e1a2194c8c863e927f28ea59eb
BLAKE2b-256 ac530129a67df6b85731784758d506dee6acc65c998b1fa88c6a7121c2912d3f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page