Skip to content

Convert type comments to inline annotations - #1012

Merged
dhalperi merged 1 commit into
batfish:masterfrom
progwriter:refactor/inline-type-annotations
Nov 17, 2026
Merged

dhalperi merged 1 commit into
batfish:masterfrom
progwriter:refactor/inline-type-annotations

Conversation

@progwriter

Copy link
Copy Markdown
Contributor

Replace the remaining PEP 484 # type: comments with inline function and variable annotations so mypy and tooling treat them like the rest of the code. Add from __future__ import annotations where converted annotations reference classes defined later in the module.

@batfish-bot

Copy link
Copy Markdown

This change is Reviewable

@dhalperi
dhalperi enabled auto-merge (squash) November 17, 2026 04:44

@dhalperi dhalperi left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dhalperi reviewed 16 files and all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on progwriter).

@dhalperi

dhalperi commented Nov 17, 2026 •

Copy link
Copy Markdown
Member

Formatter is mad

Replace the remaining PEP 484 `# type:` comments with inline function
and variable annotations so mypy and tooling treat them like the rest of
the code. Add `from __future__ import annotations` where converted
annotations reference classes defined later in the module.

The conversion was done with an AST-based script, followed by
`ruff format` and `ruff check --fix`.
@progwriter
progwriter force-pushed the refactor/inline-type-annotations branch from 448953a to c66b8bf Compare November 17, 2026 05:38

@dhalperi dhalperi left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dhalperi reviewed 1 file and all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on progwriter).

@dhalperi
dhalperi merged commit 4875dfe into batfish:master Nov 17, 2026
18 checks passed
@progwriter
progwriter deleted the refactor/inline-type-annotations branch November 19, 2026 03:22
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.

3 participants