klen / pylama

Code audit tool for python.
MIT License
1.05k stars 99 forks source link

Add optional TOML configuration support #222

Closed villainy closed 2 years ago

villainy commented 2 years ago

Adds support for TOML configuration files, in particular pyproject.toml inside a [tool.pylama] section.

This seemed like the least intrusive way to add support. Reuses the existing vendored inirama with a simple shim to parse TOML tables. The resulting objectis still just a inirama.Namespace so no usage changes are needed. All behind a toml extras for anyone who doesn't want to pull in the added dependency.

Needed a couple pylint config changes for tests to pass on current pylint version 2.14.4:

klen commented 2 years ago

@villainy The great PR! Thank you very match!