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
81c5837b
Verified
Commit
81c5837b
authored
1 year ago
by
Daniel Hornung
Browse files
Options
Downloads
Patches
Plain Diff
MAINT: Cleaned up the code a bit more.
parent
671b1e12
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!130
Release v0.14.0
Pipeline
#47380
passed
1 year ago
Stage: code_style
Stage: linting
Stage: setup
Stage: test
Stage: deploy
Changes
2
Pipelines
7
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/linkahead/utils/get_entity.py
+2
-2
2 additions, 2 deletions
src/linkahead/utils/get_entity.py
unittests/test_utils.py
+1
-2
1 addition, 2 deletions
unittests/test_utils.py
with
3 additions
and
4 deletions
src/linkahead/utils/get_entity.py
+
2
−
2
View file @
81c5837b
...
...
@@ -24,7 +24,7 @@
from
typing
import
Union
from
..common.models
import
Entity
,
execute_query
from
.escape
import
escape_quoted_text
from
.escape
import
escape_
s
quoted_text
def
get_entity_by_name
(
name
:
str
)
->
Entity
:
...
...
@@ -32,7 +32,7 @@ def get_entity_by_name(name: str) -> Entity:
Submits the query
"
FIND ENTITY WITH name=
'
{name}
'"
.
"""
name
=
escape_quoted_text
(
name
)
name
=
escape_
s
quoted_text
(
name
)
return
execute_query
(
f
"
FIND ENTITY WITH name=
'
{
name
}
'"
,
unique
=
True
)
...
...
This diff is collapsed.
Click to expand it.
unittests/test_utils.py
+
1
−
2
View file @
81c5837b
...
...
@@ -25,8 +25,7 @@
from
__future__
import
unicode_literals
from
linkahead.common.utils
import
xml2str
from
linkahead.utils.escape
import
(
escape_dquoted_text
,
escape_quoted_text
,
escape_squoted_text
)
from
linkahead.utils.escape
import
(
escape_dquoted_text
,
escape_squoted_text
)
from
lxml.etree
import
Element
...
...
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