Closed niccokunzmann closed 4 months ago
This is the output:
creating virtual environment...
installing ruff...
bootstrap.py:93:1: E402 Module level import not at top of file
|
91 | setup_args = {'to_dir': tmpeggs, 'download_delay': 0}
92 | ez['use_setuptools'](**setup_args)
93 | import setuptools
| ^^^^^^^^^^^^^^^^^ E402
94 | import pkg_resources
|
bootstrap.py:94:1: E402 Module level import not at top of file
|
92 | ez['use_setuptools'](**setup_args)
93 | import setuptools
94 | import pkg_resources
| ^^^^^^^^^^^^^^^^^^^^ E402
95 |
96 | # This does not (always?) update the default working set. We will
|
bootstrap.py:158:1: E402 Module level import not at top of file
|
156 | cmd.append(requirement)
157 |
158 | import subprocess
| ^^^^^^^^^^^^^^^^^ E402
159 | if subprocess.call(cmd, env=dict(os.environ, PYTHONPATH=setuptools_path)) != 0:
160 | raise Exception(
|
126 | for o in rdate: rs.rdate(o)
127 | for o in exrule: rs.exrule(o)
|
src/icalendar/timezone/zoneinfo.py:126:19: E701 Multiple statements on one line (colon)
|
124 | rs = rruleset(cache)
125 | for o in rrule: rs.rrule(o)
126 | for o in rdate: rs.rdate(o)
| ^ E701
127 | for o in exrule: rs.exrule(o)
128 | for o in exdate: rs.exdate(o)
|
src/icalendar/timezone/zoneinfo.py:127:20: E701 Multiple statements on one line (colon)
|
125 | for o in rrule: rs.rrule(o)
126 | for o in rdate: rs.rdate(o)
127 | for o in exrule: rs.exrule(o)
| ^ E701
128 | for o in exdate: rs.exdate(o)
129 | return rs
|
src/icalendar/timezone/zoneinfo.py:128:20: E701 Multiple statements on one line (colon)
|
126 | for o in rdate: rs.rdate(o)
127 | for o in exrule: rs.exrule(o)
128 | for o in exdate: rs.exdate(o)
| ^ E701
129 | return rs
|
Found 71 errors.
[*] 4 fixable with the `--fix` option (4 hidden fixes can be enabled with the `--unsafe-fixes` option).
Error: Process completed with exit code 1.
Also, one can run ruff format
to format files in case ruff can actually do the work for us.
Totals | |
---|---|
Change from base Build 9767068472: | 0.0% |
Covered Lines: | 3078 |
Relevant Lines: | 3155 |
We can describe how to test files, too:
#pyproject.toml
[tool.ruff]
target-version = "py38"
[tool.ruff.lint]
select = ["ALL"]
ignore = [
"ANN", # flake8-annotations
"B020", # Loop control variable {name} overrides iterable it iterates
"C401", # Unnecessary generator (rewrite as a set comprehension)
"C901", # {name} is too complex ({complexity} > {max_complexity})
"COM812", # Trailing comma missing
"D1", # Missing docstring
"D2", # docstrings stuffs
"D4", # docstrings stuffs
"EM10", # Exception string usage
"ERA001", # Found commented-out code
"FBT002", # Boolean default positional argument in function definition
"FIX", # TODO comments
"ISC001", # Implicitly concatenated string literals on one line (to avoid with formatter)
"N818", # Exception name {name} should be named with an Error suffix
"PLR091", # Too many things (complexity, arguments, branches, etc...)
"PLR2004", # Magic value used in comparison, consider replacing {value} with a constant variable
"RUF012", # Mutable class attributes should be annotated with typing.ClassVar
"RUF015", # Prefer next({iterable}) over single element slice
"S101", # Use of assert detected
"TD", # TODO comments
"TRY003", # Avoid specifying long messages outside the exception class
"S104", # Possible binding to all interfaces
"E722", # Do not use bare `except`
"RUF005", # Consider iterable unpacking instead of concatenation
"DTZ005", # `datetime.datetime.now()` called without a `tz` argument
"PERF401", # Use a list comprehension to create a transformed list
"ARG002", # Unused method argument: ...
"ARG001", # Unused function argument: ...
]
extend-safe-fixes = [
"PT006", # Wrong type passed to first argument of @pytest.mark.parametrize; expected {expected_string}
]
[tool.ruff.lint.per-file-ignores]
"test/*" = [
"B011", # Do not assert False (python -O removes these calls), raise AssertionError()
"DTZ001", # datetime.datetime() called without a tzinfo argument
"E501", # Indentation is not a multiple of {indent_size}
"N802", # Function name {name} should be lowercase
"PT011", # pytest.raises({exception}) is too broad, set the match parameter or use a more specific exception
"PT012", # pytest.raises() block should contain a single simple statement
"PT015", # Assertion always fails, replace with pytest.fail()
"T201", # print found
"T203", # `pprint` found
"RUF001", # String contains ambiguous character
]
"features/*" = [
"F811", # Redefinition of unused `step_impl` from line 52
"T201", # `print` found
]
"static/js/dhtmlx/locale/convert.py" = [
"INP001", # File `static/js/dhtmlx/locale/convert.py` is part of an implicit namespace package. Add an `__init__.py`
"T201", # print found
"PTH123",
"S307",
"PTH103",
"PLW2901"
]
"docs/hooks/set_canonical_url.py" = [
"INP001" # File `docs/hooks/set_canonical_url.py` is part of an implicit namespace package. Add an `__init__.py`.
]
This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.
Totals | |
---|---|
Change from base Build 9767068472: | 0.0% |
Covered Lines: | 3078 |
Relevant Lines: | 3155 |
changelog added ... merging. Thanks for the review!
This contributes to #672