Skip to content

Commit

Permalink
Identify Pylint configuration in .ini and .cfg files where the
Browse files Browse the repository at this point in the history
sections are named `[pylint]` or `[pylint.X]`, where `X` is an arbitrary
value.
  • Loading branch information
mbyrnepr2 committed Jun 12, 2024
1 parent 5084f0f commit 75580c9
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion pylint/config/find_default_config_files.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,10 @@ def _cfg_has_config(path: Path | str) -> bool:
parser.read(path, encoding="utf-8")
except configparser.Error:
return False
return any(section.startswith("pylint.") for section in parser.sections())
return any(
section == "[pylint]" or section.startswith("pylint.")
for section in parser.sections()
)


def _yield_default_files() -> Iterator[Path]:
Expand Down

0 comments on commit 75580c9

Please sign in to comment.