question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Support for pyproject.toml as config file format

See original GitHub issue

PEP 518 specifies a config format that can be exploited by dev tools through designated sections, given their pyPI domain. The toml format is very basic and should allow a simple 1 to 1 mapping of the existing config, since it is more on the minimal side. Given the following .bandit file:

[bandit]
targets: src
skips: B101,B110

Its section in a pyproject.toml would look like this:

[tool.bandit]
targets = ["src"]
skips = ["B101", "B110"]

The sole gain of supporting this would be to reduce the amount of additional config files needed for using bandit in a python project that uses PEP 518 in some way from 1 to 0.


Discussions on other tools regarding the same issue:

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:36
  • Comments:11 (2 by maintainers)

github_iconTop GitHub Comments

17reactions
moon-bitscommented, May 12, 2021

@ericwb I’m sorry to say that: But this is getting ridiculous.

There is a pending PR https://github.com/PyCQA/bandit/pull/401 since October 2018, and you waste the time of the poor guy that still maintains the branch to keep it free from merge conflicts.

Just merge it and please don’t block it unnecessarily. We wait since 2 years for that feature that has been already implemented.

16reactions
derek-millercommented, Jun 22, 2021

Any update here? Can you either merge the PR or reject it? Nearly all other linting related packages have support for pyproject.toml at this point and a shame users still need to use multiple configuration files for a solved problem.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Configuring setuptools using pyproject.toml files
The example below illustrates how to write a pyproject.toml file that can be used with setuptools . ... Discouraged - check Data Files...
Read more >
The pyproject.toml file | Documentation | Poetry
The pyproject.toml file The tool.poetry section of the pyproject.toml file is composed of multiple sections. name The name of the package.
Read more >
Python and TOML: New Best Friends - Real Python
TOML is a configuration file format that's becoming increasingly popular in the Python community. In this tutorial, you'll learn the syntax ...
Read more >
The basics - Black 22.12.0 documentation
Configuration format # · pyproject.toml is a TOML file. It contains separate sections for different tools. Black is using the · [tool.black] section....
Read more >
Configuration with TOML and INI files - pydoit guide
doit configuration can be read from pyproject.toml under the tool.doit namespace. This is the preferred configuration source, and may gain features not ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found