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

lint the code with pylint #67

Merged
merged 2 commits into from Jun 8, 2019
Merged

lint the code with pylint #67

merged 2 commits into from Jun 8, 2019

Conversation

c4urself
Copy link
Owner

This also adds a pylintrc for future PRs.

Copy link
Collaborator

@ekohl ekohl left a 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(
Copy link
Collaborator

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
Copy link
Collaborator

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.

florisla added a commit to florisla/bump2version that referenced this pull request Apr 17, 2019
Pylint config: see c4urself#67
florisla added a commit to florisla/bump2version that referenced this pull request Apr 17, 2019
c4urself and others added 2 commits June 8, 2019 12:42
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.
@c4urself
Copy link
Owner Author

c4urself commented Jun 8, 2019

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...

@c4urself c4urself merged commit d7d6fb1 into master Jun 8, 2019
@c4urself c4urself deleted the fix/linting branch June 8, 2019 19:56
florisla added a commit to florisla/bump2version that referenced this pull request Jun 13, 2019
Pylint config: see c4urself#67
martinm82 pushed a commit to martinm82/bump2version that referenced this pull request Nov 17, 2020
Pylint config: see c4urself#67
@florisla florisla added this to the v1.0.0 milestone Jan 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants