Skip to content

Commit

Permalink
Fix linting issues.
Browse files Browse the repository at this point in the history
  • Loading branch information
decko committed Aug 22, 2024
1 parent ce5750a commit d9ae1f6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 9 deletions.
6 changes: 1 addition & 5 deletions pulp-glue/pulp_glue/common/authentication.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,11 +59,7 @@ def handle401(
response.close()
prepared_new_request = response.request.copy()

prepared_new_request.headers["Authorization"] = (
f"Bearer {
self.access_token
}"
)
prepared_new_request.headers["Authorization"] = f"Bearer {self.access_token}"

# Avoid to enter into an infinity loop.
# Call to untyped function "deregister_hook" in typed context
Expand Down
6 changes: 2 additions & 4 deletions pulpcore/cli/common/generic.py
Original file line number Diff line number Diff line change
Expand Up @@ -718,8 +718,7 @@ def _option_callback(
# The HREF of a resource was passed
href_pattern = entity_ctx.HREF_PATTERN
if pulp_ctx.domain_enabled:
pattern = rf"^{pulp_ctx._api_root}{
domain_pattern}/api/v3/{href_pattern}"
pattern = rf"^{pulp_ctx._api_root}{domain_pattern}/api/v3/{href_pattern}"
else:
pattern = rf"^{pulp_ctx.api_path}{href_pattern}"
match = re.match(pattern, value)
Expand Down Expand Up @@ -784,8 +783,7 @@ def _option_callback(
)
)
if pulp_ctx.domain_enabled:
pattern = rf"^{pulp_ctx._api_root}{
domain_pattern}/api/v3/{href_pattern}"
pattern = rf"^{pulp_ctx._api_root}{domain_pattern}/api/v3/{href_pattern}"
else:
pattern = rf"^{pulp_ctx.api_path}{href_pattern}"
match = re.match(pattern, value)
Expand Down

0 comments on commit d9ae1f6

Please sign in to comment.