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
6710e860
Commit
6710e860
authored
3 years ago
by
Alexander Schlemmer
Browse files
Options
Downloads
Patches
Plain Diff
MAINT: removed obsolete last id attribute and function
parent
86e2f1ef
No related branches found
Branches containing commit
No related tags found
Tags containing commit
2 merge requests
!57
RELEASE 0.7.3
,
!52
F refactor high level api
Pipeline
#19997
canceled
3 years 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/caosdb/high_level_api.py
+6
-13
6 additions, 13 deletions
src/caosdb/high_level_api.py
with
6 additions
and
13 deletions
src/caosdb/high_level_api.py
+
6
−
13
View file @
6710e860
...
...
@@ -111,8 +111,6 @@ class CaosDBPythonUnresolvedReference(CaosDBPythonUnresolved):
class
CaosDBPythonEntity
(
object
):
_last_id
=
0
def
__init__
(
self
):
"""
Initialize a new CaosDBPythonEntity for the high level python api.
...
...
@@ -146,6 +144,10 @@ class CaosDBPythonEntity(object):
# which must not be changed by the set_property function.
self
.
_forbidden
=
dir
(
self
)
+
[
"
_forbidden
"
]
def
use_parameter
(
self
,
name
,
value
):
self
.
__setattr__
(
name
,
value
)
return
value
@property
def
id
(
self
):
"""
...
...
@@ -224,17 +226,6 @@ class CaosDBPythonEntity(object):
def
version
(
self
,
val
:
str
):
self
.
_version
=
val
# @staticmethod
# def _get_new_id():
# """
# Get a new negative ID for a CaosDB Entity.
# The first ID is -1 and decremented with each call of this function.
# """
# CaosDBPythonEntity._last_id -= 1
# return CaosDBPythonEntity._last_id
def
_set_property_from_entity
(
self
,
ent
:
db
.
Entity
,
importance
:
str
,
references
:
Optional
[
db
.
Container
]):
"""
...
...
@@ -709,6 +700,8 @@ def _single_convert_to_python_object(robj: CaosDBPythonEntity,
for
base_attribute
in
BASE_ATTRIBUTES
:
val
=
entity
.
__getattribute__
(
base_attribute
)
if
val
is
not
None
:
if
isinstance
(
val
,
db
.
common
.
models
.
Version
):
val
=
val
.
id
robj
.
__setattr__
(
base_attribute
,
val
)
for
prop
in
entity
.
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