-
Notifications
You must be signed in to change notification settings - Fork 23
Open
Description
Hi
My lintrunner has started to fail. However, lintrunner.toml configuration hasn't changed, and it worked before. Downgrading lintrunner didn't help, my current version is 0.12.7 right now. Can you please help?
lintrunner.toml file:
[[linter]]
code = 'NOQA'
include_patterns = ['**/*.py', '**/*.pyi']
exclude_patterns = []
command = [
'poetry',
'run',
'python',
'-m',
'lintrunner_adapters',
'run',
'grep_linter',
'--pattern=# noqa([^:]|$)',
'--linter-name=NOQA',
'--error-name=unqualified noqa',
"""--error-description=\
This line has an unqualified `noqa`; \
please convert it to `noqa: XXXX`\
""",
'--',
'@{{PATHSFILE}}',
]
[[linter]]
code = 'NEWLINE'
include_patterns = ['**']
exclude_patterns = ['**/*.png']
command = [
'poetry',
'run',
'python',
'-m',
'lintrunner_adapters',
'run',
'newlines_linter',
'--',
'@{{PATHSFILE}}',
]
is_formatter = true
[[linter]]
code = 'PYUPGRADE'
is_formatter = true
include_patterns = [
'**/*.py',
'**/*.pyi',
]
exclude_patterns = []
command = [
'poetry',
'run',
'python',
'-m',
'lintrunner_adapters',
'run',
'pyupgrade_linter',
'--py37-plus',
'--',
'@{{PATHSFILE}}',
]
[[linter]]
code = 'RUFF'
include_patterns = [
'**/*.py',
'**/*.pyi',
]
exclude_patterns = []
command = [
'poetry',
'run',
'python',
'-m',
'lintrunner_adapters',
'run',
'ruff_linter',
'--config=./ruff.toml',
'--show-disable',
'--',
'@{{PATHSFILE}}',
]
[[linter]]
code = 'FORMATTER'
include_patterns = [
'**/*.py',
'**/*.pyi',
]
exclude_patterns = []
command = [
'poetry',
'run',
'python',
'-m',
'lintrunner_adapters',
'run',
'ruff_format_linter',
'--config=./ruff.toml',
'--',
'@{{PATHSFILE}}',
]
is_formatter = trueDebug logs:
poetry run lintrunner lint -a --all-files --config='./.lintrunner.toml' -vv ⏎
[2025-03-14T11:14:24Z DEBUG lintrunner] Version: 0.12.7
...
[2025-03-14T11:05:35Z DEBUG lintrunner::linter] Running linter PYUPGRADE: poetry 'run' 'python' '-m' 'lintrunner_adapters' 'run' 'pyupgrade_linter' '--py37-plus' '--' '@/var/folders/d0/f2xf9z5n4m7fwv0lb1v95f8m0000gq/T/.tmpK8zSX2'
[2025-03-14T11:05:35Z DEBUG lintrunner::linter] Running linter RUFF: poetry 'run' 'python' '-m' 'lintrunner_adapters' 'run' 'ruff_linter' '--config=./ruff.toml' '--show-disable' '--' '@/var/folders/d0/f2xf9z5n4m7fwv0lb1v95f8m0000gq/T/.tmpV7ORhH'
[2025-03-14T11:05:35Z DEBUG lintrunner::linter] Running linter FORMATTER: poetry 'run' 'python' '-m' 'lintrunner_adapters' 'run' 'ruff_format_linter' '--config=./ruff.toml' '--' '@/var/folders/d0/f2xf9z5n4m7fwv0lb1v95f8m0000gq/T/.tmpy7uuNd'
[2025-03-14T11:05:35Z DEBUG lintrunner::linter] Running linter NOQA: poetry 'run' 'python' '-m' 'lintrunner_adapters' 'run' 'grep_linter' '--pattern=# noqa([^:]|$)' '--linter-name=NOQA' '--error-name=unqualified noqa' '--error-description=This line has an unqualified `noqa`; please convert it to `noqa: XXXX`' '--' '@/var/folders/d0/f2xf9z5n4m7fwv0lb1v95f8m0000gq/T/.tmpIOPZ0D'
[2025-03-14T11:05:35Z DEBUG lintrunner::linter] Running linter NEWLINE: poetry 'run' 'python' '-m' 'lintrunner_adapters' 'run' 'newlines_linter' '--' '@/var/folders/d0/f2xf9z5n4m7fwv0lb1v95f8m0000gq/T/.tmpn9WdMz'
[2025-03-14T11:05:36Z DEBUG lintrunner::linter] Linter PYUPGRADE took: 795.508667ms
[2025-03-14T11:05:36Z DEBUG lintrunner::linter] Linter FORMATTER took: 795.3925ms
[2025-03-14T11:05:36Z DEBUG lintrunner::linter] Linter NOQA took: 796.308291ms
[2025-03-14T11:05:36Z DEBUG lintrunner::linter] Linter RUFF took: 798.155625ms
[2025-03-14T11:05:36Z DEBUG lintrunner::linter] Linter NEWLINE took: 796.490959ms
>>> General linter failure:
Error (FORMATTER) Linter failed
Linter failed. This a bug, please file an issue against the linter
maintainer.
CONTEXT:
Linter command failed with non-zero exit code.
STDERR:
The option "-m" does not exist
STDOUT:
Error (PYUPGRADE) Linter failed
Linter failed. This a bug, please file an issue against the linter
maintainer.
CONTEXT:
Linter command failed with non-zero exit code.
STDERR:
The option "-m" does not exist
STDOUT:
Error (NOQA) Linter failed
Linter failed. This a bug, please file an issue against the linter
maintainer.
CONTEXT:
Linter command failed with non-zero exit code.
STDERR:
The option "-m" does not exist
STDOUT:
Error (RUFF) Linter failed
Linter failed. This a bug, please file an issue against the linter
maintainer.
CONTEXT:
Linter command failed with non-zero exit code.
STDERR:
The option "-m" does not exist
STDOUT:
Error (NEWLINE) Linter failed
Linter failed. This a bug, please file an issue against the linter
maintainer.
CONTEXT:
Linter command failed with non-zero exit code.
STDERR:
The option "-m" does not exist
STDOUT:
Successfully applied all patches.What I find odd is that each command separately actually works:
poetry run python -m lintrunner_adapters run ruff_format_linter --config=./ruff.toml ./webserver_config.py
<Thread_0:DEBUG> $ /.../.venv/bin/python -m ruff format --config=./ruff.toml --stdin-filename ./webserver_config.py -
<Thread_0:DEBUG> took 60msReactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels