`python dev.py lint` may not match what the CI lint job does
See original GitHub issueThe below was reported by @HDembinski in a comment on gh-15489. That should be considered a bug if it’s indeed not matching, so this should be looked at.
python dev.py
lint should also runflake8
, but for the PEP8 part should be the same. Can you point to a branch where you see one failing but the other passing?
Sorry, I don’t have a clean reproducer, but I think this patch here
https://github.com/scipy/scipy/pull/17237/commits/0545e5e0c3e6601e584e3afda88a8df0cec74795
was a change that I made after python dev.py lint
gave me no complains (about my new code), but python tools/lint_diff.py
run by the CI job found those issues. I haven’t looked into the implementation, but these two commands apparently do not apply the same rules.
Issue Analytics
- State:
- Created 10 months ago
- Comments:5 (5 by maintainers)
Top Results From Across the Web
[CI Problem] python tests/scripts/ci.py lint failed for not ignoring ...
Repro: # try to run linting locally on ubuntu python tests/scripts/ci.py lint Stack trace: Linting the Python code with flake8.
Read more >Troubleshooting CI/CD - GitLab Docs
The CI Lint tool is a simple way to ensure the syntax of a CI/CD configuration file is correct. Paste in full .gitlab-ci.yml...
Read more >pylint raises error if directory doesn't contain __init__.py file
A command that seemingly even better: find api/python/cli -name "*.py" | xargs pylint . This way it will work if python files are...
Read more >Python Code Quality: Tools & Best Practices
In this article, we'll identify high-quality Python code and show you how to improve the quality of your own code. We'll analyze and...
Read more >Setting Up PEP8 and Pylint on VS Code - DEV Community
flake8 is a different linter entirely. If you're still looking for PEP 8 formatting, you can install autopep8 and change your "python.formatting ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
That sounds like a good idea. And then maybe also a
dev.py ci
which runs a bunch of checks at once? E.g. alsomypy
? And we may even want to extend that with an option to useact
to run build/test CI jobs locally?This is indeed a duplicate of gh-17394. See https://github.com/scipy/scipy/issues/17394#issuecomment-1328335872 for what is happening. I’ll close this issue.