File tree Expand file tree Collapse file tree 2 files changed +5
-21
lines changed Expand file tree Collapse file tree 2 files changed +5
-21
lines changed Original file line number Diff line number Diff line change 3636import shutil
3737import tempfile
3838import warnings
39-
40- import six
41- from six .moves .urllib .request import urlopen
39+ from urllib .request import urlopen
4240
4341import pytest
4442import numpy as np
4543
4644
47- if six .PY2 :
48- def abstractstaticmethod (func ):
49- return func
50- def abstractclassmethod (func ):
51- return func
52- else :
53- abstractstaticmethod = abc .abstractstaticmethod
54- abstractclassmethod = abc .abstractclassmethod
45+ abstractstaticmethod = abc .abstractstaticmethod
46+ abstractclassmethod = abc .abstractclassmethod
5547
5648
57- @six .add_metaclass (abc .ABCMeta )
58- class BaseDiff (object ):
49+ class BaseDiff (object , metaclass = abc .ABCMeta ):
5950
6051 @abstractstaticmethod
6152 def read (filename ):
@@ -142,14 +133,7 @@ def read(filename):
142133 @staticmethod
143134 def write (filename , data , ** kwargs ):
144135 fmt = kwargs .get ('fmt' , '%g' )
145- # Workaround for a known issue in `numpy.savetxt` for the `fmt` argument:
146- # https://github.com/numpy/numpy/pull/4053#issuecomment-263808221
147- # Convert `unicode` to `str` (i.e. bytes) on Python 2
148- if six .PY2 and isinstance (fmt , six .text_type ):
149- fmt = fmt .encode ('ascii' )
150-
151136 kwargs ['fmt' ] = fmt
152-
153137 return np .savetxt (filename , data , ** kwargs )
154138
155139
Original file line number Diff line number Diff line change @@ -45,4 +45,4 @@ markers =
4545 array_compare : for functions using array comparison
4646
4747[flake8]
48- max-line-length = 100
48+ max-line-length = 150
You can’t perform that action at this time.
0 commit comments