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/"
|
files: "^connexion/"
|
||||||
additional_dependencies:
|
additional_dependencies:
|
||||||
- flake8-rst-docstrings==0.2.3
|
- flake8-rst-docstrings==0.2.3
|
||||||
|
|
||||||
- repo: https://github.com/PyCQA/isort
|
- repo: https://github.com/PyCQA/isort
|
||||||
rev: 5.10.1
|
rev: 5.10.1
|
||||||
hooks:
|
hooks:
|
||||||
@@ -24,3 +25,19 @@ repos:
|
|||||||
name: isort tests
|
name: isort tests
|
||||||
files: "^tests/"
|
files: "^tests/"
|
||||||
args: ["--project", "conftest", "--thirdparty", "connexion", "--check-only", "--diff"]
|
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
|
We welcome your ideas, issues, and pull requests. Just follow the
|
||||||
usual/standard GitHub practices.
|
usual/standard GitHub practices.
|
||||||
|
|
||||||
For easy development, please install connexion in editable mode with the :code:`tests` extra, and
|
For easy development, install connexion in editable mode with the :code:`tests` extra, and
|
||||||
install the pre-commit hooks.
|
install the pre-commit hooks to automatically run black formatting and static analysis checks.
|
||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
|
|||||||
8
tox.ini
8
tox.ini
@@ -1,7 +1,13 @@
|
|||||||
[flake8]
|
[flake8]
|
||||||
max-line-length=170
|
|
||||||
exclude=connexion/__init__.py
|
exclude=connexion/__init__.py
|
||||||
rst-roles=class
|
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]
|
[tox]
|
||||||
envlist =
|
envlist =
|
||||||
|
|||||||
Reference in New Issue
Block a user