feat: create requirements-txt linter #304
Triggered via pull request
October 17, 2023 05:05
Status
Cancelled
Total duration
2m 53s
Artifacts
–
ci.yml
on: pull_request
Matrix: lintrunner
Matrix: pytest
Release
0s
Annotations
42 errors and 56 warnings
lintrunner (ubuntu-latest, 3.10)
Process completed with exit code 1.
|
MYPY no-any-return:
lintrunner_adapters/adapters/requirements_txt_linter.py#L82
Returning Any from function declared to return "bytes"
To disable, use ` # type: ignore[no-any-return]`
|
MYPY name-defined:
lintrunner_adapters/adapters/requirements_txt_linter.py#L82
Name "PASS" is not defined
To disable, use ` # type: ignore[name-defined]`
|
PYLINT E0602:
lintrunner_adapters/adapters/requirements_txt_linter.py#L82
Undefined variable 'PASS' (undefined-variable)
See [undefined-variable](https://pylint.pycqa.org/en/latest/user_guide/messages/error/undefined-variable.html).
To disable, use ` # pylint: disable=undefined-variable`
|
RUFF F821:
lintrunner_adapters/adapters/requirements_txt_linter.py#L82
Undefined name `PASS`.
See https://beta.ruff.rs/docs/rules/.
To disable, use ` # noqa: F821`
|
FLAKE8 F821:
lintrunner_adapters/adapters/requirements_txt_linter.py#L82
undefined name 'PASS'
See https://www.flake8rules.com/rules/F821.html.
To disable, use ` # noqa: F821`
|
lintrunner (ubuntu-latest, 3.11)
Process completed with exit code 1.
|
MYPY no-any-return:
lintrunner_adapters/adapters/requirements_txt_linter.py#L82
Returning Any from function declared to return "bytes"
To disable, use ` # type: ignore[no-any-return]`
|
MYPY name-defined:
lintrunner_adapters/adapters/requirements_txt_linter.py#L82
Name "PASS" is not defined
To disable, use ` # type: ignore[name-defined]`
|
PYLINT E0602:
lintrunner_adapters/adapters/requirements_txt_linter.py#L82
Undefined variable 'PASS' (undefined-variable)
See [undefined-variable](https://pylint.pycqa.org/en/latest/user_guide/messages/error/undefined-variable.html).
To disable, use ` # pylint: disable=undefined-variable`
|
RUFF F821:
lintrunner_adapters/adapters/requirements_txt_linter.py#L82
Undefined name `PASS`.
See https://beta.ruff.rs/docs/rules/.
To disable, use ` # noqa: F821`
|
FLAKE8 F821:
lintrunner_adapters/adapters/requirements_txt_linter.py#L82
undefined name 'PASS'
See https://www.flake8rules.com/rules/F821.html.
To disable, use ` # noqa: F821`
|
lintrunner (ubuntu-latest, 3.9)
Process completed with exit code 1.
|
RUFF F821:
lintrunner_adapters/adapters/requirements_txt_linter.py#L82
Undefined name `PASS`.
See https://beta.ruff.rs/docs/rules/.
To disable, use ` # noqa: F821`
|
FLAKE8 F821:
lintrunner_adapters/adapters/requirements_txt_linter.py#L82
undefined name 'PASS'
See https://www.flake8rules.com/rules/F821.html.
To disable, use ` # noqa: F821`
|
MYPY no-any-return:
lintrunner_adapters/adapters/requirements_txt_linter.py#L82
Returning Any from function declared to return "bytes"
To disable, use ` # type: ignore[no-any-return]`
|
MYPY name-defined:
lintrunner_adapters/adapters/requirements_txt_linter.py#L82
Name "PASS" is not defined
To disable, use ` # type: ignore[name-defined]`
|
PYLINT E0602:
lintrunner_adapters/adapters/requirements_txt_linter.py#L82
Undefined variable 'PASS' (undefined-variable)
See [undefined-variable](https://pylint.pycqa.org/en/latest/user_guide/messages/error/undefined-variable.html).
To disable, use ` # pylint: disable=undefined-variable`
|
lintrunner (macos-latest, 3.9)
Process completed with exit code 1.
|
RUFF F821:
lintrunner_adapters/adapters/requirements_txt_linter.py#L82
Undefined name `PASS`.
See https://beta.ruff.rs/docs/rules/.
To disable, use ` # noqa: F821`
|
FLAKE8 F821:
lintrunner_adapters/adapters/requirements_txt_linter.py#L82
undefined name 'PASS'
See https://www.flake8rules.com/rules/F821.html.
To disable, use ` # noqa: F821`
|
MYPY no-any-return:
lintrunner_adapters/adapters/requirements_txt_linter.py#L82
Returning Any from function declared to return "bytes"
To disable, use ` # type: ignore[no-any-return]`
|
MYPY name-defined:
lintrunner_adapters/adapters/requirements_txt_linter.py#L82
Name "PASS" is not defined
To disable, use ` # type: ignore[name-defined]`
|
PYLINT E0602:
lintrunner_adapters/adapters/requirements_txt_linter.py#L82
Undefined variable 'PASS' (undefined-variable)
See [undefined-variable](https://pylint.pycqa.org/en/latest/user_guide/messages/error/undefined-variable.html).
To disable, use ` # pylint: disable=undefined-variable`
|
RUFF F821:
lintrunner_adapters/adapters/requirements_txt_linter.py#L82
Undefined name `PASS`.
See https://beta.ruff.rs/docs/rules/.
To disable, use ` # noqa: F821`
|
FLAKE8 F821:
lintrunner_adapters/adapters/requirements_txt_linter.py#L82
undefined name 'PASS'
See https://www.flake8rules.com/rules/F821.html.
To disable, use ` # noqa: F821`
|
MYPY no-any-return:
lintrunner_adapters/adapters/requirements_txt_linter.py#L82
Returning Any from function declared to return "bytes"
To disable, use ` # type: ignore[no-any-return]`
|
MYPY name-defined:
lintrunner_adapters/adapters/requirements_txt_linter.py#L82
Name "PASS" is not defined
To disable, use ` # type: ignore[name-defined]`
|
PYLINT E0602:
lintrunner_adapters/adapters/requirements_txt_linter.py#L82
Undefined variable 'PASS' (undefined-variable)
See [undefined-variable](https://pylint.pycqa.org/en/latest/user_guide/messages/error/undefined-variable.html).
To disable, use ` # pylint: disable=undefined-variable`
|
lintrunner (macos-latest, 3.11)
Process completed with exit code 1.
|
lintrunner (windows-latest, 3.9)
Process completed with exit code 1.
|
lintrunner (windows-latest, 3.10)
Process completed with exit code 1.
|
lintrunner (macos-latest, 3.10)
Process completed with exit code 1.
|
RUFF F821:
lintrunner_adapters/adapters/requirements_txt_linter.py#L82
Undefined name `PASS`.
See https://beta.ruff.rs/docs/rules/.
To disable, use ` # noqa: F821`
|
FLAKE8 F821:
lintrunner_adapters/adapters/requirements_txt_linter.py#L82
undefined name 'PASS'
See https://www.flake8rules.com/rules/F821.html.
To disable, use ` # noqa: F821`
|
MYPY no-any-return:
lintrunner_adapters/adapters/requirements_txt_linter.py#L82
Returning Any from function declared to return "bytes"
To disable, use ` # type: ignore[no-any-return]`
|
MYPY name-defined:
lintrunner_adapters/adapters/requirements_txt_linter.py#L82
Name "PASS" is not defined
To disable, use ` # type: ignore[name-defined]`
|
PYLINT E0602:
lintrunner_adapters/adapters/requirements_txt_linter.py#L82
Undefined variable 'PASS' (undefined-variable)
See [undefined-variable](https://pylint.pycqa.org/en/latest/user_guide/messages/error/undefined-variable.html).
To disable, use ` # pylint: disable=undefined-variable`
|
lintrunner (windows-latest, 3.11)
Canceling since a higher priority waiting request for 'CI-refs/pull/80/merge-false' exists
|
lintrunner (windows-latest, 3.11)
Process completed with exit code 1.
|
pytest (windows-latest, 3.11)
Canceling since a higher priority waiting request for 'CI-refs/pull/80/merge-false' exists
|
pytest (windows-latest, 3.11)
The operation was canceled.
|
REQUIREMENTS-TXT format:
requirements-test.txt#L1
Run `lintrunner -a` to apply this patch.
|
PYLINT R1705:
lintrunner_adapters/adapters/requirements_txt_linter.py#L51
Unnecessary "elif" after "return", remove the leading "el" from "elif" (no-else-return)
See [no-else-return](https://pylint.pycqa.org/en/latest/user_guide/messages/refactor/no-else-return.html).
To disable, use ` # pylint: disable=no-else-return`
|
PYLINT C1802:
lintrunner_adapters/adapters/requirements_txt_linter.py#L88
Do not use `len(SEQUENCE)` without comparison to determine if a sequence is empty (use-implicit-booleaness-not-len)
See [use-implicit-booleaness-not-len](https://pylint.pycqa.org/en/latest/user_guide/messages/convention/use-implicit-booleaness-not-len.html).
To disable, use ` # pylint: disable=use-implicit-booleaness-not-len`
|
RUFF SIM108:
lintrunner_adapters/adapters/requirements_txt_linter.py#L106
Use ternary operator `rest = requirements.pop().comments if requirements[-1].value is None else []` instead of `if`-`else`-block.
See https://beta.ruff.rs/docs/rules/.
To disable, use ` # noqa: SIM108`
|
RUFF format:
lintrunner_adapters/adapters/requirements_txt_linter.py#L1
Run `lintrunner -a` to apply this patch.
|
FLAKE8 E302:
lintrunner_adapters/adapters/requirements_txt_linter.py#L153
expected 2 blank lines, found 1
See https://www.flake8rules.com/rules/E302.html.
To disable, use ` # noqa: E302`
|
REFURB FURB126:
lintrunner_adapters/adapters/requirements_txt_linter.py#L56
Replace `else: return x` with `return x`
|
REFURB FURB115:
lintrunner_adapters/adapters/requirements_txt_linter.py#L88
Replace `len(x)` with `x`
|
BLACK-ISORT format:
lintrunner_adapters/adapters/requirements_txt_linter.py#L1
Run `lintrunner -a` to apply this patch.
|
TOML-SORT format:
.lintrunner.toml#L1
Run `lintrunner -a` to apply this patch.
|
TOML-SORT format:
.lintrunner.toml#L1
Run `lintrunner -a` to apply this patch.
|
REQUIREMENTS-TXT format:
requirements-test.txt#L1
Run `lintrunner -a` to apply this patch.
|
PYLINT R1705:
lintrunner_adapters/adapters/requirements_txt_linter.py#L51
Unnecessary "elif" after "return", remove the leading "el" from "elif" (no-else-return)
See [no-else-return](https://pylint.pycqa.org/en/latest/user_guide/messages/refactor/no-else-return.html).
To disable, use ` # pylint: disable=no-else-return`
|
PYLINT C1802:
lintrunner_adapters/adapters/requirements_txt_linter.py#L88
Do not use `len(SEQUENCE)` without comparison to determine if a sequence is empty (use-implicit-booleaness-not-len)
See [use-implicit-booleaness-not-len](https://pylint.pycqa.org/en/latest/user_guide/messages/convention/use-implicit-booleaness-not-len.html).
To disable, use ` # pylint: disable=use-implicit-booleaness-not-len`
|
RUFF SIM108:
lintrunner_adapters/adapters/requirements_txt_linter.py#L106
Use ternary operator `rest = requirements.pop().comments if requirements[-1].value is None else []` instead of `if`-`else`-block.
See https://beta.ruff.rs/docs/rules/.
To disable, use ` # noqa: SIM108`
|
RUFF format:
lintrunner_adapters/adapters/requirements_txt_linter.py#L1
Run `lintrunner -a` to apply this patch.
|
FLAKE8 E302:
lintrunner_adapters/adapters/requirements_txt_linter.py#L153
expected 2 blank lines, found 1
See https://www.flake8rules.com/rules/E302.html.
To disable, use ` # noqa: E302`
|
REFURB FURB126:
lintrunner_adapters/adapters/requirements_txt_linter.py#L56
Replace `else: return x` with `return x`
|
REFURB FURB115:
lintrunner_adapters/adapters/requirements_txt_linter.py#L88
Replace `len(x)` with `x`
|
BLACK-ISORT format:
lintrunner_adapters/adapters/requirements_txt_linter.py#L1
Run `lintrunner -a` to apply this patch.
|
RUFF SIM108:
lintrunner_adapters/adapters/requirements_txt_linter.py#L106
Use ternary operator `rest = requirements.pop().comments if requirements[-1].value is None else []` instead of `if`-`else`-block.
See https://beta.ruff.rs/docs/rules/.
To disable, use ` # noqa: SIM108`
|
RUFF format:
lintrunner_adapters/adapters/requirements_txt_linter.py#L1
Run `lintrunner -a` to apply this patch.
|
FLAKE8 E302:
lintrunner_adapters/adapters/requirements_txt_linter.py#L153
expected 2 blank lines, found 1
See https://www.flake8rules.com/rules/E302.html.
To disable, use ` # noqa: E302`
|
BLACK-ISORT format:
lintrunner_adapters/adapters/requirements_txt_linter.py#L1
Run `lintrunner -a` to apply this patch.
|
PYLINT R1705:
lintrunner_adapters/adapters/requirements_txt_linter.py#L51
Unnecessary "elif" after "return", remove the leading "el" from "elif" (no-else-return)
See [no-else-return](https://pylint.pycqa.org/en/latest/user_guide/messages/refactor/no-else-return.html).
To disable, use ` # pylint: disable=no-else-return`
|
PYLINT C1802:
lintrunner_adapters/adapters/requirements_txt_linter.py#L88
Do not use `len(SEQUENCE)` without comparison to determine if a sequence is empty (use-implicit-booleaness-not-len)
See [use-implicit-booleaness-not-len](https://pylint.pycqa.org/en/latest/user_guide/messages/convention/use-implicit-booleaness-not-len.html).
To disable, use ` # pylint: disable=use-implicit-booleaness-not-len`
|
TOML-SORT format:
.lintrunner.toml#L1
Run `lintrunner -a` to apply this patch.
|
REQUIREMENTS-TXT format:
requirements-test.txt#L1
Run `lintrunner -a` to apply this patch.
|
TOML-SORT format:
.lintrunner.toml#L1
Run `lintrunner -a` to apply this patch.
|
REQUIREMENTS-TXT format:
requirements-test.txt#L1
Run `lintrunner -a` to apply this patch.
|
RUFF SIM108:
lintrunner_adapters/adapters/requirements_txt_linter.py#L106
Use ternary operator `rest = requirements.pop().comments if requirements[-1].value is None else []` instead of `if`-`else`-block.
See https://beta.ruff.rs/docs/rules/.
To disable, use ` # noqa: SIM108`
|
RUFF format:
lintrunner_adapters/adapters/requirements_txt_linter.py#L1
Run `lintrunner -a` to apply this patch.
|
BLACK-ISORT format:
lintrunner_adapters/adapters/requirements_txt_linter.py#L1
Run `lintrunner -a` to apply this patch.
|
FLAKE8 E302:
lintrunner_adapters/adapters/requirements_txt_linter.py#L153
expected 2 blank lines, found 1
See https://www.flake8rules.com/rules/E302.html.
To disable, use ` # noqa: E302`
|
PYLINT R1705:
lintrunner_adapters/adapters/requirements_txt_linter.py#L51
Unnecessary "elif" after "return", remove the leading "el" from "elif" (no-else-return)
See [no-else-return](https://pylint.pycqa.org/en/latest/user_guide/messages/refactor/no-else-return.html).
To disable, use ` # pylint: disable=no-else-return`
|
PYLINT C1802:
lintrunner_adapters/adapters/requirements_txt_linter.py#L88
Do not use `len(SEQUENCE)` without comparison to determine if a sequence is empty (use-implicit-booleaness-not-len)
See [use-implicit-booleaness-not-len](https://pylint.pycqa.org/en/latest/user_guide/messages/convention/use-implicit-booleaness-not-len.html).
To disable, use ` # pylint: disable=use-implicit-booleaness-not-len`
|
RUFF SIM108:
lintrunner_adapters/adapters/requirements_txt_linter.py#L106
Use ternary operator `rest = requirements.pop().comments if requirements[-1].value is None else []` instead of `if`-`else`-block.
See https://beta.ruff.rs/docs/rules/.
To disable, use ` # noqa: SIM108`
|
RUFF format:
lintrunner_adapters/adapters/requirements_txt_linter.py#L1
Run `lintrunner -a` to apply this patch.
|
BLACK-ISORT format:
lintrunner_adapters/adapters/requirements_txt_linter.py#L1
Run `lintrunner -a` to apply this patch.
|
FLAKE8 E302:
lintrunner_adapters/adapters/requirements_txt_linter.py#L153
expected 2 blank lines, found 1
See https://www.flake8rules.com/rules/E302.html.
To disable, use ` # noqa: E302`
|
REFURB FURB126:
lintrunner_adapters/adapters/requirements_txt_linter.py#L56
Replace `else: return x` with `return x`
|
REFURB FURB115:
lintrunner_adapters/adapters/requirements_txt_linter.py#L88
Replace `len(x)` with `x`
|
PYLINT R1705:
lintrunner_adapters/adapters/requirements_txt_linter.py#L51
Unnecessary "elif" after "return", remove the leading "el" from "elif" (no-else-return)
See [no-else-return](https://pylint.pycqa.org/en/latest/user_guide/messages/refactor/no-else-return.html).
To disable, use ` # pylint: disable=no-else-return`
|
PYLINT C1802:
lintrunner_adapters/adapters/requirements_txt_linter.py#L88
Do not use `len(SEQUENCE)` without comparison to determine if a sequence is empty (use-implicit-booleaness-not-len)
See [use-implicit-booleaness-not-len](https://pylint.pycqa.org/en/latest/user_guide/messages/convention/use-implicit-booleaness-not-len.html).
To disable, use ` # pylint: disable=use-implicit-booleaness-not-len`
|
TOML-SORT format:
.lintrunner.toml#L1
Run `lintrunner -a` to apply this patch.
|
REQUIREMENTS-TXT format:
requirements-test.txt#L1
Run `lintrunner -a` to apply this patch.
|
TOML-SORT format:
.lintrunner.toml#L1
Run `lintrunner -a` to apply this patch.
|
RUFF SIM108:
lintrunner_adapters/adapters/requirements_txt_linter.py#L106
Use ternary operator `rest = requirements.pop().comments if requirements[-1].value is None else []` instead of `if`-`else`-block.
See https://beta.ruff.rs/docs/rules/.
To disable, use ` # noqa: SIM108`
|
RUFF format:
lintrunner_adapters/adapters/requirements_txt_linter.py#L1
Run `lintrunner -a` to apply this patch.
|
BLACK-ISORT format:
lintrunner_adapters/adapters/requirements_txt_linter.py#L1
Run `lintrunner -a` to apply this patch.
|
REFURB FURB126:
lintrunner_adapters/adapters/requirements_txt_linter.py#L56
Replace `else: return x` with `return x`
|
REFURB FURB115:
lintrunner_adapters/adapters/requirements_txt_linter.py#L88
Replace `len(x)` with `x`
|
FLAKE8 E302:
lintrunner_adapters/adapters/requirements_txt_linter.py#L153
expected 2 blank lines, found 1
See https://www.flake8rules.com/rules/E302.html.
To disable, use ` # noqa: E302`
|
PYLINT R1705:
lintrunner_adapters/adapters/requirements_txt_linter.py#L51
Unnecessary "elif" after "return", remove the leading "el" from "elif" (no-else-return)
See [no-else-return](https://pylint.pycqa.org/en/latest/user_guide/messages/refactor/no-else-return.html).
To disable, use ` # pylint: disable=no-else-return`
|
PYLINT C1802:
lintrunner_adapters/adapters/requirements_txt_linter.py#L88
Do not use `len(SEQUENCE)` without comparison to determine if a sequence is empty (use-implicit-booleaness-not-len)
See [use-implicit-booleaness-not-len](https://pylint.pycqa.org/en/latest/user_guide/messages/convention/use-implicit-booleaness-not-len.html).
To disable, use ` # pylint: disable=use-implicit-booleaness-not-len`
|
REQUIREMENTS-TXT format:
requirements-test.txt#L1
Run `lintrunner -a` to apply this patch.
|