Skip to content

CI: fix linter #7261

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

Merged
merged 2 commits into from
Jul 7, 2020
Merged

CI: fix linter #7261

merged 2 commits into from
Jul 7, 2020

Conversation

stsewd
Copy link
Member

@stsewd stsewd commented Jul 6, 2020

Linter is failing for some dependency with isort somewhere.
The latest version of prospector already pins the compatible versions of its dependencies.

This requires readthedocs/common#65

Linter is failing for some dependency with isort somewhere.
The latest version of prospector already pins the compatible versions of
its dependencies.
@stsewd stsewd requested a review from a team July 6, 2020 18:50
Copy link
Member

@humitos humitos 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 to me. There are still two minor issues with the lint, but 👍

Copy link
Member

@ericholscher ericholscher left a comment

Choose a reason for hiding this comment

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

This seems fine, but I don't really like how opinionated the linter is with elif and else statements. I feel like we lose meaning with those changes.

else:
self._populate_from = populate_from

self._populate_from = populate_from
Copy link
Member

@ericholscher ericholscher Jul 7, 2020

Choose a reason for hiding this comment

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

I really don't like this linter setting -- I find the else statement much more explicit :(

Copy link
Member Author

Choose a reason for hiding this comment

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

I'm fine with both styles. We can disable that check if we want

return value
# SSH cloning and ``[email protected]:user/project.git``
elif self.re_git_user.search(value) or url.scheme in private_schemes:
if self.re_git_user.search(value) or url.scheme in private_schemes:
Copy link
Member

Choose a reason for hiding this comment

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

I don't particularly like this linter change either. It feels vaguely correct, but requires reading all of the if statements to know if they properly raise or return :/

@stsewd stsewd merged commit 78e6c08 into master Jul 7, 2020
@stsewd stsewd deleted the fix-linter branch July 7, 2020 15:26
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.

3 participants