diff --git a/lib/dl_connector_bundle_chs3/dl_connector_bundle_chs3/chs3_base/core/us_connection.py b/lib/dl_connector_bundle_chs3/dl_connector_bundle_chs3/chs3_base/core/us_connection.py index df5bf09ea..1919e3e62 100644 --- a/lib/dl_connector_bundle_chs3/dl_connector_bundle_chs3/chs3_base/core/us_connection.py +++ b/lib/dl_connector_bundle_chs3/dl_connector_bundle_chs3/chs3_base/core/us_connection.py @@ -122,9 +122,7 @@ def s3_access_key_id(self) -> str: def s3_secret_access_key(self) -> str: return self._connector_settings.SECRET_ACCESS_KEY - def get_full_s3_filename(self, s3_filename_suffix: Optional[str]) -> Optional[str]: - if s3_filename_suffix is None: - return None + def get_full_s3_filename(self, s3_filename_suffix: str) -> str: assert self.uuid and self.raw_tenant_id return "_".join((self.raw_tenant_id, self.uuid, s3_filename_suffix)) diff --git a/lib/dl_connector_bundle_chs3/dl_connector_bundle_chs3_tests/db/conftest.py b/lib/dl_connector_bundle_chs3/dl_connector_bundle_chs3_tests/db/conftest.py index ee8cc51d7..ee458f9b0 100644 --- a/lib/dl_connector_bundle_chs3/dl_connector_bundle_chs3_tests/db/conftest.py +++ b/lib/dl_connector_bundle_chs3/dl_connector_bundle_chs3_tests/db/conftest.py @@ -17,7 +17,7 @@ def pytest_configure(config): # noqa @pytest.fixture(autouse=True) def patch_get_full_s3_filename(monkeypatch: pytest.MonkeyPatch) -> None: - def _patched(self: Any, s3_filename_suffix: Optional[str]) -> Optional[str]: # type: ignore + def _patched(self: Any, s3_filename_suffix: str) -> str: # type: ignore return s3_filename_suffix monkeypatch.setattr(BaseFileS3Connection, "get_full_s3_filename", _patched)