Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions Adyen/services/balanceControl/balance_control_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,7 @@

Deprecated since Adyen Balance Control API v1
"""
endpoint = self.baseUrl + "/balanceTransfer"
endpoint = self.baseUrl + f"/balanceTransfer"

Check warning on line 22 in Adyen/services/balanceControl/balance_control_api.py

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Add replacement fields or use a normal string instead of an f-string.

See more on https://sonarcloud.io/project/issues?id=Adyen_adyen-python-api-library&issues=AZ0K0tFuu5_pCbq7N_Kw&open=AZ0K0tFuu5_pCbq7N_Kw&pullRequest=449
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The use of an f-string f"/balanceTransfer" without any expressions to interpolate is unnecessary and can be confusing. It's functionally equivalent to a regular string "/balanceTransfer". For better clarity, it's best to remove the f prefix.

Suggested change
endpoint = self.baseUrl + f"/balanceTransfer"
endpoint = self.baseUrl + "/balanceTransfer"

method = "POST"
return self.client.call_adyen_api(
request, self.service, method, endpoint, idempotency_key, **kwargs
)
return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

This line is over 100 characters long, which harms readability and violates common Python style guidelines (like PEP 8) for line length. The previous multi-line format was more readable. It's better to break long lines for maintainability.

Suggested change
return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs)
return self.client.call_adyen_api(
request, self.service, method, endpoint, idempotency_key, **kwargs
)


Loading