Skip to content

B027 now ignores @[anything].overload to reduce false positives.#309

Merged
cooperlees merged 1 commit intoPyCQA:mainfrom
jakkdl:b027_more_overload_ignore
Nov 7, 2022
Merged

B027 now ignores @[anything].overload to reduce false positives.#309
cooperlees merged 1 commit intoPyCQA:mainfrom
jakkdl:b027_more_overload_ignore

Conversation

@jakkdl
Copy link
Copy Markdown
Contributor

@jakkdl jakkdl commented Nov 7, 2022

Fixes #304

it also ignores @a.b.c.d.overload in case somebody is writing a custom overload or importing typing in some very weird way - but that seems more likely than disaster striking because the check didn't trigger imo. Didn't bother writing a test for that though

Copy link
Copy Markdown
Collaborator

@cooperlees cooperlees left a comment

Choose a reason for hiding this comment

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

Agree it's better to be less nosy here. Thanks for adding the tests too!

@cooperlees cooperlees merged commit 356f0dc into PyCQA:main Nov 7, 2022
@jakkdl jakkdl mentioned this pull request Nov 14, 2022
@jakkdl jakkdl deleted the b027_more_overload_ignore branch January 9, 2023 12:52
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.

B027 false-positive on @overloaded methods

2 participants