[x] I have verified there are no duplicate active or recent bugs, questions, or requests
[x] I have verified that I am using the latest version of the plugin.
Step 2: Describe your environment
Plugin version: 0.16.2
PyCharm/IDEA version: Pycharm Professional 2023.3 (Mac)
Mypy version: 1.8.0
Step 3: Describe the problem:
The mypy plugin does not appear to respect (or pick up) the exclude directive in a mypy config file. This applies when running all scans (Project/Module/Modified Files/Current Change List). It applies whether I try to ignore one file or multiple files, and whether they are at the root directory or not. Below, I have illustrated the problem with bazelisk.py.
This is the basic structure of the mypy.ini file (note the leading and trailing newlines):
[mypy]
exclude = (?x)(bazelisk\.py)
I have tried different variations of the exclude directive, including the below:
[mypy]
exclude = (?x)(
^one\.py$ # files named "one.py"
| two\.pyi$ # or files ending with "two.pyi"
| ^three\. # or files starting with "three."
)
They also note that "The above is equivalent to: (^one\.py$|two\.pyi$|^three\.)."
These are my mypy settings:
I have tried setting the config file both in the Path to config file window and in the Arguments window.
Steps to reproduce:
Add a file called bazelisk.py with mypy errors (I used this file). Note that I added this file in the root folder, but the issue appears to occur no matter the location of the file.
Run any of the mypy checks (Project/Module/Modified Files/Current Change List) in the mypy tab.
Step 1: Are you in the right place?
Step 2: Describe your environment
0.16.2
Pycharm Professional 2023.3 (Mac)
1.8.0
Step 3: Describe the problem:
The mypy plugin does not appear to respect (or pick up) the exclude directive in a mypy config file. This applies when running all scans (Project/Module/Modified Files/Current Change List). It applies whether I try to ignore one file or multiple files, and whether they are at the root directory or not. Below, I have illustrated the problem with bazelisk.py.
This is the basic structure of the
mypy.ini
file (note the leading and trailing newlines):I have tried different variations of the exclude directive, including the below:
exclude = bazelisk\.py
exclude = bazelisk.py
exclude = ^bazelisk.py
exclude = ^bazelisk.py$
exclude = ^bazelisk\.py$
exclude = bazelisk\.py$
exclude = "bazelisk\.py"
exclude = (?x)(bazelisk\.py)
Mypy provides the following example file format:
They also note that "The above is equivalent to:
(^one\.py$|two\.pyi$|^three\.)
."These are my mypy settings:
I have tried setting the config file both in the Path to config file window and in the Arguments window.
Steps to reproduce:
Observed Results:
Mypy found errors in bazelisk.py
Expected Results:
Mypy should not find errors in bazelisk.py