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

Commit

Permalink
Blacken the source code and sort imports (#507)
Browse files Browse the repository at this point in the history
* Add black and isort to tox and reformat the code

* Reformat comments and violations
  • Loading branch information
sambhav authored Sep 5, 2020
1 parent d8f0931 commit 5cbac26
Show file tree
Hide file tree
Showing 13 changed files with 1,039 additions and 470 deletions.
6 changes: 6 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,12 @@ pydocstyle - docstring style checker
.. image:: https://pepy.tech/badge/pydocstyle
:target: https://pepy.tech/project/pydocstyle

.. image:: https://img.shields.io/badge/code%20style-black-000000.svg
:target: https://github.com/psf/black

.. image:: https://img.shields.io/badge/%20imports-isort-%231674b1?style=flat&labelColor=ef8336
:target: https://pycqa.github.io/isort/

**pydocstyle** is a static analysis tool for checking compliance with Python
docstring conventions.

Expand Down
9 changes: 9 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
[tool.black]
line-length = 79
target-version = ['py36']
skip-string-normalization = true

[tool.isort]
profile = "black"
src_paths = ["src/pydocstyle"]
line_length = 79
2 changes: 2 additions & 0 deletions requirements/tests.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
pytest==3.0.2
pytest-pep8==1.0.6
mypy==0.782
black==20.8b1
isort==5.4.2
8 changes: 3 additions & 5 deletions src/pydocstyle/__init__.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
from .checker import check
from .violations import Error, conventions
from .utils import __version__

# Temporary hotfix for flake8-docstrings
from .checker import ConventionChecker
from .checker import ConventionChecker, check
from .parser import AllError
from .utils import __version__
from .violations import Error, conventions
1 change: 1 addition & 0 deletions src/pydocstyle/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@

def main() -> None:
from pydocstyle import cli

cli.main()


Expand Down
Loading

0 comments on commit 5cbac26

Please sign in to comment.