Check if dunder variables are defined *after* imports
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 5.2k
- Forks
- 754
- PR merge metrics
- No merged PRs in 30d
Description
PEP 8 mandates that dunder variables be specified after docstring and __future__ imports but before other imports (or other code). With #613, the old check was relaxed not to complain in the case that PEP 8 endorses, but pycodestyle should additionally complain if this is exactly not the case.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in pycodestyle’s single Python file by locating the existing dunder-variable/import check changed by #613. Review how the current check handles module-level dunder names, then verify behavior against the PEP 8 ordering described here. Done means the checker reports dunder variables placed after ordinary imports or other code while preserving the endorsed ordering.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100