Skip to content

Commit

Permalink
Rebuild with latest changes to mypy stubgen
Browse files Browse the repository at this point in the history
  • Loading branch information
chadrik committed Aug 3, 2023
1 parent 37c17c4 commit 3c40572
Show file tree
Hide file tree
Showing 58 changed files with 1,481 additions and 1,447 deletions.
2 changes: 1 addition & 1 deletion katana/stubgen_katana.py
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ def get_imports(self) -> str:

def get_members(self, obj: object) -> list[tuple[str, Any]]:
# Note that there is a mix of fixes here for C and non-C modules, but
# I'm not separating them because it's easy to get mixed uppp
# I'm not separating them because it's easy to get mixed up
members = dict(super().get_members(obj))

if self.is_c_module:
Expand Down
7 changes: 4 additions & 3 deletions katana/stubgen_katana.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,16 @@ if [[ "$version" == "" ]]; then
echo "defaulting to $version"
fi

# User provided
# Custom variables --
MYPY_ROOT=$REPO_PATH/../mypy
export KATANA_HOME=/luma/soft/applications/Foundry/Linux-x86_64/katana/Katana-$version
export PATH=$KATANA_HOME:$PATH
export foundry_LICENSE='[email protected]:[email protected]'

# End custom variables --

PY_SITE_DIR=$(python -c "import site,os;print(os.pathsep.join(site.getsitepackages()))")
export REPO_PATH=$(git rev-parse --show-toplevel)
export PYTHONPATH=$REPO_PATH:$REPO_PATH/katana:$REPO_PATH/../mypy/:$PY_SITE_DIR
export PYTHONPATH=$REPO_PATH:$REPO_PATH/katana:$MYPY_ROOT:$PY_SITE_DIR

sitedir=$KATANA_HOME/bin/python/
outdir=${REPO_PATH}/katana/stubs
Expand Down
5 changes: 0 additions & 5 deletions pyside/build.sh

This file was deleted.

35 changes: 0 additions & 35 deletions pyside/setup.cfg.old

This file was deleted.

3 changes: 1 addition & 2 deletions pyside/stubgen_pyside.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ POINT_RELEASE=5
#pip install -U git+https://github.com/chadrik/mypy@stubgenc-all-fixes#mypy
# pip install -U -e ../mypy

echo $(which python)
PY_SITE_DIR=$(python -c "import site,os;print(os.pathsep.join(site.getsitepackages()))")
REPO_PATH=$(git rev-parse --show-toplevel)
outdir=$REPO_PATH/pyside/stubs/
Expand All @@ -19,7 +18,7 @@ export PYTHONPATH=$REPO_PATH:$REPO_PATH/pyside:$MYPY_ROOT:$PY_SITE_DIR

python -m stubgen_pyside -p shiboken2 -p PySide2 --include-private -o $outdir

echo -e "\nclass Object:\n pass" >> $outdir/shiboken2/shiboken2.pyi
echo -e "\nclass Object: ..." >> $outdir/shiboken2/shiboken2.pyi
echo -e "__version__: str" >> $outdir/PySide2/__init__.pyi
echo -e "__version_info__: tuple[int, int, float, str, str]" >> $outdir/PySide2/__init__.pyi

Expand Down
15 changes: 8 additions & 7 deletions pyside/stubs/PySide2/Qt3DAnimation.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import collections.abc
import shiboken2
import typing
T = typing.TypeVar('T')
import typing_extensions

