Skip to content
Open
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion appengine/standard/noxfile-template.py
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ def _get_repo_root():
raise Exception("Unable to detect repository root.")


GENERATED_READMES = sorted([x for x in Path(".").rglob("*.rst.in")])
GENERATED_READMES = sorted(list(Path(".").rglob("*.rst.in")))


@nox.session
Expand Down
2 changes: 1 addition & 1 deletion dialogflow/participant_management.py
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ def request_generator(audio_config, audio_file_path):
)
requests = request_generator(audio_config, audio_file_path)
responses = client.streaming_analyze_content(requests=requests)
results = [response for response in responses]
results = list(responses)
print("=" * 20)
for result in results:
print(f'Transcript: "{result.message.content}".')
Expand Down
4 changes: 2 additions & 2 deletions firestore/cloud-client/distributed_counters_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ def test_distributed_counters(fs_client):
counter.init_counter(doc_ref)

shards = doc_ref.collection("shards").list_documents()
shards_list = [shard for shard in shards]
shards_list = list(shards)
assert len(shards_list) == 2

counter.increment_counter(doc_ref)
Expand All @@ -54,7 +54,7 @@ def test_distributed_counters_cleanup(fs_client):
doc_ref = col.document("distributed_counter")

shards = doc_ref.collection("shards").list_documents()
shards_list = [shard for shard in shards]
shards_list = list(shards)
for shard in shards_list:
shard.delete()

Expand Down
2 changes: 1 addition & 1 deletion noxfile-template.py
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ def _get_repo_root() -> str | None:
raise Exception("Unable to detect repository root.")


GENERATED_READMES = sorted([x for x in Path(".").rglob("*.rst.in")])
GENERATED_READMES = sorted(list(Path(".").rglob("*.rst.in")))


@nox.session
Expand Down
7 changes: 2 additions & 5 deletions people-and-planet-ai/image-classification/predict.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,12 +65,9 @@ def run(

prediction = [dict(pred) for pred in response.predictions][0]
return sorted(
[
(category, confidence)
for category, confidence in zip(
list(zip(
prediction["displayNames"], prediction["confidences"]
)
],
)),
reverse=True,
key=lambda x: x[1],
)
Expand Down