Skip to content

Commit b5fc1b1

Browse files
committed
RF: Drop six.*metaclass
1 parent c1ccbb1 commit b5fc1b1

File tree

3 files changed

+5
-9
lines changed

3 files changed

+5
-9
lines changed

nibabel/cifti2/cifti2_axes.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@
120120
"""
121121
import numpy as np
122122
from . import cifti2
123-
from six import string_types, add_metaclass, integer_types
123+
from six import string_types, integer_types
124124
from operator import xor
125125
import abc
126126

@@ -173,8 +173,7 @@ def to_header(axes):
173173
return cifti2.Cifti2Header(matrix)
174174

175175

176-
@add_metaclass(abc.ABCMeta)
177-
class Axis(object):
176+
class Axis(abc.ABC):
178177
"""
179178
Abstract class for any object describing the rows or columns of a CIFTI-2 vector/matrix
180179

nibabel/streamlines/tractogram_file.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
""" Define abstract interface for Tractogram file classes
22
"""
3-
from abc import ABCMeta, abstractmethod
4-
from six import with_metaclass
3+
from abc import ABC, abstractmethod
54

65
from .header import Field
76

@@ -34,7 +33,7 @@ def __init__(self, callable):
3433
super(abstractclassmethod, self).__init__(callable)
3534

3635

37-
class TractogramFile(with_metaclass(ABCMeta)):
36+
class TractogramFile(ABC):
3837
""" Convenience class to encapsulate tractogram file format. """
3938

4039
def __init__(self, tractogram, header=None):

nibabel/tests/test_api_validators.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
""" Metaclass and class for validating instance APIs
22
"""
33

4-
from six import with_metaclass
5-
64
from nose.tools import assert_equal
75

86

@@ -32,7 +30,7 @@ def meth(self):
3230
return klass
3331

3432

35-
class ValidateAPI(with_metaclass(validator2test)):
33+
class ValidateAPI(metaclass=validator2test):
3634
""" A class to validate APIs
3735
3836
Your job is twofold:

0 commit comments

Comments
 (0)