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

SONARPY-2315 Add unit test case on S5890 when annotated type is imported and has field members only #2143

Merged
merged 2 commits into from
Nov 8, 2024

Conversation

maksim-grebeniuk-sonarsource
Copy link
Contributor

@maksim-grebeniuk-sonarsource maksim-grebeniuk-sonarsource commented Nov 8, 2024

@thomas-serre-sonarsource thomas-serre-sonarsource changed the title SONARPY-2315 Add unit test case on S5890 when annotated type is imported and has fields members only SONARPY-2315 Add unit test case on S5890 when annotated type is imported and has field members only Nov 8, 2024
Copy link
Contributor

@thomas-serre-sonarsource thomas-serre-sonarsource left a comment

Choose a reason for hiding this comment

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

LGTM! 👍
I left two minor comments. Also i left a comment in the JIRA tickets with a question for you 🙂

v : int = 10

class B:
def foo(self): ...
Copy link
Contributor

Choose a reason for hiding this comment

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

nit You can add an empty line here.

Comment on lines 1 to 5
class A:
v : int = 10

class B:
def foo(self): ...
Copy link
Contributor

Choose a reason for hiding this comment

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

minor To be more explicit about the intention of the test, I suggest to rename the classes

Suggested change
class A:
v : int = 10
class B:
def foo(self): ...
class ClassWithFieldOnly:
v : int = 10
class ClassWithMethodOnly:
def foo(self): ...

Copy link

sonarqube-next bot commented Nov 8, 2024

@maksim-grebeniuk-sonarsource maksim-grebeniuk-sonarsource merged commit d8b1171 into master Nov 8, 2024
10 checks passed
@maksim-grebeniuk-sonarsource maksim-grebeniuk-sonarsource deleted the SONARPY-2315 branch November 8, 2024 14:42
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.

2 participants