Skip to content

Commit

Permalink
Drop flake8 but keep using pydoclint
Browse files Browse the repository at this point in the history
  • Loading branch information
ssbarnea committed Jun 25, 2024
1 parent 3e1b77c commit b84f6c1
Show file tree
Hide file tree
Showing 4 changed files with 46 additions and 22 deletions.
28 changes: 28 additions & 0 deletions .config/pylint-baseline.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
src/ansible_dev_tools/arg_parser.py
DOC203: Function `parse` return type(s) in docstring not consistent with the return annotation. Return annotation types: ['argparse.Namespace']; docstring return section types: ['']
--------------------
src/ansible_dev_tools/cli.py
DOC301: Class `Cli`: __init__() should not have a docstring; please combine it with the docstring of the class
--------------------
src/ansible_dev_tools/resources/server/creator.py
DOC203: Method `CreatorFrontendV1._response_from_tar` return type(s) in docstring not consistent with the return annotation. Return annotation types: ['FileResponse']; docstring return section types: ['']
DOC203: Method `CreatorFrontendV1.playbook` return type(s) in docstring not consistent with the return annotation. Return annotation types: ['FileResponse | HttpResponse']; docstring return section types: ['']
DOC203: Method `CreatorFrontendV1.collection` return type(s) in docstring not consistent with the return annotation. Return annotation types: ['FileResponse | HttpResponse']; docstring return section types: ['']
DOC301: Class `CreatorOutput`: __init__() should not have a docstring; please combine it with the docstring of the class
DOC301: Class `CreatorBackend`: __init__() should not have a docstring; please combine it with the docstring of the class
DOC203: Method `CreatorBackend.collection` return type(s) in docstring not consistent with the return annotation. Return annotation types: ['Path']; docstring return section types: ['']
DOC203: Method `CreatorBackend.playbook` return type(s) in docstring not consistent with the return annotation. Return annotation types: ['Path']; docstring return section types: ['']
--------------------
src/ansible_dev_tools/server_utils.py
DOC203: Function `validate_request` return type(s) in docstring not consistent with the return annotation. Return annotation types: ['RequestUnmarshalResult | HttpResponse']; docstring return section types: ['']
DOC203: Function `validate_response` return type(s) in docstring not consistent with the return annotation. Return annotation types: ['FileResponse | HttpResponse']; docstring return section types: ['HttpResponse']
--------------------
src/ansible_dev_tools/subcommands/server.py
DOC301: Class `AdtServerApp`: __init__() should not have a docstring; please combine it with the docstring of the class
DOC203: Method `AdtServerApp.load` return type(s) in docstring not consistent with the return annotation. Return annotation types: ['WSGIHandler']; docstring return section types: ['']
DOC301: Class `Server`: __init__() should not have a docstring; please combine it with the docstring of the class
--------------------
src/ansible_dev_tools/utils.py
DOC601: Class `Colors`: Class docstring contains fewer class attributes than actual class attributes. (Please read https://jsh9.github.io/pydoclint/checking_class_attributes.html on how to correctly document class attributes.)
DOC603: Class `Colors`: Class docstring attributes are different from actual class attributes. (Or could be other formatting issues: https://jsh9.github.io/pydoclint/violation_codes.html#notes-on-doc103 ). Attributes in the class definition but not in the docstring: [BLACK: , BLINK: , BLUE: , BOLD: , BROWN: , CROSSED: , CYAN: , DARK_GRAY: , END: , FAINT: , GREEN: , ITALIC: , LIGHT_BLUE: , LIGHT_CYAN: , LIGHT_GRAY: , LIGHT_GREEN: , LIGHT_PURPLE: , LIGHT_RED: , LIGHT_WHITE: , NEGATIVE: , PURPLE: , RED: , UNDERLINE: , YELLOW: ]. (Please read https://jsh9.github.io/pydoclint/checking_class_attributes.html on how to correctly document class attributes.)
--------------------
11 changes: 0 additions & 11 deletions .flake8

This file was deleted.

23 changes: 12 additions & 11 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,13 @@ repos:
rev: v1.5.5
hooks:
- id: remove-tabs
exclude: >
(?x)^(
.config/pylint-baseline.txt
)$
- repo: https://github.com/pycontribs/mirrors-prettier
rev: v3.3.0
rev: v3.3.2
hooks:
- id: prettier
always_run: true
Expand All @@ -55,28 +59,25 @@ repos:
- id: tox-ini-fmt

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.4.7
rev: v0.4.10
hooks:
- id: ruff
args:
- --exit-non-zero-on-fix

- repo: https://github.com/streetsidesoftware/cspell-cli
rev: v8.8.2
rev: v8.9.0
hooks:
- id: cspell
name: Spell check with cspell

- repo: https://github.com/pycqa/flake8
rev: 7.0.0
- repo: https://github.com/jsh9/pydoclint
rev: 0.5.1
hooks:
- id: flake8
name: flake8(pydoclint)
additional_dependencies:
- pydoclint[flake8]
- id: pydoclint

- repo: https://github.com/pycqa/pylint.git
rev: v3.2.2
rev: v3.2.3
hooks:
- id: pylint
args:
Expand All @@ -90,7 +91,7 @@ repos:
- pyyaml

- repo: https://github.com/pre-commit/mirrors-mypy.git
rev: v1.10.0
rev: v1.10.1
hooks:
- id: mypy
additional_dependencies:
Expand Down
6 changes: 6 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,12 @@ strict = true
ignore_missing_imports = true
module = ["gunicorn.*", "openapi_core.*"]

[tool.pydoclint]
arg_type_hints_in_docstring = false
baseline = ".config/pylint-baseline.txt"
exclude = '\.git|\.tox|build'
style = 'google'

[tool.pylint]

[tool.pylint.format]
Expand Down

0 comments on commit b84f6c1

Please sign in to comment.