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.1.0.tar.gz (6.1 kB view details)

Uploaded Source

Built Distribution

formate_black-0.1.0-py3-none-any.whl (5.9 kB view details)

Uploaded Python 3

File details

Details for the file formate-black-0.1.0.tar.gz.

File metadata

  • Download URL: formate-black-0.1.0.tar.gz
  • Upload date:
  • Size: 6.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.5.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.0 CPython/3.9.5

File hashes

Hashes for formate-black-0.1.0.tar.gz
Algorithm Hash digest
SHA256 32a616a3e354480cd9bc92ba896733506442d55a8dc19b994cf5b32a821a0f5e
MD5 589be8dec47e71ea41caf65b17f0dd2b
BLAKE2b-256 a20413d9d5d4551c80531784ff81ff64726c69a1fca59346c78a78ec2b8f2a6a

See more details on using hashes here.

File details

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

File metadata

  • Download URL: formate_black-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 5.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.5.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.0 CPython/3.9.5

File hashes

Hashes for formate_black-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 cc0a9cecdc5043c7bdf556381cd93410757ab71fd3f6a627ef34a7d4b53456c3
MD5 3af0d0eb3ff4e5baf4e93d2441e821d8
BLAKE2b-256 cf143d27087aa5bd29e8d48d3669f624a49493b194adef01cb070946df87ba7b

See more details on using hashes here.

Supported by

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