-
Notifications
You must be signed in to change notification settings - Fork 93
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
SONARPY-2362 Document no issue on S6542 when inheriting from annotated class member #2174
Conversation
87ba87b
to
4fd7710
Compare
4fd7710
to
478bd09
Compare
@@ -14,3 +14,7 @@ def imported_inherited_foo(self) -> Any: # Noncompliant | |||
class ImportedWithMetaClassInherited(ImportedParentWithMetaClass): | |||
def imported_inherited_foo(self) -> Any: # Noncompliant | |||
... | |||
|
|||
class MyChild(MyClassWithAnnotatedMember): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since now we have the more significant difference between locally defined and imported types for v1 type inference, it would be nice to show it in tests as well:
from typing import Callable
class LocalClassWithAnnotatedMember:
my_member: Callable[[Any],Any] # No issue on nested values of "Callable"
class LocalClassChild(LocalClassWithAnnotatedMember):
def my_member(self, param: Any) -> Any: # OK, defined in parent
...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, just one case, which I feel we need to document as well
Quality Gate passedIssues Measures |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
SONARPY-2362