Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
FSL
fsleyes
fsleyes-props
Commits
023258e0
Commit
023258e0
authored
Oct 03, 2019
by
Paul McCarthy
🚵
Browse files
RF: Use abc instead of collections, fix docstring
parent
128c21b5
Changes
3
Hide whitespace changes
Inline
Side-by-side
fsleyes_props/properties_types.py
View file @
023258e0
...
@@ -33,7 +33,7 @@ added as attributes of a :class:`.HasProperties` class definition.
...
@@ -33,7 +33,7 @@ added as attributes of a :class:`.HasProperties` class definition.
import
os.path
as
op
import
os.path
as
op
import
collections
from
collections
import
abc
import
six
import
six
...
@@ -798,7 +798,7 @@ class Colour(props.PropertyBase):
...
@@ -798,7 +798,7 @@ class Colour(props.PropertyBase):
"""
"""
props
.
PropertyBase
.
validate
(
self
,
instance
,
attributes
,
value
)
props
.
PropertyBase
.
validate
(
self
,
instance
,
attributes
,
value
)
if
(
not
isinstance
(
value
,
collections
.
Sequence
))
or
\
if
(
not
isinstance
(
value
,
abc
.
Sequence
))
or
\
(
len
(
value
)
not
in
(
3
,
4
)):
(
len
(
value
)
not
in
(
3
,
4
)):
raise
ValueError
(
'Colour must be a sequence of three/four values'
)
raise
ValueError
(
'Colour must be a sequence of three/four values'
)
...
...
fsleyes_props/properties_value.py
View file @
023258e0
...
@@ -1178,7 +1178,7 @@ class PropertyValueList(PropertyValue):
...
@@ -1178,7 +1178,7 @@ class PropertyValueList(PropertyValue):
def
move
(
self
,
from_
,
to
):
def
move
(
self
,
from_
,
to
):
"""Move the item from
'
from
\_'
to
'to'
."""
"""Move the item from
``
from
_``
to
``to``
."""
propVals
=
self
.
getPropertyValueList
()
propVals
=
self
.
getPropertyValueList
()
propVals
.
insert
(
to
,
propVals
.
pop
(
from_
))
propVals
.
insert
(
to
,
propVals
.
pop
(
from_
))
...
...
fsleyes_props/widgets.py
View file @
023258e0
...
@@ -98,7 +98,7 @@ import sys
...
@@ -98,7 +98,7 @@ import sys
import
os
import
os
import
os.path
as
op
import
os.path
as
op
from
collections
import
Iterable
from
collections
.abc
import
Iterable
import
six
import
six
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment