-
-
Notifications
You must be signed in to change notification settings - Fork 2
build(deps): add pydoclint as a dependency for flake8 hook #268
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
Conversation
update flake8 configuration add back the style testenv for tox
Reviewer's GuideIntroduces a dedicated style test environment in tox for unified formatting and documentation linting (including pydoclint), refines flake8/pydoclint settings in tox.ini, and updates the pre-commit configuration to integrate pydoclint under the flake8-incendium hook while removing its standalone hook. Class diagram for flake8 and pydoclint configuration changesclassDiagram
class ToxIni {
+[testenv:style] section
+deps: black, docformatter, flake8, isort, pydoclint, pydocstyle, sort-all, ssort, unimport
+commands: sort-all, ssort, black, unimport, isort, docformatter, flake8, pydocstyle
+[flake8] section
+[pydoclint] options: style, arg-type-hints-in-signature, arg-type-hints-in-docstring, check-return-types
}
class PreCommitConfig {
+flake8-incendium hook
+additional_dependencies: pydoclint
-pydoclint-flake8 hook (removed)
}
ToxIni <--> PreCommitConfig : shares config for style checks
Flow diagram for style testenv execution in toxflowchart TD
A[Start style testenv] --> B[Run sort-all on src/*.py]
B --> C[Run ssort on src]
C --> D[Run black on src]
D --> E[Run unimport on src]
E --> F[Run isort with tox.ini on src]
F --> G[Run docformatter on src]
G --> H[Run flake8 with DOC checks]
H --> I[Run pydocstyle on src/system]
I --> J[End]
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @cesarcoatl - I've reviewed your changes - here's some feedback:
- Verify that adding pydoclint as an additional dependency to the flake8-incendium hook actually invokes pydoclint checks, since the explicit pydoclint-flake8 hook was removed.
- Consider pinning pydoclint to a specific version in both tox and pre-commit configs to avoid unexpected failures when new releases introduce breaking changes.
- The inline sort-all + ssort invocation could be wrapped in a small helper script or Makefile target to simplify the style testenv commands and reduce inline Python logic.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- Verify that adding pydoclint as an additional dependency to the flake8-incendium hook actually invokes pydoclint checks, since the explicit pydoclint-flake8 hook was removed.
- Consider pinning pydoclint to a specific version in both tox and pre-commit configs to avoid unexpected failures when new releases introduce breaking changes.
- The inline sort-all + ssort invocation could be wrapped in a small helper script or Makefile target to simplify the style testenv commands and reduce inline Python logic.
## Individual Comments
### Comment 1
<location> `incendium/tox.ini:61` </location>
<code_context>
+ --recursive \
+ src
+ flake8 --select=DOC --config=tox.ini src
+ pydocstyle --config=tox.ini src{/}system
+
[type]
</code_context>
<issue_to_address>
The path 'src{/}system' may not match intended files.
Verify that 'src{/}system' resolves as intended across platforms; consider using 'src/system' if platform independence is not required.
</issue_to_address>Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
| --recursive \ | ||
| src | ||
| flake8 --select=DOC --config=tox.ini src | ||
| pydocstyle --config=tox.ini src{/}system |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
issue: The path 'src{/}system' may not match intended files.
Verify that 'src{/}system' resolves as intended across platforms; consider using 'src/system' if platform independence is not required.
update flake8 configuration
add back the style testenv for tox
Summary by Sourcery
Introduce a dedicated style test environment, integrate pydoclint into the Flake8 pipeline, and refine pre-commit settings for auto-fixing and commit messaging.
New Features:
Enhancements:
CI: