Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
DuniterPy
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
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository 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
clients
python
DuniterPy
Commits
6b338163
Commit
6b338163
authored
6 years ago
by
Vincent Texier
Browse files
Options
Downloads
Patches
Plain Diff
[enh]
#91
fix pylint alerts in documents.block_uid module
parent
04ed7ad4
No related branches found
No related tags found
1 merge request
!60
Pylint
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
duniterpy/documents/block_uid.py
+5
-3
5 additions, 3 deletions
duniterpy/documents/block_uid.py
with
5 additions
and
3 deletions
duniterpy/documents/block_uid.py
+
5
−
3
View file @
6b338163
...
@@ -89,10 +89,12 @@ def block_uid(value: Union[str, BlockUID, None]) -> BlockUID:
...
@@ -89,10 +89,12 @@ def block_uid(value: Union[str, BlockUID, None]) -> BlockUID:
:return:
:return:
"""
"""
if
isinstance
(
value
,
BlockUID
):
if
isinstance
(
value
,
BlockUID
):
re
turn
value
re
sult
=
value
elif
isinstance
(
value
,
str
):
elif
isinstance
(
value
,
str
):
re
turn
BlockUID
.
from_str
(
value
)
re
sult
=
BlockUID
.
from_str
(
value
)
elif
value
is
None
:
elif
value
is
None
:
re
turn
BlockUID
.
empty
()
re
sult
=
BlockUID
.
empty
()
else
:
else
:
raise
TypeError
(
"
Cannot convert {0} to BlockUID
"
.
format
(
type
(
value
)))
raise
TypeError
(
"
Cannot convert {0} to BlockUID
"
.
format
(
type
(
value
)))
return
result
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