Skip to content

linting. #2048

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

Closed
wants to merge 4 commits into from
Closed

linting. #2048

wants to merge 4 commits into from

Conversation

bukzor
Copy link

@bukzor bukzor commented Sep 18, 2014

pip.index is now pylint clean given a couple #FIXME:pylint:disable comments.
If i'm successful in my plans, my next few refactors should fix those.

@@ -827,30 +828,24 @@ def get_page(cls, link, req, skip_archives=True, session=None):
)
except requests.Timeout:
cls._handle_fail(req, link, "timed out", url)
except SSLError as exc:
Copy link
Author

Choose a reason for hiding this comment

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

This was a weird one. pylint pointed out that SSLError is a descendant class of ConnectionError, above, so this case can never be hit.

Copy link
Member

Choose a reason for hiding this comment

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

so the SSLError could go before ConnectionError but I'm not sure it's worth it to have a special case for SSL

Copy link
Author

Choose a reason for hiding this comment

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

If I'm preserving status-quo behavior, this is the right refactor.

Copy link
Contributor

Choose a reason for hiding this comment

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

Could file a seperate bug if this erroneous behaviour.

@bukzor bukzor force-pushed the buck-lint branch 2 times, most recently from 1b664cc to e26337e Compare September 18, 2014 18:13
req, link, reason, url,
level=2,
meth=logger.info,
)
else:
return inst

@staticmethod
def _handle_fail(req, link, reason, url, level=1, meth=None):
Copy link
Member

Choose a reason for hiding this comment

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

looks like url and level are useless here :o

@bukzor bukzor force-pushed the buck-lint branch 3 times, most recently from 78019a8 to 14d421d Compare September 24, 2014 01:23
@bukzor
Copy link
Author

bukzor commented Sep 24, 2014

This is good to go imo.

I realize that the consensus seems to be against pylint, but this patch does improve the quality constraints provided by CI, and provides a path to incrementally improve things.

@dstufft
Copy link
Member

dstufft commented Oct 4, 2014

So I started to poke at pylint, and it chokes on from distutils.util import strtobool.

@bukzor
Copy link
Author

bukzor commented Oct 4, 2014

I've updated the branch to show how i'd make pip.baseparser pylint-clean.
I do believe the fact that you can still get no-such-name and import-error from a module that's been configured to be ignored is a bug, and I'm trying to re-open the ticket found here: https://bitbucket.org/logilab/pylint/issue/223/ignored-modules-should-turn-no-name-in

@dstufft
Copy link
Member

dstufft commented Dec 11, 2014

I'm going to close this for now. If at some point the distutils import error gets fixed we can revisit using pylint.

@dstufft dstufft closed this Dec 11, 2014
@lock lock bot added the auto-locked Outdated issues that have been locked by automation label Jun 4, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Jun 4, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
auto-locked Outdated issues that have been locked by automation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants