Skip to content

Commit

Permalink
Fixes for errors reported by mypy 1.11.0 in BaseObjectStore
Browse files Browse the repository at this point in the history
  • Loading branch information
nsoranzo committed Jul 29, 2024
1 parent ad0532a commit efc9826
Showing 1 changed file with 137 additions and 20 deletions.
157 changes: 137 additions & 20 deletions lib/galaxy/objectstore/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -450,35 +450,152 @@ def _get_object_id(self, obj):
def _invoke(self, delegate, obj=None, **kwargs):
return self.__getattribute__(f"_{delegate}")(obj=obj, **kwargs)

def exists(self, obj, **kwargs):
return self._invoke("exists", obj, **kwargs)
def exists(self, obj, base_dir=None, dir_only=False, extra_dir=None, extra_dir_at_root=False, alt_name=None):
return self._invoke(
"exists",
obj,
base_dir=base_dir,
dir_only=dir_only,
extra_dir=extra_dir,
extra_dir_at_root=extra_dir_at_root,
alt_name=alt_name,
)

def construct_path(self, obj, **kwargs):
return self._invoke("construct_path", obj, **kwargs)
def construct_path(
self, obj, base_dir=None, dir_only=False, extra_dir=None, extra_dir_at_root=False, alt_name=None
):
return self._invoke(
"construct_path",
obj,
base_dir=base_dir,
dir_only=dir_only,
extra_dir=extra_dir,
extra_dir_at_root=extra_dir_at_root,
alt_name=alt_name,
)

def create(self, obj, **kwargs):
return self._invoke("create", obj, **kwargs)
def create(
self, obj, base_dir=None, dir_only=False, extra_dir=None, extra_dir_at_root=False, alt_name=None, obj_dir=False
):
return self._invoke(
"create",
obj,
base_dir=base_dir,
dir_only=dir_only,
extra_dir=extra_dir,
extra_dir_at_root=extra_dir_at_root,
alt_name=alt_name,
obj_dir=obj_dir,
)

def empty(self, obj, **kwargs):
return self._invoke("empty", obj, **kwargs)
def empty(self, obj, base_dir=None, extra_dir=None, extra_dir_at_root=False, alt_name=None, obj_dir=False):
return self._invoke(
"empty",
obj,
base_dir=base_dir,
extra_dir=extra_dir,
extra_dir_at_root=extra_dir_at_root,
alt_name=alt_name,
obj_dir=obj_dir,
)

def size(self, obj, **kwargs):
return self._invoke("size", obj, **kwargs)
def size(self, obj, extra_dir=None, extra_dir_at_root=False, alt_name=None, obj_dir=False) -> int:
return self._invoke(
"size", obj, extra_dir=extra_dir, extra_dir_at_root=extra_dir_at_root, alt_name=alt_name, obj_dir=obj_dir
)

def delete(self, obj, **kwargs):
return self._invoke("delete", obj, **kwargs)
def delete(
self,
obj,
entire_dir=False,
base_dir=None,
extra_dir=None,
extra_dir_at_root=False,
alt_name=None,
obj_dir=False,
):
return self._invoke(
"delete",
obj,
entire_dir=entire_dir,
base_dir=base_dir,
extra_dir=extra_dir,
extra_dir_at_root=extra_dir_at_root,
alt_name=alt_name,
obj_dir=obj_dir,
)

def get_data(self, obj, **kwargs):
return self._invoke("get_data", obj, **kwargs)
def get_data(
self,
obj,
start=0,
count=-1,
base_dir=None,
extra_dir=None,
extra_dir_at_root=False,
alt_name=None,
obj_dir=False,
):
return self._invoke(
"get_data",
obj,
start=start,
count=count,
base_dir=base_dir,
extra_dir=extra_dir,
extra_dir_at_root=extra_dir_at_root,
alt_name=alt_name,
obj_dir=obj_dir,
)

def get_filename(self, obj, **kwargs):
return self._invoke("get_filename", obj, **kwargs)
def get_filename(
self, obj, base_dir=None, dir_only=False, extra_dir=None, extra_dir_at_root=False, alt_name=None, obj_dir=False
):
return self._invoke(
"get_filename",
obj,
base_dir=base_dir,
dir_only=dir_only,
extra_dir=extra_dir,
extra_dir_at_root=extra_dir_at_root,
alt_name=alt_name,
obj_dir=obj_dir,
)

def update_from_file(self, obj, **kwargs):
return self._invoke("update_from_file", obj, **kwargs)
def update_from_file(
self,
obj,
base_dir=None,
extra_dir=None,
extra_dir_at_root=False,
alt_name=None,
obj_dir=False,
file_name=None,
create=False,
preserve_symlinks=False,
):
return self._invoke(
"update_from_file",
obj,
base_dir=base_dir,
extra_dir=extra_dir,
extra_dir_at_root=extra_dir_at_root,
alt_name=alt_name,
obj_dir=obj_dir,
file_name=file_name,
create=create,
preserve_symlinks=preserve_symlinks,
)

def get_object_url(self, obj, **kwargs):
return self._invoke("get_object_url", obj, **kwargs)
def get_object_url(self, obj, extra_dir=None, extra_dir_at_root=False, alt_name=None, obj_dir=False):
return self._invoke(
"get_object_url",
obj,
extra_dir=extra_dir,
extra_dir_at_root=extra_dir_at_root,
alt_name=alt_name,
obj_dir=obj_dir,
)

def get_concrete_store_name(self, obj):
return self._invoke("get_concrete_store_name", obj)
Expand Down

0 comments on commit efc9826

Please sign in to comment.