You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
''' Script to lint all code e.g. python '''importosfrompylintimportepylintdeflint_pylint():
''' Lint all python code with pylint '''pylintrc=os.path.join("afolder", ".pylintrc")
epylint.py_run(f'afolder -j 0 --rcfile={pylintrc}')
if__name__=="__main__":
lint_pylint()
Add a .pylintrc in a directory like: afolder/.pylintrc
Run test.py
Current behavior
It cannot handle .pylintrc files on Windows not in the same folder as the command being run. You thus get an error like:
* Fix shlex parsing error on Windows in epylint
Closes#1940
* Change py_run's shlex posix sys.platform
sys.platform mistakenly included darwin as not posix compliant
Steps to reproduce
Current behavior
It cannot handle .pylintrc files on Windows not in the same folder as the command being run. You thus get an error like:
Expected behavior
For it to work. The problem can be found in how shlex.split is invoked on Windows. The line here https://github.com/PyCQA/pylint/blob/9dd978aaed0daf852d8caed515b9e4e13f2dfcc7/pylint/epylint.py#L142 could be changed to:
pylint --version output
The text was updated successfully, but these errors were encountered: