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 36
36
import shutil
37
37
import tempfile
38
38
import warnings
39
-
40
- import six
41
- from six .moves .urllib .request import urlopen
39
+ from urllib .request import urlopen
42
40
43
41
import pytest
44
42
import numpy as np
45
43
46
44
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
55
47
56
48
57
- @six .add_metaclass (abc .ABCMeta )
58
- class BaseDiff (object ):
49
+ class BaseDiff (object , metaclass = abc .ABCMeta ):
59
50
60
51
@abstractstaticmethod
61
52
def read (filename ):
@@ -142,14 +133,7 @@ def read(filename):
142
133
@staticmethod
143
134
def write (filename , data , ** kwargs ):
144
135
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
-
151
136
kwargs ['fmt' ] = fmt
152
-
153
137
return np .savetxt (filename , data , ** kwargs )
154
138
155
139
Original file line number Diff line number Diff line change @@ -45,4 +45,4 @@ markers =
45
45
array_compare : for functions using array comparison
46
46
47
47
[flake8]
48
- max-line-length = 100
48
+ max-line-length = 150
You can’t perform that action at this time.
0 commit comments