diff --git a/docs/release-notes.md b/docs/release-notes.md index 9c2e8cf..1ba60db 100644 --- a/docs/release-notes.md +++ b/docs/release-notes.md @@ -1,5 +1,12 @@ # Release notes + +## Version 0.0.6 + +### Fixed + +- Re-exports were not detected correctly. + ## Version 0.0.5 ### Added diff --git a/monkay/__about__.py b/monkay/__about__.py index 23f4b09..55bd0b1 100644 --- a/monkay/__about__.py +++ b/monkay/__about__.py @@ -1,4 +1,4 @@ # SPDX-FileCopyrightText: 2024-present alex # # SPDX-License-Identifier: BSD-3-Clauses -__version__ = "0.0.5" +__version__ = "0.0.6" diff --git a/monkay/base.py b/monkay/base.py index 92e69ff..62cb1f5 100644 --- a/monkay/base.py +++ b/monkay/base.py @@ -454,8 +454,8 @@ def find_missing( value_pathes_set.add(absolutify_import(found_path, self.package)) try: obj = self.getter(name, no_warn_deprecated=True, check_globals_dict="fail") - if not found_path: - value_pathes_set.add(_obj_to_full_name(obj)) + # also add maybe rexported path + value_pathes_set.add(_obj_to_full_name(obj)) except InGlobalsDict: missing.setdefault(name, set()).add("shadowed") except ImportError: @@ -487,12 +487,17 @@ def find_missing( continue for export_name in all_var_search: export_path = absolutify_import(f"{search_path}.{export_name}", self.package) - if export_path not in value_pathes_set: - missing.setdefault(export_path, set()).add("search_path_extra") try: - getattr(mod, export_name) + # for re-exports + obj = getattr(mod, export_name) except AttributeError: missing.setdefault(export_path, set()).add("missing_attr") + # still check check the export path + if export_path not in value_pathes_set: + missing.setdefault(export_path, set()).add("search_path_extra") + continue + if export_path not in value_pathes_set and _obj_to_full_name(obj) not in value_pathes_set: + missing.setdefault(export_path, set()).add("search_path_extra") if all_var is not False: for name in key_set.difference(cast(Collection[str], all_var)):