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

Reduce false positives from Y052 #492

Merged
merged 11 commits into from
Jun 9, 2024
Merged

Reduce false positives from Y052 #492

merged 11 commits into from
Jun 9, 2024

Conversation

AlexWaygood
Copy link
Collaborator

No description provided.

This comment has been minimized.

@AlexWaygood
Copy link
Collaborator Author

(Was hoping this would mean we wouldn't have to have so many noqas in things like https://github.com/python/typeshed/pull/12078/files)

This comment has been minimized.

This comment has been minimized.

This comment has been minimized.

This comment has been minimized.

1 similar comment
Copy link

github-actions bot commented Jun 8, 2024

⚠ Flake8 diff showing the effect of this PR on typeshed:

> ./stubs/shapely/shapely/_geometry.pyi:165:23: NQA102 "# noqa: Y052" has no matching violations
> ./stubs/shapely/shapely/_geometry.pyi:166:20: NQA102 "# noqa: Y052" has no matching violations
> ./stubs/shapely/shapely/_geometry.pyi:167:25: NQA102 "# noqa: Y052" has no matching violations
> ./stubs/shapely/shapely/constructive.pyi:42:16: NQA102 "# noqa: Y052" has no matching violations
> ./stubs/shapely/shapely/constructive.pyi:43:15: NQA102 "# noqa: Y052" has no matching violations
> ./stubs/shapely/shapely/constructive.pyi:44:17: NQA102 "# noqa: Y052" has no matching violations
> ./stubs/shapely/shapely/constructive.pyi:47:16: NQA102 "# noqa: Y052" has no matching violations
> ./stubs/shapely/shapely/constructive.pyi:48:16: NQA102 "# noqa: Y052" has no matching violations
> ./stubs/shapely/shapely/constructive.pyi:49:16: NQA102 "# noqa: Y052" has no matching violations
> ./stubs/shapely/shapely/io.pyi:21:19: NQA102 "# noqa: Y052" has no matching violations
> ./stubs/shapely/shapely/io.pyi:22:14: NQA102 "# noqa: Y052" has no matching violations
> ./stubs/shapely/shapely/strtree.pyi:18:21: NQA102 "# noqa: Y052" has no matching violations
> ./stubs/shapely/shapely/strtree.pyi:19:17: NQA102 "# noqa: Y052" has no matching violations
> ./stubs/shapely/shapely/strtree.pyi:20:19: NQA102 "# noqa: Y052" has no matching violations
> ./stubs/shapely/shapely/strtree.pyi:21:19: NQA102 "# noqa: Y052" has no matching violations
> ./stubs/shapely/shapely/strtree.pyi:22:18: NQA102 "# noqa: Y052" has no matching violations
> ./stubs/shapely/shapely/strtree.pyi:23:18: NQA102 "# noqa: Y052" has no matching violations
> ./stubs/shapely/shapely/strtree.pyi:24:17: NQA102 "# noqa: Y052" has no matching violations
> ./stubs/shapely/shapely/strtree.pyi:25:21: NQA102 "# noqa: Y052" has no matching violations
> ./stubs/shapely/shapely/strtree.pyi:26:28: NQA102 "# noqa: Y052" has no matching violations

@AlexWaygood AlexWaygood marked this pull request as ready for review June 8, 2024 16:08
@AlexWaygood
Copy link
Collaborator Author

Ready for review. As well as the typeshed_primer diff above, this would also allow us to get rid of this per-file-ignore entry: https://github.com/python/typeshed/blob/0b1259ca0c582a7fa6c125bea1dbe22c44a44af4/.flake8#L11-L14.

It's not the most principled of approaches, but I think it's probably preferable to the amount of noqas we currently have to do for enum classes in typeshed. (Another alternative is just to deprecate Y052, of course.)

@AlexWaygood AlexWaygood merged commit 547433b into main Jun 9, 2024
21 checks passed
@AlexWaygood AlexWaygood deleted the AlexWaygood-patch-1 branch June 9, 2024 08:35
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.

None yet

2 participants