Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

387
Visualizações
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 Respostas
Responde à pergunta

0

Following should work:

[tool.mypy]
python_version = 3.8
disallow_untyped_defs = true
exclude = "src/(app|ingest)"
over 4 years ago · Santiago Trujillo Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda