Replies: 3 comments 3 replies
-
Okay, so scikit-learn/setup.cfg indeed contains the config for flake8. It remains to figure out if VSCode can read it or if I have to enter
|
Beta Was this translation helpful? Give feedback.
2 replies
-
[Update for future reference, as I revisit this thread when I have a problem.] Sklearn moved from flake8 to ruff in #26630 . The consequences include:
|
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Could someone help me to set up the formatter and/or linter?
To be honest, black, flake8, autopep8, pylint all seem very similar to me to the point of conflation. I only know that I can configure them in my VSCode as needed (I probably did that once) and adjust the settings as to what errors and violations to catch or to pass (I did that too). The problem is that my current preferences do not necessarily match what is customary in scikit-learn repo.
For example, my flake8 complains about E302, not having two empty lines between two function definitions. But in scikit-learn Python code single skipped line is a common thing.
The CI/CD pipeline config can help me understand which E's, W's, and F's to disable. I found a conspicuously named file scikit-learn/setup.cfg, which contains a block with flake8 exclusions.
Is this is what I want and need? Is there anything else?
I wonder if someone experienced and who also uses VSCode could summarise or share their settings with me? The part concerning Python linting and formatting, that is. I would much appreciate this.
Beta Was this translation helpful? Give feedback.
All reactions