From 7b3e7741394e5366faab3e0424c40ba96745fb1f Mon Sep 17 00:00:00 2001 From: Sebastian Wagner Date: Mon, 2 Aug 2021 19:04:07 +0200 Subject: [PATCH] mypy.ini: Globally enable `disallow_untyped_defs = True` Plus introduce an ignorelist of all modules that are not compatible yet. Signed-off-by: Sebastian Wagner --- src/mypy.ini | 112 +++++++++++++++++---------------------------------- 1 file changed, 36 insertions(+), 76 deletions(-) diff --git a/src/mypy.ini b/src/mypy.ini index 191dde3b4f3..ccb614d714c 100755 --- a/src/mypy.ini +++ b/src/mypy.ini @@ -5,6 +5,7 @@ warn_incomplete_stub = True check_untyped_defs = True show_error_context = True allow_redefinition = True +disallow_untyped_defs = True [mypy-rados] # This would require a rados.pyi file @@ -18,86 +19,10 @@ ignore_missing_imports = True # This would require a cephfs.pyi file ignore_missing_imports = True -[mypy-ceph_daemon] -disallow_untyped_defs = True - # python-common -[mypy-ceph.*] -disallow_untyped_defs = True [mypy-ceph.tests.*] -disallow_untyped_defs = False ignore_errors = True -[mypy-mgr_util] -disallow_untyped_defs = True - -[mypy-alerts.*] -disallow_untyped_defs = True - -[mypy-cephadm.*] -disallow_untyped_defs = True - -[mypy-crash.*] -disallow_untyped_defs = True - -[mypy-devicehealth.*] -disallow_untyped_defs = True - -[mypy-diskprediction_local.*] -disallow_untyped_defs = True - -[mypy-hello.*] -disallow_untyped_defs = True - -[mypy-iostat.*] -disallow_untyped_defs = True - -[mypy-localpool.*] -disallow_untyped_defs = True - -[mypy-mds_autoscaler.*] -disallow_untyped_defs = True - -[mypy-nfs.*] -disallow_untyped_defs = True - -[mypy-orchestrator.*] -disallow_untyped_defs = True - -[mypy-prometheus.*] -disallow_untyped_defs = True - -[mypy-pg_autoscaler.*] -disallow_untyped_defs = True - -[mypy-rbd_support.*] -disallow_untyped_defs = True - -[mypy-rook.*] -disallow_untyped_defs = True - -[mypy-selftest.*] -disallow_untyped_defs = True - -# external import -[mypy-rook.rook_client.*] -disallow_untyped_defs = False - -[mypy-snap_schedule.*] -disallow_untyped_defs = True - -[mypy-telegraf.*] -disallow_untyped_defs = True - -[mypy-status.*] -disallow_untyped_defs = True - -[mypy-telemetry.*] -disallow_untyped_defs = True - -[mypy-zabbix.*] -disallow_untyped_defs = True - # Make cephadm and rook happy [mypy-OpenSSL] ignore_missing_imports = True @@ -156,3 +81,38 @@ ignore_missing_imports = True [mypy-ceph_argparse] # more work to do ignore_errors = True + +# MGR modules not yet completely annotated: + +[mypy-balancer.*] +disallow_untyped_defs = False + +[mypy-ceph_module] +disallow_untyped_defs = False + +[mypy-dashboard.*] +disallow_untyped_defs = False + +[mypy-influx.*] +disallow_untyped_defs = False + +[mypy-mgr_module] +disallow_untyped_defs = False + +[mypy-mirroring.*] +disallow_untyped_defs = False + +[mypy-progress.*] +disallow_untyped_defs = False + +[mypy-rook.rook_client._helper] +disallow_untyped_defs = False + +[mypy-stats.*] +disallow_untyped_defs = False + +[mypy-test_orchestrator.*] +disallow_untyped_defs = False + +[mypy-volumes.*] +disallow_untyped_defs = False