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

Upgrade pylint #27279

Merged
merged 15 commits into from
Oct 7, 2019
Merged

Upgrade pylint #27279

merged 15 commits into from
Oct 7, 2019

Conversation

scop
Copy link
Member

@scop scop commented Oct 7, 2019

Description:

Upgrade pylint to 2.4.2 and astroid to 2.3.1, address raised issues.

https://pylint.readthedocs.io/en/latest/whatsnew/2.4.html
https://pylint.readthedocs.io/en/latest/whatsnew/changelog.html#what-s-new-in-pylint-2-4-1
https://pylint.readthedocs.io/en/latest/whatsnew/changelog.html#what-s-new-in-pylint-2-4-2

Bunch of false positive/bug workarounds needed, but some useful new issues caught too.

import-outside-toplevel disabled altogether for now, but I assume it would be ok to change those as well nowadays?

Checklist:

  • The code change is tested and works locally.
  • Local tests pass with tox. Your PR cannot be merged unless tests pass
  • There is no commented out code in this PR.
  • I have followed the development checklist

If user exposed functionality or configuration variables are added/changed:

If the code communicates with devices, web services, or third-party tools:

  • The manifest file has all fields filled out correctly. Update and include derived files by running python3 -m script.hassfest.
  • New or updated dependencies have been added to requirements_all.txt by running python3 -m script.gen_requirements_all.
  • Untested files have been added to .coveragerc.

If the code does not interact with devices:

  • Tests have been added to verify that the new code works.

Copy link
Member

@balloob balloob left a comment

Choose a reason for hiding this comment

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

Looks great!

Imports inside functions is indeed no longer necessary, so could be resolved (but would be a lot of work).

@frenck
Copy link
Member

frenck commented Oct 7, 2019

It would be great if we could resolve the imports since it would make an excellent guard.

Hacktoberfest issue?

@frenck
Copy link
Member

frenck commented Oct 7, 2019

I have created #27284 as a tracking issue. If you guys agree, I will mark it for Hacktoberfest & Help wanted.

@balloob
Copy link
Member

balloob commented Oct 7, 2019

That's fine. However, could we automate it ? Let me hack at it for 15m.

@balloob balloob merged commit 761d7f2 into home-assistant:dev Oct 7, 2019
@balloob
Copy link
Member

balloob commented Oct 7, 2019

26 minutes. Not bad: #27288

@scop scop deleted the upgrade-pylint branch October 7, 2019 16:46
@lock lock bot locked and limited conversation to collaborators Oct 8, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants