Skip to content

Fix class-const naming style #4279

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

Merged
merged 1 commit into from
Apr 1, 2021
Merged

Fix class-const naming style #4279

merged 1 commit into from
Apr 1, 2021

Conversation

cdce8p
Copy link
Member

@cdce8p cdce8p commented Apr 1, 2021

Steps

  • Add yourself to CONTRIBUTORS if you are a new contributor.
  • Add a ChangeLog entry describing what your PR does.
  • If it's a new feature or an important bug fix, add a What's New entry in doc/whatsnew/<current release.rst>.
  • Write a good description on what the PR does.

Description

typing.ClassVar should not be identified as a class constant for the naming style class-const. Instead typing.Final should be.

This should probably be included in 2.7.5

--
typing.Final could probably be used to identify module constants as well, but that should be another MR.

Type of Changes

Type
🐛 Bug fix

Related Issue

Closes #4277

@coveralls
Copy link

Coverage Status

Coverage remained the same at 91.456% when pulling aa91498 on cdce8p:fix-class-const into 8cab76f on PyCQA:master.

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.

👍

@Pierre-Sassoulas Pierre-Sassoulas added False Positive 🦟 A message is emitted but nothing is wrong with the code Regression labels Apr 1, 2021
@Pierre-Sassoulas Pierre-Sassoulas added this to the 2.7.5 milestone Apr 1, 2021
@Pierre-Sassoulas Pierre-Sassoulas merged commit 44a3aa2 into pylint-dev:master Apr 1, 2021
@cdce8p cdce8p deleted the fix-class-const branch April 1, 2021 12:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
False Positive 🦟 A message is emitted but nothing is wrong with the code Regression
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2.7.4 expects any ClassVar to be a costant, results in invalid-name
3 participants