Merge pull request #28655 from akhilnarang/change-default-max-module-depth

chore: set default `max_module_depth` to 0
This commit is contained in:
Akhil Narang 2024-12-04 17:33:19 +05:30 committed by GitHub
commit a1296433b0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -156,7 +156,7 @@ def _decorate_all_methods_and_functions_with_type_checker():
for app in (apps := frappe.get_installed_apps()):
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", [])
logger.info(f"Adding type validator in {app!r} (up to level {max_depth})...")
pkg = frappe.get_module(app)