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 to 2.2.2 #18750

Merged
merged 7 commits into from Dec 6, 2018

Conversation

Projects
None yet
5 participants
@scop
Copy link
Contributor

scop commented Nov 27, 2018

Description:

Upgrade to pylint 2.2.1, address new flagged issues.

http://pylint.pycqa.org/en/latest/whatsnew/changelog.html#what-s-new-in-pylint-2-2

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.

@scop scop requested review from bachya , cdce8p , Danielhiversen , fabaff , Kane610 and home-assistant/core as code owners Nov 27, 2018

@wafflebot wafflebot bot assigned scop Nov 27, 2018

@wafflebot wafflebot bot added the in progress label Nov 27, 2018

@@ -181,7 +181,6 @@ def __init__(self, hass, driver, name):

def setup_message(self):
"""Prevent print of pyhap setup message to terminal."""
pass

This comment has been minimized.

@cdce8p

cdce8p Nov 27, 2018

Member

IMO we should leave pass as it is. It might not be necessary, but it certainly improves readability.

This comment has been minimized.

@bachya

bachya Nov 27, 2018

Contributor

I agree. Seeing bare lines after a : gives me the willies.

This comment has been minimized.

@balloob

balloob Nov 27, 2018

Member

I agree

This comment has been minimized.

@scop

scop Nov 30, 2018

Contributor

FWIW I do not agree. But anyway I don't think there's a clean way to omit just these particular unnecessary passes, it would have to be done to all of them. And I think doing that would probably make things worse also in eyes of some people who would like to keep just the unnecessary passes that would have been removed in this PR. I certainly think that would make things worse overall. So I'm afraid we're a bit stuck with the upgrade here, then.

This comment has been minimized.

@bachya

bachya Nov 30, 2018

Contributor

You can still look at upgrading – just disable unnecessary-pass in pylintrc.

This comment has been minimized.

@balloob

balloob Dec 2, 2018

Member

I think that just disabling unnecessary-pass is fine. We might get some extra pass in places it really shouldn't be, but I think that's fine.

This comment has been minimized.

@scop

scop Dec 3, 2018

Contributor

Pylint has a lot of opinionate cleanup-like options, it does much more than helps catch common mistakes. Many (most?) of those are enabled for HA, even though what they do have only cosmetic/aesthetic value. Opinions vary whether those are liked or are a good thing, and we've now hit one here where they vary.

As said, I don't personally think that a global unnecessary-pass disable would be a good thing to do, so it wouldn't make sense for me to do that. Others seem to have different opinions on the matter, so I suggest someone first does that along with their reasoning in pylintrc in a separate PR, and afterwards I'll rebase this PR, keeping only the uncontroversial changes. Will take a look at upgrading to 2.2.2 meanwhile.

This comment has been minimized.

@cdce8p

This comment has been minimized.

@balloob

balloob Dec 4, 2018

Member

I wish PyLint was a bit more configurable. A config option for unnecessary-pass to not count doc strings as statements when determining if a pass is needed would have helped here.

This comment has been minimized.

@scop

scop Dec 5, 2018

Contributor

Yeah, but then again I don't think there's much to blame them for here -- these passes are unnecessary after all, people are just accustomed to seeing them. I found their flagging and looks after removal somewhat odd at first sight too, but after thinking about it for a bit, this is consistent and justifiable so I've tweaked my personal preference instead.

@scop scop force-pushed the scop:upgrade-pylint branch from 298a47d to 4821c06 Dec 3, 2018

@cdce8p cdce8p referenced this pull request Dec 3, 2018

Merged

Add unnecessary-pass for pylint-update #18985

1 of 2 tasks complete

scop added some commits Nov 26, 2018

@scop scop force-pushed the scop:upgrade-pylint branch from 4821c06 to 307cd1e Dec 5, 2018

@scop scop changed the title Upgrade pylint to 2.2.1 Upgrade pylint to 2.2.2 Dec 5, 2018

@balloob balloob merged commit 1be440a into home-assistant:dev Dec 6, 2018

4 checks passed

Hound No violations found. Woof!
WIP Legacy commit status override — see details
Details
cla-bot Everyone involved has signed the CLA
continuous-integration/travis-ci/pr The Travis CI build passed
Details

@wafflebot wafflebot bot removed the in progress label Dec 6, 2018

@scop scop deleted the scop:upgrade-pylint branch Dec 7, 2018

mxworm added a commit to mxworm/home-assistant that referenced this pull request Dec 7, 2018

Merge branch 'dev' into current
* dev: (52 commits)
  Set lock status correctly for Schlage BE469 Z-Wave locks (home-assistant#18737)
  Upgrade Tibber lib (home-assistant#19098)
  Bump skybellpy version to fix api issue (home-assistant#19100)
  Automatically detect if ipv4/ipv6 is used for cert_expiry (home-assistant#18916)
  Upgrade pyatv to 0.3.12 (home-assistant#19085)
  Bump lakeside requirement to support more Eufy devices (home-assistant#19080)
  Set directv unavailable state when errors returned for longer then a minute (home-assistant#19014)
  Updated frontend to 20181207.0
  Force refresh Lovelace (home-assistant#19073)
  Upgrade aiolifx to 0.6.7 (home-assistant#19077)
  Fix missing colorTemperatureInKelvin from Alexa responses (home-assistant#19069)
  Add CM17A support (home-assistant#19041)
  Upgrade pylint to 2.2.2 (home-assistant#18750)
  Revert home-assistant#17745 (home-assistant#19064)
  Bumped version to 0.85.0.dev0
  Add support for more Tibber Pulse data (home-assistant#19033)
  Update locationsharinglib to 3.0.9 (home-assistant#19045)
  Implemented unique ID support for Fibaro hub integration (home-assistant#19055)
  Update pyhomematic to 0.1.53 (home-assistant#19056)
  Fix saving YAML as JSON with empty array (home-assistant#19057)
  ...

@balloob balloob referenced this pull request Jan 10, 2019

Merged

0.85.0 #19897

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment