Fix make style-check errors#1000
Conversation
TheRealFalcon
left a comment
There was a problem hiding this comment.
- The
run-pep8stuff can be removed entirely. It's functionality is entirely covered by flake8. - How are you running linting such that you're getting "F401" on the typing imports? They're used in the type annotation comments which doesn't trigger a warning for me.
- Can we leave W503 and W504 in and revert the changes for them back? These were added intentionally and I see no reason to pull them out...especially since the guidance has reversed in recent years.
| from cloudinit import patcher | ||
| patcher.patch_logging() | ||
| from cloudinit import log as logging # noqa: E402 | ||
|
|
There was a problem hiding this comment.
Let's not move this. I want the patch to happen before other cloud-init imports.
There was a problem hiding this comment.
Okay, understood. My question is - can we do it in some other place and avoid this warning?
Like in /usr/bin/cloud-init before anything starts?
|
I ran checks on Ubuntu-16.04 and it reported these errors. Are there any plans to stop running CI tests on Ubuntu 16.04? |
|
I will remove run-pep8 target and corresponding script.Thanks. You want me to keep the ignore W503 & W504 in tox.ini as well? If guidance is reversed, it seems redundant. |
16.04 no longer receives standard support, so from an upstream perspective, we're not concerned about breaking things in 16.04. Practically, we still run it in our CI because it has the lowest version of python that we support (3.5), so it's an easy way to test our 3.5 dependencies.
Correct. |
Using flake8 inplace of pyflakes Renamed run-pyflakes -> run-flake8 Changed target name to flake8 in Makefile With pyflakes we can't suppress warnings/errors in few required places. flake8 is flexible in that regard. Hence using flake8 seems to be a better choice here. flake8 does the job of pep8 anyway. So, removed pep8 target from Makefile along with tools/run-pep8 script. Included setup.py in flake8 checks Signed-off-by: Shreenidhi Shedi <sshedi@vmware.com>
Signed-off-by: Shreenidhi Shedi sshedi@vmware.com
Proposed Commit Message
Test Steps
Checklist: