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
lint the code with pylint #67
Conversation
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.
I like this, but the tests are failing right now.
|
||
def __init__(self, first_value=None): | ||
|
||
if first_value is not None: | ||
try: | ||
part_prefix, part_numeric, part_suffix = self.FIRST_NUMERIC.search( | ||
_, _, _ = self.FIRST_NUMERIC.search( |
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.
If all are unused, can you just remove the result? Wouldn't it be cleaner to do:
match = self.FIRST_NUMERIC.search(first_value)
if not match:
raise ValueError("The given first value {} does not contain any digit".format(first_value))
from bumpversion.exceptions import WorkingDirectoryIsDirtyException, MercurialDoesNotSupportSignedTagsException | ||
from bumpversion.exceptions import ( | ||
WorkingDirectoryIsDirtyException, | ||
MercurialDoesNotSupportSignedTagsException |
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.
Personally I'm a fan of trailing commas since it makes the diff smaller when you're adding another import.
Pylint config: see c4urself#67
This also adds a pylintrc for future PRs.
This was behaving differently between Python 2 and 3, causing test 'test_dirty_work_dir' to fail in one of both.
Not sure what's going on with AppVeyor, maybe someone with more windows experience can help out, the difference seems to be the version of tox... |
Pylint config: see c4urself#67
Pylint config: see c4urself#67
This also adds a pylintrc for future PRs.