Skip to content

Enforce FBT001/FBT002 and N802 ruff rules#135

Closed
kmarchais wants to merge 1 commit into
mainfrom
chore/2.0-breaking-ruff-fixes
Closed

Enforce FBT001/FBT002 and N802 ruff rules#135
kmarchais wants to merge 1 commit into
mainfrom
chore/2.0-breaking-ruff-fixes

Conversation

@kmarchais
Copy link
Copy Markdown
Member

@kmarchais kmarchais commented May 12, 2026

Summary

Locks in ruff enforcement of the boolean-trap rules (FBT001/FBT002) and lowercase-function-name rule (N802). N802 was already satisfied by #134; this PR adds it to extend-select so future violations fail CI. FBT requires two * insertions to mark booleans as kw-only.

Changes

  • pyproject.tomlextend-select = ["FBT001", "FBT002", "N802"]
  • microgen/shape/strut_lattice/abstract_lattice.py* before cell_size / strut_joints / density in AbstractLattice.__init__
  • microgen/shape/strut_lattice/custom_lattice.py* before strut-related kwargs in CustomLattice.__init__; stale # noqa: PLR0913 removed

@kmarchais kmarchais force-pushed the chore/2.0-breaking-ruff-fixes branch from 0e1c101 to 62cdf87 Compare May 12, 2026 11:27
@kmarchais kmarchais changed the title Breaking ruff fixes for 2.0: FBT + N802 Enforce FBT001/FBT002 and N802 ruff rules May 12, 2026
@kmarchais
Copy link
Copy Markdown
Member Author

Folding into #136 — the fluent constructors there eliminate the positional booleans by design, so the kw-only * markers in this PR become moot. #136 will pick up the FBT001/FBT002/N802 rules in its extend-select block.

@kmarchais kmarchais closed this May 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant