8000 Full TRAMP path used when calling `python-mypy` · Issue #2122 · flycheck/flycheck · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Full TRAMP path used when calling python-mypy #2122
Open
@8dcc

Description

@8dcc

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:

  1. Create a file ~/a.py.
  2. Open through /su:your-user@localhost:~/a.py.
  3. Enable flycheck-mode with mypy installed.
  4. 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0