Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 7db2c15

Browse files
committed
refactor: convert string concatenation to f-strings
1 parent c8d4f64 commit 7db2c15

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

brickset/api.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ def execute_api_request(api: str, include_hash: bool = False, **kwargs: Any) ->
1818
for key, value in kwargs.items():
1919
params[key] = str(value) # important when value='params' but str everything anyway
2020

21-
response = requests.get(_API + '/' + api, params=params)
21+
response = requests.get(f'{_API}/{api}', params=params)
2222
if response.status_code != 200:
2323
print(response.text)
2424
sys.exit(f'ERROR: {api} API returned an unexpected error')

brickset/sets.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ def _print_set(lego_set: dict[str, Any], id_only: bool) -> None:
173173

174174
collection_details = []
175175
if lego_set['collection']['owned']:
176-
collection_details.append(str(lego_set['collection']['qtyOwned']) + ' owned')
176+
collection_details.append(f'{lego_set["collection"]["qtyOwned"]} owned')
177177
if lego_set['collection']['wanted']:
178178
collection_details.append('wanted')
179179

0 commit comments

Comments
 (0)