Skip to content

Commit e0eb321

Browse files
lint issues fix
1 parent 01656ed commit e0eb321

3 files changed

Lines changed: 10 additions & 6 deletions

File tree

examples/oauth_token_complete_test.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,9 @@ def main():
8585
print(f" Total count: {token_list_with_options.total_count}")
8686

8787
except NotFound:
88-
print(" ✓ No OAuth tokens found (organization may not exist or no tokens available)")
88+
print(
89+
" ✓ No OAuth tokens found (organization may not exist or no tokens available)"
90+
)
8991
except Exception as e:
9092
print(f" ✗ Error: {e}")
9193

@@ -144,7 +146,9 @@ def main():
144146

145147
except Exception as e:
146148
print(f" ✗ Error: {e}")
147-
print(" Note: This may fail if the SSH key format is invalid or constraints apply")
149+
print(
150+
" Note: This may fail if the SSH key format is invalid or constraints apply"
151+
)
148152
else:
149153
print("\n3. Testing update() function:")
150154
print(" ⚠ Skipped - No OAuth token available to update")

src/tfe/models/oauth_token.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ class OAuthTokenUpdateOptions(BaseModel):
6161
# Rebuild models to resolve forward references
6262
try:
6363
from .oauth_client import OAuthClient # noqa: F401
64+
6465
OAuthToken.model_rebuild()
6566
OAuthTokenList.model_rebuild()
6667
except ImportError:

tests/units/test_oauth_token.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -89,9 +89,7 @@ def test_parse_oauth_token_empty_relationships(self, oauth_tokens_service):
8989
"has-ssh-key": False,
9090
"service-provider-user": "testuser",
9191
},
92-
"relationships": {
93-
"oauth-client": {"data": None}
94-
},
92+
"relationships": {"oauth-client": {"data": None}},
9593
}
9694

9795
result = oauth_tokens_service._parse_oauth_token(data)
@@ -175,7 +173,8 @@ def test_list_oauth_tokens_with_options(self, oauth_tokens_service, mock_transpo
175173
oauth_tokens_service.list("test-org", options)
176174

177175
mock_transport.request.assert_called_once_with(
178-
"GET", "/api/v2/organizations/test-org/oauth-tokens?page[number]=2&page[size]=50"
176+
"GET",
177+
"/api/v2/organizations/test-org/oauth-tokens?page[number]=2&page[size]=50",
179178
)
180179

181180
def test_list_oauth_tokens_invalid_org(self, oauth_tokens_service):

0 commit comments

Comments
 (0)