Open
Description
Bug description
With mypy
installed on my system, when enabling flycheck-mode
on a file opened through TRAMP with:
/su:user@localhost:/home/user/my-dir/my-file.py
I get the following error message:
Suspicious state from syntax checker python-mypy: Flycheck checker python-mypy returned 2, but its output contained no errors: mypy: can't read file '/su:user@localhost:/home/user/my-dir/my-file.py': No such file or directory
There is probably some Elisp function for getting the actual path of the current file, rather than the full one. This issue could affect other syntax checkers.
Steps to reproduce
Steps to reproduce the behavior:
- Create a file
~/a.py
. - Open through
/su:your-user@localhost:~/a.py
. - Enable
flycheck-mode
withmypy
installed. - See error.
Expected behavior
No errors, and syntax checking.
System configuration
Syntax checkers for buffer my-file.py in python-mode:
First checker to run:
python-flake8
- may enable: yes
- executable: Found at /usr/bin/python3
- configuration file: Not found
- `flake8' module: Found at "/usr/lib/python3.13/site-packages/flake8/__init__.py"
- next checkers: python-pylint, 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 /usr/bin/mypy
- configuration file: Not found
Checkers that could run if selected:
python-pycompile select
- may enable: yes
- executable: Found at /usr/bin/python3
- next checkers: python-mypy
python-pyright select
- may enable: yes
- executable: Found at /usr/bin/pyright
Checkers that are compatible with this mode, but will not run until properly configured:
python-ruff (automatically disabled) reset
- may enable: no
- executable: Not found
- configuration file: Not found
- next checkers: python-mypy
python-pylint (automatically disabled) reset
- may enable: no
- executable: Found at /usr/bin/python3
- configuration file: Not found
- `pylint' module: Missing; sys.path is ['/usr/lib/python313.zip', '/usr/lib/python3.13', '/usr/lib/python3.13/lib-dynload', '/home/username/.local/lib/python3.13/site-packages', '/usr/lib/python3.13/site-packages']
- next checkers: python-mypy
Flycheck Mode is enabled. Use C-u C-c ! x to enable disabled checkers.
--------------------
Flycheck version: 35.0-snapshot
Emacs version: 29.4
System: x86_64-pc-linux-gnu
Window system: x
Emacs configuration:
- Plain Emacs / Custom configuration
- Spacemacs
- Doom Emacs
- Other shared configuration