Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Regression of pylint config - import-error's are no longer disabled #3180

Closed
William-Luo0 opened this issue Jul 28, 2022 · 0 comments · Fixed by #3182
Closed

Regression of pylint config - import-error's are no longer disabled #3180

William-Luo0 opened this issue Jul 28, 2022 · 0 comments · Fixed by #3182
Labels
bug Something isn't working

Comments

@William-Luo0
Copy link
Contributor

William-Luo0 commented Jul 28, 2022

Describe the bug

PR #3038 removed the option import-error from the TEMPLATES/.python-lint file and has caused pylint to throw up import errors. This removal seems accidental as the PR was to remove deprecated/removed options (Address issue #3037).
The import-error option was added back in PR #695 to deal with #157 and #645

Expected behaviour

Import errors aren't reported by pylint inside of the super-linter. i.e. the following error shouldn't show up:
E0401: Unable to import '*******' (import-error)

Steps to Reproduce

  1. Create a python file with 3rd-party library imports (e.g. pytest)
echo 'import pytest' > /tmp/test.py
  1. Run the super linter
docker run \
-e RUN_LOCAL=true \
-e USE_FIND_ALGORITHM=true  \
-e VALIDATE_PYTHON_PYLINT=true \
-v /tmp/test.py:/tmp/lint/test.py \
github/super-linter:v4
  1. See logs

Logs

2022-07-28 01:50:53 [INFO]   Linting [PYTHON_PYLINT] files...
2022-07-28 01:50:53 [INFO]   ----------------------------------------------
2022-07-28 01:50:53 [INFO]   ----------------------------------------------
2022-07-28 01:50:53 [INFO]   ---------------------------
2022-07-28 01:50:53 [INFO]   File:[/tmp/lint/test.py]
2022-07-28 01:50:54 [ERROR]   Found errors in [pylint] linter!
2022-07-28 01:50:54 [ERROR]   Error code: 2. Command output:
------
************* Module test
test.py:1:0: E0401: Unable to import 'pytest' (import-error)
------
2022-07-28 01:50:55 [INFO]   ----------------------------------------------
2022-07-28 01:50:55 [INFO]   ----------------------------------------------

Additional context

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant