Skip to content

Commit 0565717

Browse files
authored
Merge pull request #29 from pllim/fix-ci
TST: Fix CI
2 parents c94a755 + bda931d commit 0565717

File tree

2 files changed

+5
-21
lines changed

2 files changed

+5
-21
lines changed

pytest_arraydiff/plugin.py

Lines changed: 4 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -36,26 +36,17 @@
3636
import shutil
3737
import tempfile
3838
import warnings
39-
40-
import six
41-
from six.moves.urllib.request import urlopen
39+
from urllib.request import urlopen
4240

4341
import pytest
4442
import 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

setup.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff 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

0 commit comments

Comments
 (0)