Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

386
Views
MyPy configuration - exclude multiple directories

We're currently using Mypy (v 0.910) in our project with pyproject.toml for configuration.

I have the following file structure:

src
  --app
    --generated
    --service
    --data
  --ingest

pyproject.toml:

...
[tool.mypy]
python_version = 3.8
disallow_untyped_defs = true
exclude = "(src/app/generated)|(src/ingest)"
...

When running with this configuration, the src/ingest folder is ignored, but not the src/app/generated folder. To test the regex, I also tried:

...
[tool.mypy]
python_version = 3.8
disallow_untyped_defs = true
exclude = "(src/app)|(src/ingest)"
...
mypy src --config-file ./pyproject.toml 
Success: no issues found in 1 source file

which successfully ignored all files. I'm wondering why the first example is not ignoring src/app/generated folder.

over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

Following should work:

[tool.mypy]
python_version = 3.8
disallow_untyped_defs = true
exclude = "src/(app|ingest)"
over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!