beets/setup.cfg
Šarūnas Nejus 3495a7ef36
Update mypy config
Remove 'files' configuration from the config to make sure that mypy runs
quicker when invoked from the editor (where ideally it should only check
the file being edited).

Remove 'disallow_any_generics' from the config since we already have
this configured centrally.

And finally, do not allow variable redefinitions.
2025-07-16 14:15:27 +01:00

52 lines
1.3 KiB
INI

[tool:pytest]
# do not litter the working directory
cache_dir = /tmp/pytest_cache
# slightly more verbose output
console_output_style = count
addopts =
# show all skipped/failed/xfailed tests in the summary except passed
-ra
--strict-config
markers =
on_lyrics_update: mark a test to run only after lyrics source code is updated
integration_test: mark a test as an integration test
[coverage:run]
data_file = .reports/coverage/data
branch = true
relative_files = true
omit =
beets/test/*
beetsplug/_typing.py
[coverage:report]
precision = 2
skip_empty = true
show_missing = true
exclude_also =
@atexit.register
if TYPE_CHECKING
if typing.TYPE_CHECKING
raise AssertionError
raise NotImplementedError
[coverage:html]
show_contexts = true
[mypy]
allow_any_generics = false
# FIXME: Would be better to actually type the libraries (if under our control),
# or write our own stubs. For now, silence errors
ignore_missing_imports = true
namespace_packages = true
explicit_package_bases = true
# Temporary, until we decide on a mypy
# config for all files.
[[mypy-beets.plugins]]
disallow_untyped_decorators = true
check_untyped_defs = true
[[mypy-beets.metadata_plugins]]
disallow_untyped_decorators = true
check_untyped_defs = true