Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
opcua-asyncio
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Nikola Balog
opcua-asyncio
Commits
d5b30e8d
Commit
d5b30e8d
authored
Jun 06, 2022
by
vruge
Committed by
oroulet
Jun 06, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mypy fix
parent
054ac70d
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
7 deletions
+5
-7
asyncua/common/events.py
asyncua/common/events.py
+3
-4
asyncua/common/structures104.py
asyncua/common/structures104.py
+1
-1
tests/test_unit.py
tests/test_unit.py
+1
-2
No files found.
asyncua/common/events.py
View file @
d5b30e8d
...
...
@@ -173,9 +173,9 @@ async def select_clauses_from_evtype(evtypes: List["Node"]):
await
_append_new_attribute_to_select_clauses
(
property
,
select_clauses
,
already_selected
,
[])
for
variable
in
await
get_event_variables_from_type_node
(
evtype
):
await
_append_new_attribute_to_select_clauses
(
variable
,
select_clauses
,
already_selected
,
[])
await
_select_clause_from_childs
(
variable
,
select_clauses
,
already_selected
,
[
await
variable
.
read_browse_name
()])
await
_select_clause_from_childs
(
variable
,
select_clauses
,
already_selected
,
[
await
variable
.
read_browse_name
()])
# type: ignore
for
object
in
await
get_event_objects_from_type_node
(
evtype
):
await
_select_clause_from_childs
(
object
,
select_clauses
,
already_selected
,
[
await
object
.
read_browse_name
()])
await
_select_clause_from_childs
(
object
,
select_clauses
,
already_selected
,
[
await
object
.
read_browse_name
()])
# type: ignore
return
select_clauses
...
...
@@ -199,8 +199,7 @@ async def where_clause_from_evtype(evtypes: List["Node"]):
subtypes
.
append
(
st
.
nodeid
)
subtypes
=
list
(
set
(
subtypes
))
# remove duplicates
for
subtypeid
in
subtypes
:
op
=
ua
.
LiteralOperand
()
op
.
Value
=
ua
.
Variant
(
subtypeid
)
op
=
ua
.
LiteralOperand
(
Value
=
ua
.
Variant
(
subtypeid
))
el
.
FilterOperands
.
append
(
op
)
el
.
FilterOperator
=
ua
.
FilterOperator
.
InList
cf
.
Elements
.
append
(
el
)
...
...
asyncua/common/structures104.py
View file @
d5b30e8d
...
...
@@ -330,7 +330,7 @@ async def _get_parent_types(node: Node):
refs
=
await
tmp_node
.
get_references
(
refs
=
ua
.
ObjectIds
.
HasSubtype
,
direction
=
ua
.
BrowseDirection
.
Inverse
)
if
not
refs
or
refs
[
0
].
NodeId
.
NamespaceIndex
==
0
and
refs
[
0
].
NodeId
.
Identifier
==
22
:
return
parents
tmp_node
=
ua
.
Node
(
tmp_node
.
server
,
refs
[
0
])
tmp_node
=
Node
(
tmp_node
.
server
,
refs
[
0
])
parents
.
append
(
tmp_node
)
logger
.
warning
(
"Went 10 layers up while look of subtype of given node %s, something is wrong: %s"
,
node
,
parents
)
...
...
tests/test_unit.py
View file @
d5b30e8d
...
...
@@ -722,8 +722,7 @@ def test_where_clause():
op
.
BrowsePath
.
append
(
ua
.
QualifiedName
(
"property"
,
2
))
el
.
FilterOperands
.
append
(
op
)
for
i
in
range
(
10
):
op
=
ua
.
LiteralOperand
()
op
.
Value
=
ua
.
Variant
(
i
)
op
=
ua
.
LiteralOperand
(
Value
=
ua
.
Variant
(
i
))
el
.
FilterOperands
.
append
(
op
)
el
.
FilterOperator
=
ua
.
FilterOperator
.
InList
cf
.
Elements
.
append
(
el
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment