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

Consider removing ANN101 #7709

Closed
charliermarsh opened this issue Sep 29, 2023 · 8 comments · Fixed by #9680
Closed

Consider removing ANN101 #7709

charliermarsh opened this issue Sep 29, 2023 · 8 comments · Fixed by #9680
Labels
needs-decision Awaiting a decision from a maintainer
Milestone

Comments

@charliermarsh
Copy link
Member

Note to self, to fill in when I’m back at my laptop.

@charliermarsh charliermarsh added the needs-decision Awaiting a decision from a maintainer label Sep 29, 2023
@cosmojg
Copy link
Contributor

cosmojg commented Oct 6, 2023

Is ANN102 included in this discussion?

@NeilGirdhar
Copy link

NeilGirdhar commented Oct 20, 2023

Why remove ANN101 and ANN102?

But if anything, at least don't trigger on the first argument of an ordinary or class method (typically called "self" or "cls"). These have implicit types: typing.Self and type[typing.Self].

@charliermarsh
Copy link
Member Author

ANN101 and ANN102 only affect self and cls respectively, right?

@NeilGirdhar
Copy link

NeilGirdhar commented Oct 20, 2023

I thought that they check all of the arguments? "Checks that function arguments have type annotations."

@charliermarsh
Copy link
Member Author

It's broken into multiple rules, so ANN101 only checks self. ANN001 checks arbitrary arguments: https://docs.astral.sh/ruff/rules/missing-type-function-argument/.

@NeilGirdhar
Copy link

Ohhh, my mistake. I confused ANN001 with ANN101. Yes, please get rid of ANN101 and 102 😄

@charliermarsh charliermarsh mentioned this issue Jan 11, 2024
13 tasks
@KotlinIsland
Copy link
Contributor

Note to self, to fill in when I’m back at my laptop.

Instead of a Note to self, could we add an annotation to self?

@MichaReiser MichaReiser added this to the v0.2.0 milestone Jan 19, 2024
@zanieb
Copy link
Member

zanieb commented Jan 30, 2024

See #9689 which currently deprecate these rules

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-decision Awaiting a decision from a maintainer
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants