Commit Graph

9 Commits

Author SHA1 Message Date
Walter Kaunda 5cc6b933b1
Fix python linting/formatting error when in virtual environment (#4865)
Python fixers and linters were failing when vim is running in a virtual
environment that's located in a path containing text `poetry`. The cause
of this was the regular expression `poetry\|pipenv\|uv$` which matches
`poetry` and `pipenv` if they appear anywhere in the virtualenv path.
2024-11-17 11:00:55 +09:00
Diego Henrique Oliveira a7ef1817b7
Improve support for python package manage: pipenv, poetry and uv (#4825) 2024-09-05 15:37:30 +09:00
w0rp 3220b94d20
Fix #4714 - Handle ruff garbage
When ruff outputs errors are invalid JSON text, handle that and stop ALE
from throwing exceptions.
2024-07-08 03:22:46 +01:00
Yining d19b238aa2
fix: force `--no-fix` when `ruff` used as a linter (#4759)
this commit is to fix #4756 which suggests to force disable applying
fixes when linting, particularly when `fix = true` was set in project
`pyproject.toml` file.

The flag `--no-fix` was added without checking the version of `ruff` at
this moment as it seems to be available in a quite early version.
2024-04-26 18:29:17 +09:00
Yining b01c0b23bb
Fix: ruff version `0.3.0` cli breaking changes (#4732)
This commit appends `check` to the ruff executable if the version of
specified ruff executable is `>= 0.3.0`, as ruff version `0.3.0`
deprecates `ruff <path>` in favor of `ruff check <path>`:

https://github.com/astral-sh/ruff/releases/tag/v0.3.0
2024-03-02 08:31:19 +09:00
Finn Steffens 9a23ec1f60
Ruff use json-lines output format (#4656)
* Ruff use json-lines output format
* Fix Ruff: add -q to prevent non json output

Using the json-lines output format allows for setting of the end_line,
end_col and code field of the handle output.

Additionally, the first letter of the code is used to determine the type
field.

Co-authored-by: w0rp <w0rp@users.noreply.github.com>
2023-12-10 11:45:01 +00:00
Adam Blackwater 50e237facd
Fix: Ruff output option (#4632)
* fix --output-format option
* Add conditionally changing flag based on Ruff version
2023-11-08 21:44:11 +00:00
Actionless Loveless 26c79014f5
fix(ale_linters: python: ruff): add --stdin-filename if version > 0.0.69 (#4414) 2023-01-27 09:03:41 +09:00
Yining 483d056528
add: support for ruff as a Python linter and fixer (#4347)
this commit adds ruff as both a Python linter and fixer, together with
some tests and documentation.

ruff repo: https://github.com/charliermarsh/ruff
2022-10-31 21:55:14 +09:00