We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Problem: When running the pre-commit hook in Windows PowerShell, get_config returns {} because prog='docsig.EXE' instead of 'docsig'.
get_config
{}
prog='docsig.EXE'
'docsig'
t.patch: moves disable from cli arg to config
diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index c526fa256..09d8499fd 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -81,8 +81,6 @@ repos: rev: v0.64.0 hooks: - id: docsig - args: - - "-dSIG101,SIG202,SIG203,SIG301,SIG302,SIG401,SIG402,SIG404,SIG501,SIG502,SIG503,SIG505" exclude: ^(tests|scripts) - repo: https://github.com/PyCQA/flake8 rev: 7.1.1 diff --git a/pyproject.toml b/pyproject.toml index 1b959f4e4..11fe224b8 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -127,6 +127,23 @@ Changelog = "https://doc.wikimedia.org/pywikibot/master/changelog.html" Tracker = "https://phabricator.wikimedia.org/tag/pywikibot/" +[tool.docsig] +disable = [ + "SIG101", + "SIG202", + "SIG203", + "SIG301", + "SIG302", + "SIG401", + "SIG402", + "SIG404", + "SIG501", + "SIG502", + "SIG503", + "SIG505", +] + + [tool.isort] py_version = 37 add_imports = ["from __future__ import annotations"]
pip install pre-commit git clone https://github.com/wikimedia/pywikibot cd pywikibot git apply t.patch pre-commit install pre-commit run docsig --files pywikibot\userinterfaces\buffer_interface.py
Actual result:
docsig...................................................................Failed - hook id: docsig - exit code: 1 pywikibot\userinterfaces\buffer_interface.py:41 in UI.init_handlers SIG203: parameters missing (params-missing) pywikibot\userinterfaces\buffer_interface.py:45 in UI.input SIG203: parameters missing (params-missing) SIG503: return missing from docstring (return-missing) pywikibot\userinterfaces\buffer_interface.py:50 in UI.input_choice SIG203: parameters missing (params-missing) SIG501: cannot determine whether a return statement should exist (confirm-return-needed) hint: annotate type to indicate whether return documentation needed pywikibot\userinterfaces\buffer_interface.py:56 in UI.input_list_choice SIG203: parameters missing (params-missing) SIG503: return missing from docstring (return-missing) pywikibot\userinterfaces\buffer_interface.py:62 in UI.output SIG203: parameters missing (params-missing) pywikibot\userinterfaces\buffer_interface.py:66 in UI.pop_output SIG501: cannot determine whether a return statement should exist (confirm-return-needed) hint: annotate type to indicate whether return documentation needed
Expected result: (all detectable issues are disabled in pyproject.tmol)
pyproject.tmol
docsig...................................................................Passed
Environment:
The text was updated successfully, but these errors were encountered:
fix: correctly load config for windows (#488)
508b015
Config correctly loads `docsig` instead of looking for `docsig.exe` Signed-off-by: Stephen Whitlock <stephen@jshwisolutions.com>
a9ac91e
Thanks for raising this one and letting me know @JJMC89
I've added the fix, this should work for you now
Any troubles, let me know! (available v0.64.1)
Sorry, something went wrong.
jshwi
Successfully merging a pull request may close this issue.
Problem: When running the pre-commit hook in Windows PowerShell,
get_config
returns{}
becauseprog='docsig.EXE'
instead of'docsig'
.t.patch:
moves disable from cli arg to config
Actual result:
Expected result:
(all detectable issues are disabled in
pyproject.tmol
)Environment:
The text was updated successfully, but these errors were encountered: