Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable pydoclint via flake 8 #165

Merged
merged 10 commits into from
May 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .config/requirements-test.in
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
black
coverage[toml]
flake8
mypy
pip-tools
pre-commit
pydoclint
pydoclint[flake8]
pytest
pytest-xdist
ruff
Expand Down
11 changes: 11 additions & 0 deletions .flake8
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
[flake8]
allow-init-docstring = True
arg-type-hints-in-docstring = False
check-return-types = False
select = DOC
show-filenames-in-every-violation-message = True
skip-checking-short-docstrings = False
filename =
*/src/**/*.py
*/tests/**/*.py
style = google
11 changes: 6 additions & 5 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -70,12 +70,13 @@ repos:
- id: cspell
name: Spell check with cspell

- repo: https://github.com/jsh9/pydoclint
rev: 0.4.1
- repo: https://github.com/pycqa/flake8
rev: 7.0.0
hooks:
- id: pydoclint
args:
- "--config=pyproject.toml"
- id: flake8
name: flake8(pydoclint)
additional_dependencies:
- pydoclint[flake8]

- repo: https://github.com/pycqa/pylint.git
rev: v3.1.0
Expand Down
1 change: 1 addition & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"markis.code-coverage",
"ms-python.black-formatter",
"ms-python.debugpy",
"ms-python.flake8",
"ms-python.mypy-type-checker",
"ms-python.pylint",
"ms-python.python",
Expand Down
1 change: 1 addition & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
"editor.defaultFormatter": "ms-python.black-formatter",
"editor.formatOnSave": true
},
"flake8.importStrategy": "fromEnvironment",
"markiscodecoverage.searchCriteria": "coverage.lcov",
"mypy-type-checker.args": ["--config-file=${workspaceFolder}/pyproject.toml"],
"mypy-type-checker.importStrategy": "fromEnvironment",
Expand Down
10 changes: 1 addition & 9 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -60,14 +60,6 @@ concurrency = ["multiprocessing", "thread"]
files = ["src", "tests"]
strict = true

[tool.pydoclint]
allow-init-docstring = true
arg-type-hints-in-docstring = false
check-return-types = false
show-filenames-in-every-violation-message = true
skip-checking-short-docstrings = false
style = 'google'

[tool.pylint]

[tool.pylint.format]
Expand Down Expand Up @@ -337,7 +329,7 @@ lines-between-types = 1 # Separate import/from with 1 line
"_version.py" = ["SIM108"]

[tool.ruff.lint.pydocstyle]
convention = "pep257"
convention = "google"

[tool.setuptools.dynamic]
dependencies = {file = [".config/requirements.in"]}
Expand Down
2 changes: 2 additions & 0 deletions src/ansible_dev_environment/subcommands/installer.py
Original file line number Diff line number Diff line change
Expand Up @@ -253,6 +253,7 @@ def _find_files_using_git_ls_files(

Args:
local_repo_path: The collection local path.

Returns:
string with the command used to list files or None
string containing a list of files or nothing
Expand Down Expand Up @@ -284,6 +285,7 @@ def _find_files_using_ls(

Args:
local_repo_path: The collection local path.

Returns:
string with the command used to list files or None
string containing a list of files or nothing
Expand Down
1 change: 1 addition & 0 deletions src/ansible_dev_environment/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -338,6 +338,7 @@ def collections_meta(config: Config) -> dict[str, dict[str, Any]]:

Args:
config: The configuration object.

Returns:
A dictionary of metadata about installed collections.
"""
Expand Down
1 change: 1 addition & 0 deletions tests/unit/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ def output(tmp_path: Path) -> Output:

Args:
tmp_path: Temporary directory.

Returns:
Output: Output class object.
"""
Expand Down
Loading