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
6 changes: 5 additions & 1 deletion src/system/historian/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"updateRegisteredNodePath",
]

from typing import Any, List, Optional, Union
from typing import Any, Dict, List, Optional, Union

from java.util import Date

Expand Down Expand Up @@ -65,6 +65,7 @@ def queryAggregatedPoints(
columnNames=None, # type: Optional[List[Union[str, unicode]]]
returnFormat="Wide", # type: str
returnSize=1, # type: int
extendedProperties=None, # type: Optional[Dict[Union[str, unicode], Any]]
):
# type: (...) -> BasicDataset
"""Queries aggregated data points for the specified historian.
Expand All @@ -80,6 +81,8 @@ def queryAggregatedPoints(
dataset. Optional.
returnFormat: The desired return format for the query. Optional.
returnSize: The number maximum of results to return. Optional.
extendedProperties: A dictionary of extended query properties
for the SQL Historian only. Optional.

Returns:
A dataset representing the aggregated points for the specified
Expand All @@ -93,6 +96,7 @@ def queryAggregatedPoints(
columnNames,
returnFormat,
returnSize,
extendedProperties,
)
return BasicDataset()

Expand Down
3 changes: 2 additions & 1 deletion stubs/stubs/system/historian/__init__.pyi
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from typing import Any, List, Optional, Union
from typing import Any, Dict, List, Optional, Union

from com.inductiveautomation.ignition.common import BasicDataset
from com.inductiveautomation.ignition.common.browsing import Results
Expand All @@ -17,6 +17,7 @@ def queryAggregatedPoints(
columnNames: Optional[List[Union[str, unicode]]] = ...,
returnFormat: str = ...,
returnSize: int = ...,
extendedProperties: Optional[Dict[Union[str, unicode], Any]] = ...,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Medium · New keyword fails type checking

When a type checker resolves system.historian through the root-level or sibling module stub, the stub lacks an extendedProperties parameter, so calls passing that keyword are rejected and callers cannot type-check the new API parameter.

Add the extendedProperties parameter to the root-level system.historian stub to match the package stub.

Prompt for AI agents
In `stubs/stubs/system/historian/__init__.pyi` at line 20:

**New keyword fails type checking**

When a type checker resolves `system.historian` through the root-level or sibling module stub, the stub lacks an `extendedProperties` parameter, so calls passing that keyword are rejected and callers cannot type-check the new API parameter.

Add the `extendedProperties` parameter to the root-level `system.historian` stub to match the package stub.

) -> BasicDataset: ...
def queryAnnotations(
paths: List[Union[str, unicode]],
Expand Down
Loading