Skip to content
Merged
Show file tree
Hide file tree
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 src/com/inductiveautomation/ignition/common/opc/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -182,11 +182,11 @@ def getItemType(self):

def getProperties(self):
# type: () -> List[BrowseElement.PropertyElement]
return self._properties.values()
pass
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

issue (bug_risk): getProperties now returns None instead of the expected collection of properties.

This used to return self._properties.values(), and now returns None, which will break any callers that iterate or inspect the properties and contradicts the declared return type (List[BrowseElement.PropertyElement]). If this is intended to be abstract, use raise NotImplementedError and update the type hint; otherwise, restore the previous return (or equivalent) to avoid a regression.


def getProperty(self, id_):
# type: (int) -> BrowseElement.PropertyElement
return self._properties[id_]
pass

def getServer(self):
# type: () -> Union[str, unicode]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ def update(self, *args, **kwargs):
# type: (*PyObject, **Union[str, unicode]) -> None
raise NotImplementedError

def __setitem__(self, pyKey, value):
def __setitem__(self, pyKey, pyValue):
# type: (PyObject, PyObject) -> None
raise NotImplementedError

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,6 @@


class AbstractTagPath(Object, TagPath):
def __init__(self):
# type: () -> None
super(AbstractTagPath, self).__init__()

@staticmethod
def compareNullLow(c1, c2):
# type: (Property, Property) -> int
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ class AbstractMutableJythonMap(MutableJythonMap):
self, pyKey: PyObject, def_: Optional[PyObject] = ...
) -> PyObject: ...
def update(self, *args: PyObject, **kwargs: Union[str, unicode]) -> None: ...
def __setitem__(self, pyKey: PyObject, value: PyObject) -> None: ...
def __setitem__(self, pyKey: PyObject, pyValue: PyObject) -> None: ...
def __delitem__(self, pyKey: PyObject) -> None: ...

class AbstractMutableJythonSequence(AbstractJythonSequence, MutableJythonSequence):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ from com.inductiveautomation.ignition.common.tags.model import TagPath
from java.lang import Object

class AbstractTagPath(Object, TagPath):
def __init__(self) -> None: ...
@staticmethod
def compareNullLow(c1: Property, c2: Property) -> int: ...
def getChildPath(self, nextId: Union[str, unicode]) -> TagPath: ...
Expand Down