Python Analyzer now reads 'max_line_length' from existing configs

The Python Analyzer has a max_line_length option that you can set in your .deepsource.toml file, to customize the maximum line length you want in your Python files:

[[analyzers]]
name = "python"
enabled = true

  [analyzers.meta]
  max_line_length = 100

More information on these meta attributes can be found in our docs.

Since tools like flake8 already support setting a maximum line length in their own config files, we have added support for our analyzers to respect that config.

The Python Analyzer will now look for a max_line_length parameter inside any existing flake8 config, in .flake8, setup.cfg or tox.ini files, and use that if possible. Note that if max_line_length is already defined in .deepsource.toml, that setting will be given a preference over other config files.

1 Like