Skip to content

Some options are not parsed correctly from setup.cfg #3630

@zedrdave

Description

@zedrdave

With this recent PR, pylint is supposed to support loading options through setup.cfg.

I am finding that while it loads some options fine, it fails to load many options (a little unclear on why, but it seems to come down to the section where they are defined). E.g, this works:

[tool.pylint.MASTER]
init-hook="from pylint.config import find_pylintrc; import os, sys; sys.path.append(os.path.dirname(find_pylintrc())); "

This does not:

[tool.pylint.MASTER]
load-plugins=pylint_flask,pylint_flask_sqlalchemy

Oddly, this does:

[MASTER]
load-plugins=pylint_flask,pylint_flask_sqlalchemy

But neither of these two works:

[tool.pylint.FORMAT]
max-line-length=220
ignore-long-lines=[a-z]*

[FORMAT]
max-line-length=220
ignore-long-lines=[a-z]*

and yet, this works:

[tool.pylint.FORMAT]
good-names-rgxs=[a-z]

All these options work fine if I add them to a pylintrc file, so it does not seem to be an issue of format.

I have looked through the code a bit (which is how I was able to figure out that load-plugins worked with the short section name), but I cannot figure out what it is doing with these missing FORMAT options…

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions