Skip to content

Commit 455510d

Browse files
aegeigerclaude
andcommitted
Fix linting errors and remove duplicate templates/lib directory
Linting fixes: - UP047: Use modern type parameter syntax for generic functions - UP038/UP040: Use X | Y syntax instead of Union/tuple in type hints - C414: Remove unnecessary list() calls in sorted() - RUF001: Replace ambiguous unicode character with ASCII - F841: Remove unused variable - F821: Add missing statistics import - W291: Remove trailing whitespace Removed templates/lib (duplicate of templates/python/lib) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
1 parent 3c192d9 commit 455510d

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

73 files changed

+32
-4505
lines changed

client-sdks/openapi/patch_api_hierarchy.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -98,10 +98,9 @@ def patch_api_file(api_file: Path, child_tag: str, package_name: str) -> bool:
9898

9999
# Check if already patched
100100
import_line = f"from {package_name}.api.{child_module} import {child_class}\n"
101-
property_pattern = f"self.{child_snake}:"
102101

103102
if any(import_line.strip() in line for line in lines):
104-
print(f" Already patched: {child_snake}")
103+
print(f" Already patched: {child_snake}")
105104
return False
106105

107106
# Find class definition line
@@ -223,7 +222,7 @@ def patch_llama_stack_client(client_file: Path, pairs: list[tuple[str, str]]) ->
223222
child_snake = to_snake_case(first_pair[1])
224223
test_line = f"self.{parent_snake}.{child_snake} = self.{child_snake}"
225224
if any(test_line in line for line in lines):
226-
print(" LlamaStackClient already patched")
225+
print(" LlamaStackClient already patched")
227226
return False
228227

229228
# Get indentation from the comment line itself (count whitespace before '#')

client-sdks/openapi/process_openapi_hierarchy.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ def get_children_from_hierarchy(tag: str, hierarchy: dict) -> list[str]:
6767
return []
6868

6969
# The children are the keys in the nested dict
70-
return sorted(list(hierarchy[tag].keys()))
70+
return sorted(hierarchy[tag].keys())
7171

7272

7373
def convert_oneof_const_to_enum(schema):
@@ -223,9 +223,9 @@ def process_openapi(input_file: str, output_file: str, hierarchy_file: str) -> N
223223
# Write api_hierarchy to file
224224
hierarchy_data = {
225225
"api_hierarchy": api_hierarchy,
226-
"all_tags": sorted(list(all_tags)),
227-
"tags_with_endpoints": sorted(list(tags_with_endpoints)),
228-
"tags_without_endpoints": sorted(list(tags_without_endpoints)),
226+
"all_tags": sorted(all_tags),
227+
"tags_with_endpoints": sorted(tags_with_endpoints),
228+
"tags_without_endpoints": sorted(tags_without_endpoints),
229229
}
230230

231231
with open(hierarchy_file, "w") as f:

client-sdks/openapi/templates/lib/.keep

Lines changed: 0 additions & 4 deletions
This file was deleted.

client-sdks/openapi/templates/lib/__init__.py

Lines changed: 0 additions & 9 deletions
This file was deleted.

client-sdks/openapi/templates/lib/agents/__init__.py

Lines changed: 0 additions & 5 deletions
This file was deleted.

0 commit comments

Comments
 (0)