Skip to content

Commit 2497726

Browse files
felipao-mxclaude
andcommitted
Remove unnecessary comments
- Removed redundant comments in client.py and test_client.py - Code is clear enough without excessive commenting 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent e7c2917 commit 2497726

File tree

2 files changed

+0
-10
lines changed

2 files changed

+0
-10
lines changed

cuenca/http/client.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -103,20 +103,15 @@ def request(
103103
) -> bytes:
104104
resp = None
105105
with httpx.Client() as client:
106-
# Set headers
107106
headers = self.headers.copy()
108107

109-
# Update JWT token if needed
110108
if self.jwt_token:
111109
if self.jwt_token.is_expired:
112110
self.jwt_token = Jwt.create(self)
113111
headers['X-Cuenca-Token'] = self.jwt_token.token
114112

115-
# Merge headers from kwargs if present
116113
if 'headers' in kwargs:
117114
headers.update(kwargs.pop('headers'))
118-
119-
# Make request
120115
resp = client.request(
121116
method=method,
122117
url='https://' + self.host + urljoin('/', endpoint),

tests/http/test_client.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -65,19 +65,14 @@ def test_request_expired_token():
6565

6666

6767
def test_overrides_session(httpx_mock: HTTPXMock):
68-
# Setup mock response
6968
httpx_mock.add_response(status_code=200, json={"items": []})
7069

71-
# Configure session with custom credentials
7270
session = Session()
7371
session.configure(
7472
api_key='USER_API_KEY', api_secret='USER_SECRET', sandbox=True
7573
)
7674

77-
# Make the request
7875
Card.first(user_id='USER_ID', session=session)
79-
80-
# Verify the request was made with the correct auth
8176
request = httpx_mock.get_request()
8277
assert request is not None, "No request was captured"
8378
assert request.headers.get("authorization", "").startswith("Basic ")

0 commit comments

Comments
 (0)