mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-10 03:28:53 +00:00
docs(lint): list sequence examples in mutable_names_in docstring
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
This commit is contained in:
parent
398a8b1224
commit
82ba2a22f3
1 changed files with 2 additions and 2 deletions
|
|
@ -315,8 +315,8 @@ def _is_literal_subscript(node: ast.AST) -> bool:
|
|||
def mutable_names_in(annotation: ast.AST) -> Iterator[str]:
|
||||
"""Yield mutable-collection names anywhere inside an annotation expression.
|
||||
|
||||
Matches bare names (`list`, `MutableSequence`) and dotted access (`typing.Dict`,
|
||||
`collections.deque`, `collections.abc.MutableMapping`), descends through nesting
|
||||
Matches bare names (`list`, `MutableSequence`) and dotted access (`typing.List`,
|
||||
`collections.deque`, `collections.abc.MutableSequence`), descends through nesting
|
||||
(`dict[str, list[int]]`, `tuple[set[int], ...]`) and string forward references.
|
||||
Skips `Literal[...]` subtrees: their string arguments are values, not forward
|
||||
references, so `Literal["list"]` is not the `list` type.
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue