Skip to content

Commit

Permalink
Various pyvmomi improvements (#8469)
Browse files Browse the repository at this point in the history
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
  • Loading branch information
3 people authored Aug 3, 2022
1 parent ac2fe42 commit 7953848
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 21 deletions.
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
Expand Down
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): ...
Expand Down
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]: ...
Expand Down
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: ...
Expand Down
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
Expand All @@ -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: ...
Expand All @@ -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: ...
Expand All @@ -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: ...

0 comments on commit 7953848

Please sign in to comment.