mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-08-26 10:14:48 +00:00
nixos-rebuild-ng: assert if get_qualified_name is used by internal modules
(cherry picked from commit b1a205154c)
This commit is contained in:
committed by
github-actions[bot]
parent
231feee62e
commit
df20fc4cbb
@@ -8,4 +8,8 @@ def get_qualified_name(
|
||||
) -> str:
|
||||
module_name = getattr(module, "__name__", method.__module__)
|
||||
method_name = getattr(method, "__qualname__", method.__name__)
|
||||
return f"{module_name}.{method_name}"
|
||||
name = f"{module_name}.{method_name}"
|
||||
assert name.startswith("nixos_rebuild"), (
|
||||
f"Non-internal module '{name}' called with 'get_qualified_name'"
|
||||
)
|
||||
return name
|
||||
|
||||
Reference in New Issue
Block a user