lint-action
lint-action copied to clipboard
Add ruff
Fix #603
The test failures seemed unrelated.
I don't get why is black linter failing in the tests.
I don't get why is black linter failing in the tests.
mypy
and black
latest version are failing because the output format changed, I provided you a PR with the necessary changes to make them pass in here https://github.com/pickfire/lint-action/pull/1/files
@fvalverd, tests still seem to be failing
There are 3 failures:
-
macos: that is
swift
, nothing to do with this PR or Python in general -
ubuntu: that is also
swift
, it has nothing to do with this PR or Python in general -
windows: those are related to
ruff
andblack
, probably the syntax of the output is the problem, but I don't have access to that OS to corroborate the problem
I don't know if it makes anything easier, but ruff
currently supports some output formats, such as github
and json
https://docs.astral.sh/ruff/settings/#output-format
$ ruff check --output-format github .
::error title=Ruff (C408),file=/home/luzfcb/projects/labcodes/pythondotorg/events/tests/test_utils.py,line=36,col=17,endLine=36,endColumn=60::events/tests/test_utils.py:36:17: C408 Unnecessary `dict` call (rewrite as a literal)
$ ruff check --output-format json .
[
{
"cell": null,
"code": "C408",
"end_location": {
"column": 60,
"row": 36
},
"filename": "/home/luzfcb/projects/labcodes/pythondotorg/events/tests/test_utils.py",
"fix": null,
"location": {
"column": 17,
"row": 36
},
"message": "Unnecessary `dict` call (rewrite as a literal)",
"noqa_row": 36,
"url": "https://docs.astral.sh/ruff/rules/unnecessary-collection-call"
}
]