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

Allow adding attributes at the end of the list #1807

Merged
merged 2 commits into from Mar 23, 2021

Conversation

karsten-wagner
Copy link
Contributor

@karsten-wagner karsten-wagner commented Dec 29, 2020

This intents to fix #1806

Fixes #1806

@@ -119,7 +119,7 @@

added = False

inInit = False
inInit = True if line == " def _initAttributes(self):" else False
Copy link
Collaborator

Choose a reason for hiding this comment

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

This is awkward. How about?

inInit = line.endswith("def _initAttributes(self):")

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@s-t-e-v-e-n-k , sure - updated.
What a pitty, there are so view chances to use ternary operators...

Copy link
Collaborator

Choose a reason for hiding this comment

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

Haha! I am not against them, but only when absolutely required :-)

@s-t-e-v-e-n-k s-t-e-v-e-n-k merged commit 0245b75 into PyGithub:master Mar 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Adding new attribute fails in case new name is the last in the list
2 participants