From 3495a7ef364fbb4d5ba36d75eb39003fa03dfcb2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=A0ar=C5=ABnas=20Nejus?= Date: Wed, 16 Jul 2025 14:00:29 +0100 Subject: [PATCH] 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. --- setup.cfg | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/setup.cfg b/setup.cfg index e999b55d3..0b50485ea 100644 --- a/setup.cfg +++ b/setup.cfg @@ -15,7 +15,7 @@ markers = data_file = .reports/coverage/data branch = true relative_files = true -omit = +omit = beets/test/* beetsplug/_typing.py @@ -34,7 +34,6 @@ exclude_also = show_contexts = true [mypy] -files = beets,beetsplug,test,extra,docs 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 @@ -46,11 +45,8 @@ explicit_package_bases = true # config for all files. [[mypy-beets.plugins]] disallow_untyped_decorators = true -disallow_any_generics = true check_untyped_defs = true -allow_redefinition = true [[mypy-beets.metadata_plugins]] disallow_untyped_decorators = true -disallow_any_generics = true check_untyped_defs = true