You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When the python-ruff checker is used in a buffer for which special ignore-rules apply (can be set via e.g. [lint.extend-per-file-ignores] in ruff.toml), these ignore-rules are not considered.
It seems as if this is due to the value of default-directory, which is used for running ruff.
When I run flycheck-compile on a python file in mypkg/ in my project, it shows that
are not considered. Therefore, a D103 warning (missing docstring in public function) is reported by flycheck/python-ruff for every public function in mymod.py without a docstring.
Expected behavior
I expect that ruff specific settings in my project ruff.toml/pyproject.toml are not ignored.
System configuration
Syntax checkers for buffer mymod.py in python-ts-mode:
First checker to run:
python-ruff
- may enable: yes
- executable: Found at /home/thomashisch/miniconda3/bin/ruff
- configuration file: Found at "/tmp/ruff-example/ruff.toml"
- next checkers: python-mypy
Checkers that may run as part of the first checker's chain:
python-mypy
- may enable: yes
- may run: t
- executable: Found at /home/thomashisch/micromamba/envs/py_secs/bin/mypy
- configuration file: Not found
Checkers that could run if selected:
python-pylint select
- may enable: yes
- executable: Found at /home/thomashisch/micromamba/envs/py_secs/bin/python
- configuration file: Found at "/home/thomashisch/.pylintrc"
- `pylint' module: Found at "/home/thomashisch/micromamba/envs/py_secs/lib/python3.12/site-packages/pylint/__init__.py"
- next checkers: python-mypy
python-pycompile select
- may enable: yes
- executable: Found at /home/thomashisch/miniconda3/bin/python3
- next checkers: python-mypy
Checkers that are compatible with this mode, but will not run until properly configured:
python-flake8 (automatically disabled) reset
- may enable: no
- executable: Found at /home/thomashisch/miniconda3/bin/python3
- configuration file: Not found
- `flake8' module: Missing; sys.path is ['/home/thomashisch/miniconda3/lib/python311.zip', '/home/thomashisch/miniconda3/lib/python3.11', '/home/thomashisch/miniconda3/lib/python3.11/lib-dynload', '/home/thomashisch/.local/lib/python3.11/site-packages', '/home/thomashisch/miniconda3/lib/python3.11/site-packages', '/home/thomashisch/main/site_python']
- next checkers: python-pylint, python-mypy
python-pyright (automatically disabled) reset
- may enable: no
- executable: Not found
Flycheck Mode is enabled. Use C-u C-c ! x to enable disabled checkers.
--------------------
Flycheck version: 20240317.606
Emacs version: 30.0.50
System: x86_64-pc-linux-gnu
Window system: x
Emacs configuration:
Plain Emacs / Custom configuration
Spacemacs
Doom Emacs
Other shared configuration
Additional notes
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered:
Checklist
Bug description
When the
python-ruff
checker is used in a buffer for which special ignore-rules apply (can be set via e.g.[lint.extend-per-file-ignores]
inruff.toml
), these ignore-rules are not considered.It seems as if this is due to the value of
default-directory
, which is used for runningruff
.When I run
flycheck-compile
on a python file inmypkg/
in my project, it shows thatruff check --config /tmp/ruff-example/ruff.toml --output-format\=text --stdin-filename /tmp/ruff-example/mypkg/mymod.py - < /tmp/ruff-example/mypkg/mymod.py
is called in
/tmp/ruff-example/mypkg
.My
ruff.toml
file exists in the project root:/tmp/ruff-example
.Since ruff is not called in the project-root, my special ignore extensions:
are not considered. Therefore, a D103 warning (missing docstring in public function) is reported by flycheck/python-ruff for every public function in
mymod.py
without a docstring.Expected behavior
I expect that ruff specific settings in my project ruff.toml/pyproject.toml are not ignored.
System configuration
Emacs configuration:
Additional notes
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: