Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update pyvmomi to address #8082 and use Incomplete type instead of Any #8469

Merged
merged 7 commits into from
Aug 3, 2022
Merged
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
4 changes: 2 additions & 2 deletions stubs/pyvmomi/pyVmomi/vim/event.pyi
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from _typeshed import Incomplete
from datetime import datetime
from typing import Any

def __getattr__(name: str) -> Any: ... # incomplete
def __getattr__(name: str) -> Incomplete: ...

class Event:
createdTime: datetime
4 changes: 2 additions & 2 deletions stubs/pyvmomi/pyVmomi/vim/fault.pyi
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from typing import Any
from _typeshed import Incomplete

def __getattr__(name: str) -> Any: ... # incomplete
def __getattr__(name: str) -> Incomplete: ...

class InvalidName(Exception): ...
class RestrictedByAdministrator(Exception): ...
3 changes: 2 additions & 1 deletion stubs/pyvmomi/pyVmomi/vim/option.pyi
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
from _typeshed import Incomplete
from typing import Any

def __getattr__(name: str) -> Any: ... # incomplete
def __getattr__(name: str) -> Incomplete: ...

class OptionManager:
def QueryOptions(self, name: str) -> list[OptionValue]: ...
4 changes: 2 additions & 2 deletions stubs/pyvmomi/pyVmomi/vim/view.pyi
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
from typing import Any
from _typeshed import Incomplete

from pyVmomi.vim import ManagedEntity

def __getattr__(name: str) -> Any: ... # incomplete
def __getattr__(name: str) -> Incomplete: ...

class ContainerView:
def Destroy(self) -> None: ...
6 changes: 3 additions & 3 deletions stubs/pyvmomi/pyVmomi/vmodl/fault.pyi
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
from typing import Any
from _typeshed import Incomplete

from pyVmomi.vmodl import ManagedObject

def __getattr__(name: str) -> Any: ... # incomplete
def __getattr__(name: str) -> Incomplete: ...

class InvalidArgument(Exception): ...

class ManagedObjectNotFound:
class ManagedObjectNotFound(Exception):
obj: ManagedObject
19 changes: 8 additions & 11 deletions stubs/pyvmomi/pyVmomi/vmodl/query.pyi
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
from _typeshed import Incomplete
from typing import Any

from pyVmomi.vim import ManagedEntity
@@ -12,13 +13,11 @@ class PropertyCollector:
pathSet: list[str]

class TraversalSpec:
def __init__(
self, *, path: str = ..., skip: bool = ..., type: type[ContainerView] = ..., **kwargs: Any # incomplete
) -> None: ...
def __init__(self, *, path: str = ..., skip: bool = ..., type: type[ContainerView] = ..., **kwargs) -> None: ...
path: str
skip: bool
type: type[ContainerView]
def __getattr__(self, name: str) -> Any: ... # incomplete
def __getattr__(self, name: str) -> Incomplete: ...

class RetrieveOptions:
def __init__(self, *, maxObjects: int | None = ...) -> None: ...
@@ -38,19 +37,17 @@ class PropertyCollector:
*,
propSet: list[PropertyCollector.PropertySpec] = ...,
objectSet: list[PropertyCollector.ObjectSpec] = ...,
**kwargs: Any, # incomplete
**kwargs,
) -> None: ...
propSet: list[PropertyCollector.PropertySpec]
objectSet: list[PropertyCollector.ObjectSpec]
def __getattr__(self, name: str) -> Any: ... # incomplete
def __getattr__(self, name: str) -> Incomplete: ...

class ObjectContent:
def __init__(
self, *, obj: ManagedEntity = ..., propSet: list[DynamicProperty] = ..., **kwargs: Any # incomplete
) -> None: ...
def __init__(self, *, obj: ManagedEntity = ..., propSet: list[DynamicProperty] = ..., **kwargs) -> None: ...
obj: ManagedEntity
propSet: list[DynamicProperty]
def __getattr__(self, name: str) -> Any: ... # incomplete
def __getattr__(self, name: str) -> Incomplete: ...

class RetrieveResult:
def __init__(self, *, objects: list[PropertyCollector.ObjectContent] = ..., token: str | None = ...) -> None: ...
@@ -60,4 +57,4 @@ class PropertyCollector:
self, specSet: list[PropertyCollector.FilterSpec], options: PropertyCollector.RetrieveOptions
) -> PropertyCollector.RetrieveResult: ...
def ContinueRetrievePropertiesEx(self, token: str) -> PropertyCollector.RetrieveResult: ...
def __getattr__(self, name: str) -> Any: ... # incomplete
def __getattr__(self, name: str) -> Incomplete: ...