Skip to content

Commit

Permalink
refactor: Simplify more f-string expressions for better readability
Browse files Browse the repository at this point in the history
  • Loading branch information
openhands-agent committed Feb 13, 2025
1 parent a834306 commit 5b9d790
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions openhands/resolver/interfaces/gitlab.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,9 @@ def get_download_url(self):
return f'{self.base_url}/issues'

def get_clone_url(self):
username_and_token = (
f'{self.username}:{self.token}' if self.username else f'{self.token}'
)
username_and_token = self.token
if self.username:
username_and_token = f'{self.username}:{self.token}'
return f'https://{username_and_token}@gitlab.com/{self.owner}/{self.repo}.git'

def get_graphql_url(self):
Expand Down Expand Up @@ -361,7 +361,8 @@ def download_pr_metadata(
}
"""

variables = {'projectPath': f'{self.owner}/{self.repo}', 'pr': f'{pull_number}'}
project_path = f'{self.owner}/{self.repo}'
variables = {'projectPath': project_path, 'pr': str(pull_number)}

response = requests.post(
self.get_graphql_url(),
Expand Down

0 comments on commit 5b9d790

Please sign in to comment.