Skip to content

allow 'mcs' for metaclass classmethod first arg #61

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
Mar 26, 2019
Merged

allow 'mcs' for metaclass classmethod first arg #61

merged 1 commit into from
Mar 26, 2019

Conversation

davidism
Copy link
Contributor

@davidism davidism commented Mar 6, 2019

PyCharm's inspector wants the first arg of metaclass class methods to be called "mcs", it will complain if it's called "metacls" or any of the names Bugbear currently allows. I'd like to be able to satisfy both PyCharm and Bugbear. Since there dosen't appear to be a source of truth for this list of allowed names, I felt it was OK to add this one.

@davidism
Copy link
Contributor Author

davidism commented Mar 7, 2019

Turns out PyCharm's inspection allows choosing between "mcs" and "metacls", although it's not particularly discoverable.

@cooperlees cooperlees requested a review from ambv March 8, 2019 06:05
Copy link
Collaborator

@cooperlees cooperlees left a comment

Choose a reason for hiding this comment

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

I see no problem supporting PyCharm's default, other than just hope someone does not use mcs as a variable and not mean it (but that could happen with typ I guess too).

@cooperlees
Copy link
Collaborator

(I'll let this sit for a day or two incase anyone else has issues with this, if not, I'll merge and release to PyPI for you)

@cooperlees cooperlees merged commit 29bc9b9 into PyCQA:master Mar 26, 2019
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