class Qt3DAnimation(shiboken2.Object):
class QAbstractAnimation(PySide2.QtCore.QObject):
Expand All @@ -15,7 +16,7 @@ class Qt3DAnimation(shiboken2.Object):
MorphingAnimation: typing.ClassVar[Qt3DAnimation.QAbstractAnimation.AnimationType] = ...
VertexBlendAnimation: typing.ClassVar[Qt3DAnimation.QAbstractAnimation.AnimationType] = ...
values: typing.ClassVar[dict] = ...
name: None
name: _typeshed.Incomplete
@classmethod
def __init__(cls, *args, **kwargs) -> None: ...
def __add__(self, other: typing.SupportsInt) -> Qt3DAnimation.QAbstractAnimation.AnimationType: ...
Expand Down Expand Up @@ -74,7 +75,7 @@ class Qt3DAnimation(shiboken2.Object):
class Loops:
Infinite: typing.ClassVar[Qt3DAnimation.QAbstractClipAnimator.Loops] = ...
values: typing.ClassVar[dict] = ...
name: None
name: _typeshed.Incomplete
@classmethod
def __init__(cls, *args, **kwargs) -> None: ...
def __add__(self, other: typing.SupportsInt) -> Qt3DAnimation.QAbstractClipAnimator.Loops: ...
Expand Down Expand Up @@ -145,7 +146,7 @@ class Qt3DAnimation(shiboken2.Object):
OnOwningThread: typing.ClassVar[Qt3DAnimation.QAnimationCallback.Flag] = ...
OnThreadPool: typing.ClassVar[Qt3DAnimation.QAnimationCallback.Flag] = ...
values: typing.ClassVar[dict] = ...
name: None
name: _typeshed.Incomplete
@classmethod
def __init__(cls, *args, **kwargs) -> None: ...
def __add__(self, other: typing.SupportsInt) -> Qt3DAnimation.QAnimationCallback.Flag: ...
Expand Down Expand Up @@ -187,7 +188,7 @@ class Qt3DAnimation(shiboken2.Object):
NotReady: typing.ClassVar[Qt3DAnimation.QAnimationClipLoader.Status] = ...
Ready: typing.ClassVar[Qt3DAnimation.QAnimationClipLoader.Status] = ...
values: typing.ClassVar[dict] = ...
name: None
name: _typeshed.Incomplete
@classmethod
def __init__(cls, *args, **kwargs) -> None: ...
def __add__(self, other: typing.SupportsInt) -> Qt3DAnimation.QAnimationClipLoader.Status: ...
Expand Down Expand Up @@ -298,7 +299,7 @@ class Qt3DAnimation(shiboken2.Object):
ConstantInterpolation: typing.ClassVar[Qt3DAnimation.QKeyFrame.InterpolationType] = ...
LinearInterpolation: typing.ClassVar[Qt3DAnimation.QKeyFrame.InterpolationType] = ...
values: typing.ClassVar[dict] = ...
name: None
name: _typeshed.Incomplete
@classmethod
def __init__(cls, *args, **kwargs) -> None: ...
def __add__(self, other: typing.SupportsInt) -> Qt3DAnimation.QKeyFrame.InterpolationType: ...
Expand Down Expand Up @@ -348,7 +349,7 @@ class Qt3DAnimation(shiboken2.Object):
None_: typing.ClassVar[Qt3DAnimation.QKeyframeAnimation.RepeatMode] = ...
Repeat: typing.ClassVar[Qt3DAnimation.QKeyframeAnimation.RepeatMode] = ...
values: typing.ClassVar[dict] = ...
name: None
name: _typeshed.Incomplete
@classmethod
def __init__(cls, *args, **kwargs) -> None: ...
def __add__(self, other: typing.SupportsInt) -> Qt3DAnimation.QKeyframeAnimation.RepeatMode: ...
Expand Down Expand Up @@ -432,7 +433,7 @@ class Qt3DAnimation(shiboken2.Object):
Normalized: typing.ClassVar[Qt3DAnimation.QMorphingAnimation.Method] = ...
Relative: typing.ClassVar[Qt3DAnimation.QMorphingAnimation.Method] = ...
values: typing.ClassVar[dict] = ...
name: None
name: _typeshed.Incomplete
@classmethod
def __init__(cls, *args, **kwargs) -> None: ...
def __add__(self, other: typing.SupportsInt) -> Qt3DAnimation.QMorphingAnimation.Method: ...
Expand Down
17 changes: 9 additions & 8 deletions pyside/stubs/PySide2/Qt3DCore.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import collections.abc
import shiboken2
import typing
T = typing.TypeVar('T')
import typing_extensions

