-
-
Notifications
You must be signed in to change notification settings - Fork 29.9k
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 1.7.2 #7108
Upgrade pylint to 1.7.2 #7108
Conversation
@fabaff, thanks for your PR! By analyzing the history of the files in this pull request, we identified @balloob, @sdague and @andrey-git to be potential reviewers. |
The run emits lots of new errors |
Yeah that happens each time we do this. So let's see what it found and fix it 👍 |
homeassistant/bootstrap.py
Outdated
def async_enable_logging(hass: core.HomeAssistant, verbose: bool=False, | ||
log_rotate_days=None) -> None: | ||
def async_enable_logging(hass: core.HomeAssistant, verbose: bool = False, | ||
log_rotate_days = None) -> None: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
unexpected spaces around keyword / parameter equals
When we fix issues, we should fix them in |
OK. I was just checking what the implications may be on a couple of files because it will require some time to get rid of all issues. |
I think that this approach will not work for a couple of cases.
Could be fixed in
This was introduced by 1.7.0. Would lead to an issue in |
This is gonna be a big changeset. I started it at #7448. |
BTW, |
It looks like PyLint incorrectly detects locks as not being a context manager:
We might want to consider disabling that rule for now. |
I rebased this to see remaining errors. |
Alright, made progress 👍 For now, I focus on fixing warnings while disabling these extra checks:
Which gives us 279 errors left to fix, of which 174 are |
100 issues left. It's all End is near 😉 (for phase 1) |
What should we do with this PR? I gave it a stab and we got pretty close. If no one is going to pick it up, let's close it? |
@balloob If you don't mind, I would be willing to pick this up again. I'm using Python 3.6 on my machine and it's pretty annoying having to constantly switch Python versions just to run pylint... However, I'd then also upgrade pylint to 1.8.1 so that the |
would be great. we will still run pylint under our lowest supported version in CI |
1.7.2
To-do:
.keys()
Iterating the dictionary directly #7251no-else-return
bad-whitespace
(new, apply indev
)not-context-manager
Add not-context-manager #7523arguments-differ
redefined-argument-from-local
useless-super-delegation
consider-using-ternary