提交 31c0fd72 authored 作者: Iban Harlouchet's avatar Iban Harlouchet 提交者: Iban Harlouchet

flake8 for theano/misc/ordered_set.py

上级 f09999ce
from __future__ import print_function
from collections import MutableSet
from theano.compat import OrderedDict
import types
import weakref
from six import string_types
......@@ -37,7 +38,7 @@ def check_deterministic(iterable):
# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
# {{{ http://code.activestate.com/recipes/576696/ (r5)
import weakref
class Link(object):
# This make that we need to use a different pickle protocol
......@@ -61,6 +62,7 @@ class Link(object):
if len(state) == 3:
self.key = state[2]
class OrderedSet(MutableSet):
'Set the remembers the order elements were added'
# Big-O running times for all methods are the same as for regular sets.
......@@ -179,10 +181,10 @@ class OrderedSet(MutableSet):
elif isinstance(other, set):
# Raise exception to avoid confusion.
raise TypeError(
'Cannot compare an `OrderedSet` to a `set` because '
'this comparison cannot be made symmetric: please '
'manually cast your `OrderedSet` into `set` before '
'performing this comparison.')
'Cannot compare an `OrderedSet` to a `set` because '
'this comparison cannot be made symmetric: please '
'manually cast your `OrderedSet` into `set` before '
'performing this comparison.')
else:
return NotImplemented
......
......@@ -184,7 +184,6 @@ whitelist_flake8 = [
"scan_module/scan_opt.py",
"scan_module/tests/test_scan.py",
"scan_module/tests/test_scan_opt.py",
"misc/ordered_set.py",
"misc/strutil.py",
"misc/gnumpy_utils.py",
"misc/may_share_memory.py",
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论