You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, objects that inherit from Dataset instance can be initialized without root_dir properly set. In such case, its value is set to DUMMY_NONEXISTING_PATH (constants module) which is a path object meant to substitute None value.
When any operation that involves serialization occurs on the dataset, it is checked that root_dir was properly set by @serialize decorator which raises an exception in case it was not yet set.
What we're trying to achieve is basically None behaviour that could be somewhat tricky to handle with MyPy. ATM, we take the advantage of root_dir always being a Path instance. We should, however, replace DUMMY_NONEXISTING_PATH with None in the future. For some rationale, see https://github.com/crocs-muni/sec-certs/pull/275/commits#discussion_r1042430764
The text was updated successfully, but these errors were encountered:
Currently, objects that inherit from
Dataset
instance can be initialized withoutroot_dir
properly set. In such case, its value is set toDUMMY_NONEXISTING_PATH
(constants module) which is a path object meant to substituteNone
value.When any operation that involves serialization occurs on the dataset, it is checked that
root_dir
was properly set by@serialize
decorator which raises an exception in case it was not yet set.What we're trying to achieve is basically
None
behaviour that could be somewhat tricky to handle with MyPy. ATM, we take the advantage ofroot_dir
always being aPath
instance. We should, however, replaceDUMMY_NONEXISTING_PATH
withNone
in the future. For some rationale, see https://github.com/crocs-muni/sec-certs/pull/275/commits#discussion_r1042430764The text was updated successfully, but these errors were encountered: