Skip to content
This repository was archived by the owner on Nov 3, 2023. It is now read-only.

Commit 5cbac26

Browse files
authored
Blacken the source code and sort imports (#507)
* Add black and isort to tox and reformat the code * Reformat comments and violations
1 parent d8f0931 commit 5cbac26

File tree

13 files changed

+1039
-470
lines changed

13 files changed

+1039
-470
lines changed

README.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,12 @@ pydocstyle - docstring style checker
1515
.. image:: https://pepy.tech/badge/pydocstyle
1616
:target: https://pepy.tech/project/pydocstyle
1717

18+
.. image:: https://img.shields.io/badge/code%20style-black-000000.svg
19+
:target: https://github.com/psf/black
20+
21+
.. image:: https://img.shields.io/badge/%20imports-isort-%231674b1?style=flat&labelColor=ef8336
22+
:target: https://pycqa.github.io/isort/
23+
1824
**pydocstyle** is a static analysis tool for checking compliance with Python
1925
docstring conventions.
2026

pyproject.toml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
[tool.black]
2+
line-length = 79
3+
target-version = ['py36']
4+
skip-string-normalization = true
5+
6+
[tool.isort]
7+
profile = "black"
8+
src_paths = ["src/pydocstyle"]
9+
line_length = 79

requirements/tests.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
11
pytest==3.0.2
22
pytest-pep8==1.0.6
33
mypy==0.782
4+
black==20.8b1
5+
isort==5.4.2

src/pydocstyle/__init__.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
1-
from .checker import check
2-
from .violations import Error, conventions
3-
from .utils import __version__
4-
51
# Temporary hotfix for flake8-docstrings
6-
from .checker import ConventionChecker
2+
from .checker import ConventionChecker, check
73
from .parser import AllError
4+
from .utils import __version__
5+
from .violations import Error, conventions

src/pydocstyle/__main__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212

1313
def main() -> None:
1414
from pydocstyle import cli
15+
1516
cli.main()
1617

1718

0 commit comments

Comments
 (0)