Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable Ruff flake8-todos (TD) #13748

Merged
merged 3 commits into from
Apr 3, 2025

Conversation

Avasam
Copy link
Collaborator

@Avasam Avasam commented Mar 31, 2025

pyproject.toml Outdated
@@ -132,6 +133,8 @@ extend-safe-fixes = [
"UP036", # Remove unnecessary `sys.version_info` blocks
]
ignore = [
# TODO: Link all in-code TODOs to existing issues
"TD003", # Missing issue link for this TODO
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I actually like missing-todo-link (TD003) as it ensures there's a relevant open issue (doesn't have to be on typeshed's repo) to track the required actions, offer a space for discussion, increase visibility for possible contributors, etc.

And when the issue is closed, it's easier to spot which parts of the code was affected.

However, there's currently 87 unlinked TODO in typeshed according to this rule.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Not a fan of TD003 for our purposes. This would just spam our issues with small changes that not very critical. Not every instance of "dict[str, Any] # TODO: This could be a TypedDict" needs an issue, and I don't think group issues are very useful for this either.

@Avasam
Copy link
Collaborator Author

Avasam commented Mar 31, 2025

The only manual changes needed were for missing-todo-colon (TD004)

Read #13748 (comment) for missing-todo-link (TD003)

This comment has been minimized.

This comment has been minimized.

Copy link
Contributor

github-actions bot commented Apr 3, 2025

According to mypy_primer, this change has no effect on the checked open source code. 🤖🎉

@srittau srittau merged commit 4b253d2 into python:main Apr 3, 2025
63 checks passed
@Avasam Avasam deleted the Enable-Ruff-flake8-todos-(TD) branch April 3, 2025 05:56
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.

2 participants