class Qt3DCore(shiboken2.Object):
class ChangeFlag:
Expand All @@ -19,7 +20,7 @@ class Qt3DCore(shiboken2.Object):
PropertyValueAdded: typing.ClassVar[Qt3DCore.ChangeFlag] = ...
PropertyValueRemoved: typing.ClassVar[Qt3DCore.ChangeFlag] = ...
values: typing.ClassVar[dict] = ...
name: None
name: _typeshed.Incomplete
@classmethod
def __init__(cls, *args, **kwargs) -> None: ...
def __and__(self, other: typing.SupportsInt) -> Qt3DCore.ChangeFlags: ...
Expand Down Expand Up @@ -85,7 +86,7 @@ class Qt3DCore(shiboken2.Object):
Automatic: typing.ClassVar[Qt3DCore.QAspectEngine.RunMode] = ...
Manual: typing.ClassVar[Qt3DCore.QAspectEngine.RunMode] = ...
values: typing.ClassVar[dict] = ...
name: None
name: _typeshed.Incomplete
@classmethod
def __init__(cls, *args, **kwargs) -> None: ...
def __add__(self, other: typing.SupportsInt) -> Qt3DCore.QAspectEngine.RunMode: ...
Expand Down Expand Up @@ -138,7 +139,7 @@ class Qt3DCore(shiboken2.Object):
ReadOnly: typing.ClassVar[Qt3DCore.QBackendNode.Mode] = ...
ReadWrite: typing.ClassVar[Qt3DCore.QBackendNode.Mode] = ...
values: typing.ClassVar[dict] = ...
name: None
name: _typeshed.Incomplete
@classmethod
def __init__(cls, *args, **kwargs) -> None: ...
def __add__(self, other: typing.SupportsInt) -> Qt3DCore.QBackendNode.Mode: ...
Expand Down Expand Up @@ -253,7 +254,7 @@ class Qt3DCore(shiboken2.Object):
TrackAllValues: typing.ClassVar[Qt3DCore.QNode.PropertyTrackingMode] = ...
TrackFinalValues: typing.ClassVar[Qt3DCore.QNode.PropertyTrackingMode] = ...
values: typing.ClassVar[dict] = ...
name: None
name: _typeshed.Incomplete
@classmethod
def __init__(cls, *args, **kwargs) -> None: ...
def __add__(self, other: typing.SupportsInt) -> Qt3DCore.QNode.PropertyTrackingMode: ...
Expand Down Expand Up @@ -344,8 +345,8 @@ class Qt3DCore(shiboken2.Object):
def __ne__(self, other: object) -> bool: ...

class QNodeIdTypePair(shiboken2.Object):
id: None
type: None
id: _typeshed.Incomplete
type: _typeshed.Incomplete
@typing.overload
def __init__(self, _id: Qt3DCore.QNodeId, _type: PySide2.QtCore.QMetaObject) -> None: ...
@typing.overload
Expand Down Expand Up @@ -392,7 +393,7 @@ class Qt3DCore(shiboken2.Object):
DeliverToAll: typing.ClassVar[Qt3DCore.QSceneChange.DeliveryFlag] = ...
Nodes: typing.ClassVar[Qt3DCore.QSceneChange.DeliveryFlag] = ...
values: typing.ClassVar[dict] = ...
name: None
name: _typeshed.Incomplete
@classmethod
def __init__(cls, *args, **kwargs) -> None: ...
def __and__(self, other: typing.SupportsInt) -> Qt3DCore.QSceneChange.DeliveryFlags: ...
Expand Down Expand Up @@ -454,7 +455,7 @@ class Qt3DCore(shiboken2.Object):
NotReady: typing.ClassVar[Qt3DCore.QSkeletonLoader.Status] = ...
Ready: typing.ClassVar[Qt3DCore.QSkeletonLoader.Status] = ...
values: typing.ClassVar[dict] = ...
name: None
name: _typeshed.Incomplete
@classmethod
def __init__(cls, *args, **kwargs) -> None: ...
def __add__(self, other: typing.SupportsInt) -> Qt3DCore.QSkeletonLoader.Status: ...
Expand Down
21 changes: 11 additions & 10 deletions pyside/stubs/PySide2/Qt3DExtras.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,21 @@ import collections.abc
import shiboken2
import typing
T = typing.TypeVar('T')
import typing_extensions

class Qt3DExtras(shiboken2.Object):
class QAbstractCameraController(PySide2.Qt3DCore.Qt3DCore.QEntity):
class InputState(shiboken2.Object):
altKeyActive: None
leftMouseButtonActive: None
middleMouseButtonActive: None
rightMouseButtonActive: None
rxAxisValue: None
ryAxisValue: None
shiftKeyActive: None
txAxisValue: None
tyAxisValue: None
tzAxisValue: None
altKeyActive: _typeshed.Incomplete
leftMouseButtonActive: _typeshed.Incomplete
middleMouseButtonActive: _typeshed.Incomplete
rightMouseButtonActive: _typeshed.Incomplete
rxAxisValue: _typeshed.Incomplete
ryAxisValue: _typeshed.Incomplete
shiftKeyActive: _typeshed.Incomplete
txAxisValue: _typeshed.Incomplete
tyAxisValue: _typeshed.Incomplete
tzAxisValue: _typeshed.Incomplete
@typing.overload
def __init__(self, InputState: Qt3DExtras.QAbstractCameraController.InputState) -> None: ...
@typing.overload
Expand Down
13 changes: 7 additions & 6 deletions pyside/stubs/PySide2/Qt3DInput.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import collections.abc
import shiboken2
import typing
T = typing.TypeVar('T')
import typing_extensions

