Add type checking for the name attribute at the constructor of core.python.namespaces.PythonNamespace

This commit is contained in:
2026-04-07 14:22:09 +02:00
parent 0f817e961c
commit b0a0d3e45b
2 changed files with 5 additions and 1 deletions
@@ -13,6 +13,7 @@
# limitations under the License.
from ...exceptions import InvalidNamespaceError, NamespaceNotFoundError
from ...utils import assert_that_is_instance
__all__ = [
'PythonNamespace',
@@ -28,6 +29,8 @@ class PythonNamespace:
:type name: str
'''
def __init__(self, name: str) -> None:
assert_that_is_instance(name, str)
self.name = name
class PythonPackageNamespace(PythonNamespace):