lint-action icon indicating copy to clipboard operation
lint-action copied to clipboard

Add ruff

Open pickfire opened this issue 1 year ago • 6 comments

Fix #603

pickfire avatar Mar 21 '23 15:03 pickfire

The test failures seemed unrelated.

pickfire avatar Mar 21 '23 16:03 pickfire

I don't get why is black linter failing in the tests.

pickfire avatar Jun 06 '23 23:06 pickfire

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 avatar Sep 03 '23 18:09 fvalverd

@fvalverd, tests still seem to be failing

tylerlaprade avatar Oct 09 '23 13:10 tylerlaprade

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 and black, probably the syntax of the output is the problem, but I don't have access to that OS to corroborate the problem

fvalverd avatar Oct 09 '23 14:10 fvalverd

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"
  }
]

luzfcb avatar Oct 31 '23 23:10 luzfcb