Skip to content

chore: doc/style cleanup batch#34

Draft
hozblok wants to merge 1 commit into
masterfrom
chore/doc-style-cleanup-batch
Draft

chore: doc/style cleanup batch#34
hozblok wants to merge 1 commit into
masterfrom
chore/doc-style-cleanup-batch

Conversation

@hozblok
Copy link
Copy Markdown
Owner

@hozblok hozblok commented May 11, 2026

Combines three small cleanup items into one PR per the per-PR plan. None changes behaviour for normal callers.

Item #20 (Solver.init useless-super-delegation) is intentionally deferred from this batch. PR fix/19-enforce-max-precision (#31) adds validation to that method, making it non-trivial; removing the override here would conflict with #19. Once #19 lands the pylint suppression can be dropped in a follow-up without further change.

Full pytest suite 316/316. AST checks confirm: main is defined and there are no surviving top-level Call expressions; no raise Exception( remains; formula.__all__ matches the expected list; the updated module is now importable without side effects.

…ons)

Combines three small cleanup items into one PR per the per-PR plan.
None changes behaviour for normal callers.

- src/formula/__init__.py: add `__all__ = ["FmtFlags", "Formula",
  "Solver", "Number", "MAX_PRECISION"]`. Pins the public API surface
  for `from formula import *` so accidental imports from submodules
  don't escape into the package namespace. (Doc item #18.)

- boost_headers/update_command.py: wrap the top-level script body in
  `def main()` and gate the call with `if __name__ == "__main__":`.
  Lets IDEs, test discovery, and the zip-slip-guard tests (item #11
  follow-up) import the module without triggering the argparse +
  download + rmtree flow. (Doc item #22.)

- boost_headers/update_command.py: replace bare `Exception` raises
  with specific types — `ValueError` for bad input, `RuntimeError`
  for unexpected runtime state — so callers can catch by intent and
  pylint's `broad-exception-raised` stops firing. (Doc item #23.)

Item #20 (Solver.__init__ useless-super-delegation) is intentionally
deferred: PR fix/19-enforce-max-precision adds validation to that
method, making it non-trivial. Removing the override here would
conflict with #19 and remove the validation. Once #19 lands, the
pylint suppression there can be dropped without further change.

See ai/improvements_2026-05-09.md items #18, #22, #23 (and notes
about #20).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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