mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-07-27 06:28:50 +00:00
chore: add mypy coverage to inspect.py and library_client.py in /distribution (#2707)
# What does this PR do? Adds type guards in /distribution/inspect.py and ignores a valid-type mypy error in library_client.py. This PR is part of issue #2647 . I'm rather unsure whether ignoring the valid-type error is correct in this case. It appears that args[0] is interpreted as [any] but I didn't find any way to specify the type. <!-- If resolving an issue, uncomment and update the line below --> <!-- Closes #[issue-number] --> <!-- Describe the tests you ran to verify your changes with result summaries. *Provide clear instructions so the plan can be easily re-executed.* -->
This commit is contained in:
parent
d4f0b430e2
commit
537dc693ee
2 changed files with 4 additions and 1 deletions
|
@ -54,6 +54,7 @@ class DistributionInspectImpl(Inspect):
|
|||
provider_types=[], # These APIs don't have "real" providers - they're internal to the stack
|
||||
)
|
||||
for e in endpoints
|
||||
if e.methods is not None
|
||||
]
|
||||
)
|
||||
else:
|
||||
|
@ -67,6 +68,7 @@ class DistributionInspectImpl(Inspect):
|
|||
provider_types=[p.provider_type for p in providers],
|
||||
)
|
||||
for e in endpoints
|
||||
if e.methods is not None
|
||||
]
|
||||
)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue