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

Do not emit Y053 for the argument to @deprecated() #444

Merged
merged 2 commits into from
Nov 8, 2023

Conversation

JelleZijlstra
Copy link
Collaborator

Fixes #443

Copy link

github-actions bot commented Nov 8, 2023

This change has no effect on typeshed. 🤖🎉

@@ -308,6 +308,9 @@ def _is_object(node: ast.AST | None, name: str, *, from_: Container[str]) -> boo
_is_BaseException = partial(_is_object, name="BaseException", from_={"builtins"})
_is_TypeAlias = partial(_is_object, name="TypeAlias", from_=_TYPING_MODULES)
_is_NamedTuple = partial(_is_object, name="NamedTuple", from_=_TYPING_MODULES)
_is_deprecated = partial(
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This name is a little confusing. I considered _is_at_deprecated or _is_deprecated_decorator, but not sure that's much better. Note that we already have _is_final and _is_unused which have similar issues.

@srittau srittau merged commit c7d988e into PyCQA:main Nov 8, 2023
20 checks passed
@JelleZijlstra JelleZijlstra deleted the y053 branch November 8, 2023 15:13
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.

Y053 should allow long strings as argument to @deprecated
2 participants