We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 009d265 + 43644f5 commit eef04cbCopy full SHA for eef04cb
osbot_utils/type_safe/primitives/domains/identifiers/Obj_Id.py
@@ -4,10 +4,9 @@
4
_hex_table = [f"{i:02x}" for i in range(256)]
5
6
def is_obj_id(value: str):
7
- var_type = type(value)
8
- if var_type is Obj_Id:
+ if isinstance(value, Obj_Id):
9
return True
10
- if var_type is str:
+ if isinstance(value, str):
11
if len(value) == 8: # todo: add efficient check if we only have hex values
12
13
return False
0 commit comments