Closed KTibow closed 3 years ago
- Sure! I'll go ahead and remove that.
Thanks!
- I'll add using a predefined flake8 rule list to ha-blueprint when I have time, putting this in my saved notifications. Right now it checks for syntax errors, then installs wemake-python-styleguide (very strict linting) and gives you feedback so you can nitpick your code when you have time.
I see. The previous action would actually stop the build if we had violations, and I don't want to lose that. It seems silly to run flake8 twice, but maybe we can add the original check back into this project's workflow?
- No difference, basically the normal way is GitHub Actions builds the docker container and runs it, I'm just reverse-engineering how they did that and doing that if Python files are detected.
Thanks for explaining. Just as an FYI, I'm seeing a warning in the action output when installing isort
-- not sure if you've seen this or not, but we may require updates soon:
https://github.com/legrego/homeassistant-elasticsearch/runs/1268926009#step:8:875
ERROR: After October 2020 you may experience errors when installing or updating packages. This is because pip will change the way that it resolves dependency conflicts. Successfully installed isort-5.6.4
We recommend you use --use-feature=2020-resolver to test your packages with the new resolver before it becomes the default.
E9,F63,F7,F82
. What do you mean, the original check? Plain flake8 with no modifications?What kind of violations? Right now it'll fail on E9,F63,F7,F82.
Ah, I missed this part when reading the action code the first time around.
What do you mean, the original check? Plain flake8 with no modifications?
Almost without modifications (so far). We're overriding the max-line-length
right now:
My preference is to have GitHub Actions use the same rules that my IDE uses, so that I can get proper feedback before pushing my changes. Having different rules between the repo's config (.flake8
) and the GH Actions's config means that I can't rely on my IDE to show me all of the errors that could go wrong.
Perhaps ha-blueprint
can ship with E9,F63,F7,F82
as the default set of rules to fail on, but use the settings configured in the repo if they're provided? That would give other custom components the benefit of your "preferred" rules, while still letting stubborn people like me define their own rule set. What do you think?
Looks good to you now?
BTW consider opting this repo in to hacktoberfest (just add the topic).
I made ha-blueprint recently. This merges your existing workflow with the one I made.