Skip to content

Commit a6f5f6d

Browse files
committed
Remove redundant comments
1 parent b560ab8 commit a6f5f6d

7 files changed

Lines changed: 2 additions & 17 deletions

File tree

codegen/layouts/partials/resource-dataclass.hbs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,9 @@
1515
{{../memberIndent}}{{pythonIdentifier name}}: {{type}}
1616
{{/each}}
1717

18-
{{memberIndent}}# The payload is decoded JSON, so every value read out of it is untyped.
19-
{{memberIndent}}# Typing d as Any keeps that at this boundary instead of casting each
20-
{{memberIndent}}# read, and the dataclass fields carry the real types.
2118
{{memberIndent}}@classmethod
2219
{{memberIndent}}def from_dict(cls, d: Any):
2320
{{#unless properties}}
24-
{{memberIndent}} # This shape documents no properties, so there is nothing to read.
2521
{{memberIndent}} # pylint: disable=unused-argument
2622
{{/unless}}
2723
{{memberIndent}} return cls(

test/conftest.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ class Handler(BaseHTTPRequestHandler):
7171
protocol_version = "HTTP/1.1"
7272

7373
# pylint: disable-next=invalid-name
74-
def do_POST(self): # BaseHTTPRequestHandler dispatches on this name.
74+
def do_POST(self):
7575
content_length = int(self.headers.get("content-length", 0))
7676
raw_body = self.rfile.read(content_length)
7777

test/http_error_test.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,9 +62,6 @@ def test_seam_http_throws_http_error_on_non_standard_response(server):
6262
assert exc_info.value.response.status_code == 503
6363

6464

65-
# The fake cannot produce malformed error responses, so the recording server
66-
# drives the bodies that must fall through is_api_error_response and raise a
67-
# plain HTTPError rather than being parsed into a SeamHttpApiError.
6865
def test_seam_http_raises_http_error_on_non_json_response(recording_server):
6966
with recording_server([(500, "Internal Server Error")]) as (endpoint, _):
7067
seam = Seam.from_api_key("seam_apikey_token", endpoint=endpoint)

test/nested_resource_test.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,6 @@ def test_action_attempt_union_hydrates_nested_result_and_error():
6565
def test_merged_variants_keep_every_variant_field():
6666
result_fields = {f.name for f in dataclasses.fields(ActionAttempt.Result)}
6767

68-
# One field from each of several action attempt variants.
6968
assert "was_confirmed_by_device" in result_fields
7069
assert "acs_credential_on_encoder" in result_fields
7170
assert "instant_key_url" in result_fields
@@ -94,7 +93,6 @@ def test_merged_variants_keep_every_variant_field():
9493
def test_merged_variants_recurse_into_nested_objects():
9594
from_fields = {f.name for f in dataclasses.fields(AcsUser.PendingMutations.From)}
9695

97-
# Each of these arrives from a different pending mutation variant.
9896
assert "full_name" in from_fields
9997
assert "starts_at" in from_fields
10098
assert "is_suspended" in from_fields
@@ -129,5 +127,4 @@ def test_nested_classes_are_scoped_to_their_owner():
129127
assert "climate_ref" in preset_metadata.__dataclass_fields__
130128
assert "ecobee_device_id" in device_metadata.__dataclass_fields__
131129

132-
# Nested shapes stay off the module namespace.
133130
assert not hasattr(device_module, "DeviceProperties")

test/retry_test.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,8 +79,6 @@ def test_seam_surfaces_service_unavailable_from_a_workspace_outage(server):
7979
assert exc_info.value.response.status_code == 503
8080

8181

82-
# The policy omits allowed_methods: the SDK must retry its own API
83-
# requests without consumers knowing which HTTP methods those use.
8482
def retry_policy(*, total):
8583
return Retry(
8684
total=total,

test/timeout_test.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -110,13 +110,11 @@ def test_seam_times_out_a_slow_request():
110110

111111
@contextmanager
112112
def slow_server():
113-
"""Serve a response too slowly for the client timeout to tolerate."""
114-
115113
class Handler(BaseHTTPRequestHandler):
116114
protocol_version = "HTTP/1.1"
117115

118116
# pylint: disable-next=invalid-name
119-
def do_POST(self): # BaseHTTPRequestHandler dispatches on this name.
117+
def do_POST(self):
120118
time.sleep(5)
121119
self.send_response(200)
122120
self.send_header("content-length", "0")

test/wait_for_action_attempt_test.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,6 @@ def update_action_attempt():
7777
},
7878
)
7979

80-
# Use Timer to schedule the update after 1 second
8180
t = Timer(1.0, update_action_attempt)
8281
t.start()
8382

0 commit comments

Comments
 (0)