Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
C
caosdb-pylib
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
caosdb
Software
caosdb-pylib
Commits
dc298f3c
Commit
dc298f3c
authored
5 months ago
by
Alexander Schlemmer
Browse files
Options
Downloads
Patches
Plain Diff
STY: autopep8
parent
edc39b3e
No related branches found
No related tags found
2 merge requests
!159
Release 0.16.o
,
!154
Added the possibility to use custom labels instead of 'old' and 'new'
Pipeline
#57485
passed with warnings
5 months ago
Stage: code_style
Stage: linting
Stage: test
Stage: deploy
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/linkahead/apiutils.py
+4
-4
4 additions, 4 deletions
src/linkahead/apiutils.py
with
4 additions
and
4 deletions
src/linkahead/apiutils.py
+
4
−
4
View file @
dc298f3c
...
...
@@ -447,7 +447,7 @@ def compare_entities(entity0: Optional[Entity] = None,
return
diff
def
empty_diff
(
entity0
:
Entity
,
def
empty_diff
(
entity0
:
Entity
,
entity1
:
Entity
,
compare_referenced_records
:
bool
=
False
,
entity_name_id_equivalency
:
bool
=
False
,
...
...
@@ -484,7 +484,7 @@ def empty_diff(entity0: Entity,
if
entity1
is
not
None
:
raise
ValueError
(
"
You cannot use both entity1 and new_entity
"
)
entity1
=
new_entity
e0diff
,
e1diff
=
compare_entities
(
entity0
,
entity1
,
compare_referenced_records
,
e0diff
,
e1diff
=
compare_entities
(
entity0
,
entity1
,
compare_referenced_records
,
entity_name_id_equivalency
)
for
diff
in
[
e0diff
,
e1diff
]:
for
key
in
[
"
parents
"
,
"
properties
"
]:
...
...
@@ -689,10 +689,10 @@ def describe_diff(entity0_diff: dict[str, Any], entity1_diff: dict[str, Any],
warnings
.
warn
(
"'
as_update
'
is deprecated. Do not use it.
"
,
DeprecationWarning
)
if
olddiff
:
warnings
.
warn
(
"'
olddiff
'
is deprecated. Use
'
entity0_diff
'
instead.
"
,
DeprecationWarning
)
entity0_diff
=
olddiff
entity0_diff
=
olddiff
if
newdiff
:
warnings
.
warn
(
"'
newdiff
'
is deprecated. Use
'
entity1_diff
'
instead.
"
,
DeprecationWarning
)
entity1_diff
=
newdiff
entity1_diff
=
newdiff
for
attr
in
list
(
set
(
list
(
entity0_diff
.
keys
())
+
list
(
entity1_diff
.
keys
()))):
if
attr
==
"
parents
"
or
attr
==
"
properties
"
:
...
...
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