agronholm / typeguard

Run-time type checker for Python
Other
1.5k stars 112 forks source link

`pytest` configuration from `pyproject.toml` #440

Closed jamesbraza closed 5 months ago

jamesbraza commented 6 months ago

Things to check first

Feature description

My request is to be able to configure pytest integration within a pyproject.toml, like so:

# pyproject.toml

[tool.pytest.ini_options]
typeguard_packages = ["mypackage"]

I find this preferable to command line options

Use case

Configuring pytest like all my other plug-ins, from parameters in pyproject.toml

agronholm commented 5 months ago

I wonder what is needed to support this.

agronholm commented 5 months ago

Oh, looks like parser.addini() was what it needed.