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

417
Views
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 answers
Answer question

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 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!