-
Notifications
You must be signed in to change notification settings - Fork 65
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
Add SortedAttributesRule #149
Conversation
""", | ||
) | ||
] | ||
ONCALL_SHORTNAME = "ig_creation_backend" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not needed.
ONCALL_SHORTNAME = "ig_creation_backend" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice catches 👍 . I'm pushing a new version that solves all the comments.
return | ||
self.report( | ||
node, | ||
self.MESSAGE, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
self.MESSAGE
is used by default.
self.MESSAGE, |
""" | ||
) | ||
] | ||
MESSAGE: str = "It appears you are using the @sorted directive and the class variables are unsorted. See the lint autofix suggestion." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
MESSAGE: str = "It appears you are using the @sorted directive and the class variables are unsorted. See the lint autofix suggestion." | |
MESSAGE: str = "It appears you are using the @sorted-attributes directive and the class variables are unsorted. See the lint autofix suggestion." |
resolve 'future feature annotations is not defined' address comments
Summary
Support sorting class attributes alphabetically with autofix.
Test Plan
Unit test by running
tox -e py37
All tests passed!