Skip to content

Commit

Permalink
removed Optional from get_full_s3_filename signature
Browse files Browse the repository at this point in the history
  • Loading branch information
asnytin committed Oct 24, 2023
1 parent ef3cd86 commit dcfee70
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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))

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)

0 comments on commit dcfee70

Please sign in to comment.