Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
Python3 ArmarX
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Software
ArmarX
Python3 ArmarX
Commits
75c6b75b
Commit
75c6b75b
authored
2 years ago
by
Rainer Kartmann
Browse files
Options
Downloads
Patches
Plain Diff
Allow passing a logger
parent
b645ae42
Loading
Loading
1 merge request
!33
Improve aron dict to dataclass
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
armarx_memory/aron/aron_dataclass.py
+8
-2
8 additions, 2 deletions
armarx_memory/aron/aron_dataclass.py
with
8 additions
and
2 deletions
armarx_memory/aron/aron_dataclass.py
+
8
−
2
View file @
75c6b75b
import
logging
import
dataclasses
as
dc
import
typing
as
ty
...
...
@@ -32,12 +34,16 @@ class AronDataclass:
return
dataclass_from_dict
(
cls
,
data
)
@classmethod
def
from_aron_ice
(
cls
,
data
:
"
armarx.aron.data.dto.Dict
"
)
->
"
AronDataclass
"
:
def
from_aron_ice
(
cls
,
data
:
"
armarx.aron.data.dto.Dict
"
,
logger
:
logging
.
Logger
=
None
,
)
->
"
AronDataclass
"
:
from
armarx_memory.aron.conversion.dataclass_from_to_aron_ice
import
(
dataclass_from_aron_ice
,
)
return
dataclass_from_aron_ice
(
cls
,
data
,
options
=
cls
.
_get_conversion_options
())
return
dataclass_from_aron_ice
(
cls
,
data
,
options
=
cls
.
_get_conversion_options
()
,
logger
=
logger
)
@classmethod
def
_get_conversion_options
(
cls
)
->
ty
.
Optional
[
"
ConversionOptions
"
]:
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment