Skip to content

Commit

Permalink
Changes:
Browse files Browse the repository at this point in the history
- fix rexports
- bump version
  • Loading branch information
devkral committed Nov 13, 2024
1 parent 73a915f commit 05888c6
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 6 deletions.
7 changes: 7 additions & 0 deletions docs/release-notes.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# Release notes


## Version 0.0.6

### Fixed

- Re-exports were not detected correctly.

## Version 0.0.5

### Added
Expand Down
2 changes: 1 addition & 1 deletion monkay/__about__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# SPDX-FileCopyrightText: 2024-present alex <devkral@web.de>
#
# SPDX-License-Identifier: BSD-3-Clauses
__version__ = "0.0.5"
__version__ = "0.0.6"
15 changes: 10 additions & 5 deletions monkay/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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)):
Expand Down

0 comments on commit 05888c6

Please sign in to comment.