Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
CaosDB Crawler
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
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 Crawler
Commits
197bf0ab
Commit
197bf0ab
authored
5 months ago
by
Alexander Schlemmer
Browse files
Options
Downloads
Patches
Plain Diff
DOC(transformers): added docstrings to cast_to_* functions
parent
facdec19
No related branches found
No related tags found
2 merge requests
!217
TST: Make NamedTemporaryFiles Windows-compatible
,
!203
New transformer functions for casting types of variables
Pipeline
#58313
passed
5 months ago
Stage: info
Stage: setup
Stage: cert
Stage: style
Stage: test
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/caoscrawler/transformer_functions.py
+28
-0
28 additions, 0 deletions
src/caoscrawler/transformer_functions.py
with
28 additions
and
0 deletions
src/caoscrawler/transformer_functions.py
+
28
−
0
View file @
197bf0ab
...
...
@@ -102,16 +102,44 @@ Parameters
def
cast_to_int
(
in_value
:
Any
,
params
:
dict
)
->
int
:
"""
Cast the `in_value` to int.
Parameters
==========
No parameters.
"""
return
int
(
in_value
)
def
cast_to_float
(
in_value
:
Any
,
params
:
dict
)
->
float
:
"""
Cast the `in_value` to float.
Parameters
==========
No parameters.
"""
return
float
(
in_value
)
def
cast_to_bool
(
in_value
:
Any
,
params
:
dict
)
->
bool
:
"""
Cast the `in_value` to bool.
Parameters
==========
No parameters.
"""
return
bool
(
in_value
)
def
cast_to_str
(
in_value
:
Any
,
params
:
dict
)
->
str
:
"""
Cast the `in_value` to str.
Parameters
==========
No parameters.
"""
return
str
(
in_value
)
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