ruff
[`ruff`] Add `non-empty-init-module` (`RUF067`)
#22143
Merged

[`ruff`] Add `non-empty-init-module` (`RUF067`) #22143

ntBre merged 23 commits into main from brent/eim
ntBre
ntBre ntBre added rule
ntBre ntBre added preview
astral-sh-bot
ntBre
ntBre commented on 2025-12-22
ntBre ntBre marked this pull request as ready for review 334 days ago
ntBre ntBre requested a review from MichaReiser MichaReiser 334 days ago
ntBre
ntBre
ntBre [`ruff`] Add `non-empty-init-module` (`RUF070`)
e99f4f9a
ntBre add strict option
378fea44
ntBre update other snapshots
d9669630
ntBre fix docs formatting
e8583d4b
ntBre cache checker.path.ends_with("__init__.py") checks
9434c074
ntBre allow __getattr__
2ae6b5a0
ntBre factor out is_assignment_to, allow __path__ assignment
e701272c
ntBre fix top-level statement check
7a4c2c95
ntBre allow type_checking blocks, tidy up a bit
99559ccf
ntBre allow assignment to __version__ and __dir__ functions
e42f5ef0
ntBre ntBre force pushed from 8b38a83a to e42f5ef0 333 days ago
MichaReiser MichaReiser requested a review from amyreese amyreese 331 days ago
MichaReiser
MichaReiser
MichaReiser approved these changes on 2025-12-26
ntBre Update crates/ruff_linter/src/rules/ruff/rules/non_empty_init_module.rs
78f538d7
ntBre use SemanticModel::at_top_level
23803304
ntBre factor out Assignment type, be more strict on extend_path
437e1137
ntBre rewrap and expand docs slightly
9a6c7641
ntBre a few more tests for __path__ changes
de3d0100
ntBre
ntBre allow __author__
449b1b42
ntBre revert attribute docstring exception
16fc443e
ntBre expand the diagnostic a bit, branch on strictness
63bb56dc
ntBre sync okay.py
d70ba435
ntBre recode to RUF067
eb750ac1
ntBre ntBre changed the title [`ruff`] Add `non-empty-init-module` (`RUF070`) [`ruff`] Add `non-empty-init-module` (`RUF067`) 327 days ago
ntBre restore attribute docstring exception, with a comment
353eec26
ntBre Merge branch 'main' into brent/eim
d27406e1
dscorbett
ntBre
ntBre improve rule documentation
1755a1fd
ntBre ntBre merged c483b59d into main 326 days ago
ntBre ntBre deleted the brent/eim branch 326 days ago
simon-liebehenschel

Login to write a write a comment.

Login via GitHub

Reviewers
Assignees
No one assigned
Labels
Milestone