Skip to content

max-doc-length option is ignored #1837

@kushalkolar

Description

@kushalkolar

how did you install flake8?

pip install flake8

unmodified output of flake8 --bug-report

{
  "platform": {
    "python_implementation": "CPython",
    "python_version": "3.11.3",
    "system": "Linux"
  },
  "plugins": [
    {
      "plugin": "mccabe",
      "version": "0.7.0"
    },
    {
      "plugin": "pycodestyle",
      "version": "2.10.0"
    },
    {
      "plugin": "pyflakes",
      "version": "3.0.1"
    }
  ],
  "version": "6.0.0"
}

describe the problem

Setting the max-doc-length option in setup.cfg doesn't seem to have an effect, it is only following the max-line-length option.

Example of running flake8 on this file:

https://github.com/kushalkolar/fastplotlib/blob/4352a5ea3e0701ab5a740c8db8fcbabc458e58a2/fastplotlib/graphics/_features/_colors.py#L14-L34

The docstring table is long, our codebase has many long tables in docstrings and we want flake8 to ignore them.

called:

flake8 fastplotlib/graphics/_features/_colors.py 

output:

fastplotlib/graphics/_features/_colors.py:20:121: E501 line too long (131 > 120 characters)
fastplotlib/graphics/_features/_colors.py:22:121: E501 line too long (131 > 120 characters)
fastplotlib/graphics/_features/_colors.py:25:121: E501 line too long (130 > 120 characters)
fastplotlib/graphics/_features/_colors.py:27:121: E501 line too long (131 > 120 characters)

My setup.cfg

[flake8]
max-line-length = 120
max-doc-length = 200
ignore = F403,F405,F541

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions