chore: set default max_module_depth to 0

Signed-off-by: Akhil Narang <me@akhilnarang.dev>
This commit is contained in:
Akhil Narang 2024-12-04 11:18:34 +05:30
parent 2fda32887c
commit c3bcfdead5
No known key found for this signature in database
GPG key ID: 9DCC61E211BF645F

View file

@ -156,7 +156,7 @@ def _decorate_all_methods_and_functions_with_type_checker():
for app in (apps := frappe.get_installed_apps()): for app in (apps := frappe.get_installed_apps()):
config = _get_config_from_pyproject(frappe.get_app_source_path(app)) config = _get_config_from_pyproject(frappe.get_app_source_path(app))
max_depth = config.get("max_module_depth", float("inf")) max_depth = config.get("max_module_depth", 0)
skip_namespaces = config.get("skip_namespaces", []) skip_namespaces = config.get("skip_namespaces", [])
logger.info(f"Adding type validator in {app!r} (up to level {max_depth})...") logger.info(f"Adding type validator in {app!r} (up to level {max_depth})...")
pkg = frappe.get_module(app) pkg = frappe.get_module(app)