mirror of
https://github.com/LukeHagar/connexion.git
synced 2025-12-06 04:19:26 +00:00
Add black formatting
This commit is contained in:
@@ -9,6 +9,7 @@ repos:
|
||||
files: "^connexion/"
|
||||
additional_dependencies:
|
||||
- flake8-rst-docstrings==0.2.3
|
||||
|
||||
- repo: https://github.com/PyCQA/isort
|
||||
rev: 5.10.1
|
||||
hooks:
|
||||
@@ -24,3 +25,19 @@ repos:
|
||||
name: isort tests
|
||||
files: "^tests/"
|
||||
args: ["--project", "conftest", "--thirdparty", "connexion", "--check-only", "--diff"]
|
||||
|
||||
- repo: https://github.com/psf/black
|
||||
rev: 22.3.0
|
||||
hooks:
|
||||
- id: black
|
||||
name: black
|
||||
files: "^connexion/"
|
||||
args: ["connexion"]
|
||||
- id: black
|
||||
name: black examples
|
||||
files: "^examples/"
|
||||
args: ["examples"]
|
||||
- id: black
|
||||
name: black tests
|
||||
files: "^tests/"
|
||||
args: ["tests"]
|
||||
|
||||
@@ -583,8 +583,8 @@ Contributing to Connexion/TODOs
|
||||
We welcome your ideas, issues, and pull requests. Just follow the
|
||||
usual/standard GitHub practices.
|
||||
|
||||
For easy development, please install connexion in editable mode with the :code:`tests` extra, and
|
||||
install the pre-commit hooks.
|
||||
For easy development, install connexion in editable mode with the :code:`tests` extra, and
|
||||
install the pre-commit hooks to automatically run black formatting and static analysis checks.
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
|
||||
8
tox.ini
8
tox.ini
@@ -1,7 +1,13 @@
|
||||
[flake8]
|
||||
max-line-length=170
|
||||
exclude=connexion/__init__.py
|
||||
rst-roles=class
|
||||
# https://black.readthedocs.io/en/stable/guides/using_black_with_other_tools.html#flake8
|
||||
# Longest docstring in current code base
|
||||
max-line-length=137
|
||||
extend-ignore=E203
|
||||
|
||||
[isort]
|
||||
profile = black
|
||||
|
||||
[tox]
|
||||
envlist =
|
||||
|
||||
Reference in New Issue
Block a user