Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

388
Vistas
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 Respuestas
Responde la pregunta

0

Following should work:

[tool.mypy]
python_version = 3.8
disallow_untyped_defs = true
exclude = "src/(app|ingest)"
over 4 years ago · Santiago Trujillo Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda