Skip to content

Exclude doesn't work with files #11760

@Timmmm

Description

@Timmmm

Bug Report

If you specify some files for mypy to find with the files = config option, then exclude can't let you ignore them. E.g.

To Reproduce

$ cat mypy.ini
[mypy]
files = **/*.py
exclude = .*
$ cat foo/bar.py 
asdsdfsdf
$ mypy
foo/bar.py:1: error: Name "asdsdfsdf" is not defined
Found 1 error in 1 file (checked 1 source file)

Expected Behavior

exclude should override files.

Your Environment

  • Mypy version used: 0.910
  • Mypy command-line flags: See above
  • Mypy configuration options from mypy.ini (and other config files): See above
  • Python version used: 3.8
  • Operating system and version: Centos of some kind

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugmypy got something wrong

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions