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

Don't transform dataclass ClassVars #914

Merged
merged 2 commits into from
Feb 28, 2021

Conversation

cdce8p
Copy link
Member

@cdce8p cdce8p commented Feb 27, 2021

Steps

  • For new features or bug fixes, add a ChangeLog entry describing what your PR does.
  • Write a good description on what the PR does.

Description

Modify brain_dataclass to not transform variables annotated with typing.ClassVar.
https://docs.python.org/3/library/dataclasses.html#class-variables

Type of Changes

Type
🐛 Bug fix
✨ New feature
🔨 Refactoring
📜 Docs

Related Issue

pylint-dev/pylint#4149 (comment)
pylint-dev/pylint#4154

@cdce8p cdce8p mentioned this pull request Feb 27, 2021
Copy link
Member

@Pierre-Sassoulas Pierre-Sassoulas left a comment

Choose a reason for hiding this comment

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

I think the test cases are on point but I don't know enough about astroid to be relevant to review the implementation. @hippo91 will know if there is a better way.

@cdce8p
Copy link
Member Author

cdce8p commented Feb 28, 2021

@Pierre-Sassoulas All tests passed. Ready for merge

@Pierre-Sassoulas Pierre-Sassoulas merged commit 5f2cfb8 into pylint-dev:master Feb 28, 2021
@cdce8p cdce8p deleted the fix-dataclass-classvar branch February 28, 2021 17:40
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