Skip to content

Commit

Permalink
reformatted due to black formatter issues
Browse files Browse the repository at this point in the history
Signed-off-by: Kavish Punchoo <[email protected]>
  • Loading branch information
kavish-p committed Jan 29, 2024
1 parent 49364dd commit 0f06e20
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions oras/provider.py
Original file line number Diff line number Diff line change
Expand Up @@ -757,8 +757,10 @@ def push(self, *args, **kwargs) -> requests.Response:

# Config is just another layer blob!
logger.debug(f"Preparing config {conf}")
with temporary_empty_config() if config_file is None else nullcontext(
config_file
with (
temporary_empty_config()
if config_file is None
else nullcontext(config_file)
) as config_file:
response = self.upload_blob(config_file, container, conf)

Expand Down Expand Up @@ -835,7 +837,10 @@ def pull(self, *args, **kwargs) -> List[str]:

@decorator.ensure_container
def get_manifest(
self, container: container_type, allowed_media_type: Optional[list] = None, refresh_headers: bool = True
self,
container: container_type,
allowed_media_type: Optional[list] = None,
refresh_headers: bool = True,
) -> dict:
"""
Retrieve a manifest for a package.
Expand All @@ -850,7 +855,7 @@ def get_manifest(
if not allowed_media_type:
allowed_media_type = [oras.defaults.default_manifest_media_type]
headers = {"Accept": ";".join(allowed_media_type)}

if not refresh_headers:
headers.update(self.headers)

Expand Down

0 comments on commit 0f06e20

Please sign in to comment.