Skip to content

Enable Ruff flake8-annotations - #4749

Open
codefiles wants to merge 5 commits into
archlinux:masterfrom
codefiles:ruff-ann
Open

codefiles wants to merge 5 commits into
archlinux:masterfrom
codefiles:ruff-ann

Conversation

@codefiles

@codefiles codefiles commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

Use Any for missing types so ANN001, ANN002, and ANN003 can be enabled.

Reference:

https://docs.astral.sh/ruff/rules/#flake8-annotations-ann

@codefiles
codefiles requested a review from Torxed as a code owner September 1, 2026 22:24
@codefiles
codefiles force-pushed the ruff-ann branch 2 times, most recently from c7fbf36 to 1a5bfd6 Compare September 2, 2026 10:16
Comment thread docs/conf.py
Comment on lines +12 to +19
def process_docstring(
app: Sphinx,
what: str,
name: str,
obj: Any,
options: Any,
lines: list[str],
) -> None:

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@codefiles

Copy link
Copy Markdown
Contributor Author

This has overlap with mypy functionality. That is not a problem because Ruff is fast, not noticeably any slower with this enabled, and the error messages are more understandable.

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