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

418
Visualizações
Per-project flake8 max line length?

I'm using a Flake8 git hook in my project and I want to relax the line length limit, but only for one project. Given that it looks like there's no clear API for that, how do I modify this hook to do that? Alternatively, is there a git-config setting or an environment variable that would let me set that? Here's the hook source code:

#!/usr/bin/env python
import os
import sys
import logging
import os.path as P

from flake8.main import git


if __name__ == '__main__':
    ret = git.hook(
        strict=git.config_for('strict'),
        lazy=git.config_for('lazy'),
    )
    if ret:
        sys.exit(ret)
over 4 years ago · Santiago Trujillo
1 Respostas
Responde à pergunta

0

Use the setup.cfg file in each project. This file is read by various Python-related tools, including pep8 (see pep8's documentation) and flake8.

The documentation for setup.cfg with flake8 is in the Configuring Flake8 chapter. In short, you want a setup.cfg file with this content (obviously, adjust the 99 to your needs):

[flake8]
max-line-length = 99

If you don't want to create a setup.cfg file, you can also specify this as an argument to the command:

flake8 --max-line-length 99
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