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 emit B009/B010 for keywords #117

Merged
merged 1 commit into from Feb 1, 2020
Merged

Don't emit B009/B010 for keywords #117

merged 1 commit into from Feb 1, 2020

Conversation

Zac-HD
Copy link
Member

@Zac-HD Zac-HD commented Feb 1, 2020

I wrote an argparse CLI with option named except - the code works fine with getattr(ns, "except"), but ns.except is a SyntaxError. So this patch makes the linter keyword-aware 😄

because using normal attribute access would be a SyntaxError.
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.

Makes sense, thanks! TIL ‘iskeyword’

@cooperlees cooperlees merged commit 891fc92 into PyCQA:master Feb 1, 2020
@Zac-HD Zac-HD deleted the getattr-keywords branch February 1, 2020 04:01
@Zac-HD
Copy link
Member Author

Zac-HD commented Feb 1, 2020

🎉

New personal record: noticed problem to merged PR (on not-my-project) in less than 30 minutes!

@cooperlees
Copy link
Collaborator

Pushed by a GitHub action to PyPI - https://github.com/PyCQA/flake8-bugbear/runs/420479491

Now if I could only automate generating README.rst changes + version change.

Even tho I'm in AU sweating I went with US date ...

@Zac-HD
Copy link
Member Author

Zac-HD commented Feb 1, 2020

Hey, Hypothesis automated those too - it's just a Python script away 😉

And commiserations, it's awfully hot here in Canberra 🔥

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