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): Replacing getProperties return with pass will break callers expecting a list of PropertyElement

This changes the method from returning a list-like collection of BrowseElement.PropertyElement to returning None, which will break existing callers (iteration, len, indexing, etc.). If the method is meant to be unimplemented, raise NotImplementedError; otherwise it should continue returning the underlying collection (or an appropriate wrapper).


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 @@ -294,7 +294,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 @@ -84,7 +84,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