class Qt3DInput(shiboken2.Object):
class QAbstractActionInput(PySide2.Qt3DCore.Qt3DCore.QNode):
Expand Down Expand Up @@ -74,7 +75,7 @@ class Qt3DInput(shiboken2.Object):
Acceleration: typing.ClassVar[Qt3DInput.QAxisAccumulator.SourceAxisType] = ...
Velocity: typing.ClassVar[Qt3DInput.QAxisAccumulator.SourceAxisType] = ...
values: typing.ClassVar[dict] = ...
name: None
name: _typeshed.Incomplete
@classmethod
def __init__(cls, *args, **kwargs) -> None: ...
def __add__(self, other: typing.SupportsInt) -> Qt3DInput.QAxisAccumulator.SourceAxisType: ...
Expand Down Expand Up @@ -276,7 +277,7 @@ class Qt3DInput(shiboken2.Object):
X: typing.ClassVar[Qt3DInput.QMouseDevice.Axis] = ...
Y: typing.ClassVar[Qt3DInput.QMouseDevice.Axis] = ...
values: typing.ClassVar[dict] = ...
name: None
name: _typeshed.Incomplete
@classmethod
def __init__(cls, *args, **kwargs) -> None: ...
def __add__(self, other: typing.SupportsInt) -> Qt3DInput.QMouseDevice.Axis: ...
Expand Down Expand Up @@ -329,7 +330,7 @@ class Qt3DInput(shiboken2.Object):
NoButton: typing.ClassVar[Qt3DInput.QMouseEvent.Buttons] = ...
RightButton: typing.ClassVar[Qt3DInput.QMouseEvent.Buttons] = ...
values: typing.ClassVar[dict] = ...
name: None
name: _typeshed.Incomplete
@classmethod
def __init__(cls, *args, **kwargs) -> None: ...
def __add__(self, other: typing.SupportsInt) -> Qt3DInput.QMouseEvent.Buttons: ...
Expand Down Expand Up @@ -364,7 +365,7 @@ class Qt3DInput(shiboken2.Object):
NoModifier: typing.ClassVar[Qt3DInput.QMouseEvent.Modifiers] = ...
ShiftModifier: typing.ClassVar[Qt3DInput.QMouseEvent.Modifiers] = ...
values: typing.ClassVar[dict] = ...
name: None
name: _typeshed.Incomplete
@classmethod
def __init__(cls, *args, **kwargs) -> None: ...
def __add__(self, other: typing.SupportsInt) -> Qt3DInput.QMouseEvent.Modifiers: ...
Expand Down Expand Up @@ -441,7 +442,7 @@ class Qt3DInput(shiboken2.Object):
NoButton: typing.ClassVar[Qt3DInput.QWheelEvent.Buttons] = ...
RightButton: typing.ClassVar[Qt3DInput.QWheelEvent.Buttons] = ...
values: typing.ClassVar[dict] = ...
name: None
name: _typeshed.Incomplete
@classmethod
def __init__(cls, *args, **kwargs) -> None: ...
def __add__(self, other: typing.SupportsInt) -> Qt3DInput.QWheelEvent.Buttons: ...
Expand Down Expand Up @@ -476,7 +477,7 @@ class Qt3DInput(shiboken2.Object):
NoModifier: typing.ClassVar[Qt3DInput.QWheelEvent.Modifiers] = ...
ShiftModifier: typing.ClassVar[Qt3DInput.QWheelEvent.Modifiers] = ...
values: typing.ClassVar[dict] = ...
name: None
name: _typeshed.Incomplete
@classmethod
def __init__(cls, *args, **kwargs) -> None: ...
def __add__(self, other: typing.SupportsInt) -> Qt3DInput.QWheelEvent.Modifiers: ...
Expand Down
2 changes: 2 additions & 0 deletions pyside/stubs/PySide2/Qt3DLogic.pyi
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
import PySide2.Qt3DCore
import PySide2.QtCore
import _typeshed
import collections.abc
import shiboken2
import typing
T = typing.TypeVar('T')
import typing_extensions

class Qt3DLogic(shiboken2.Object):
class QFrameAction(PySide2.Qt3DCore.Qt3DCore.QComponent):
Expand Down
Loading

0 comments on commit 3c40572

Please sign in to comment.