Skip to content

Commit

Permalink
RF: Drop six.*metaclass
Browse files Browse the repository at this point in the history
  • Loading branch information
effigies committed Aug 12, 2019
1 parent c4d50ff commit 676be6b
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 9 deletions.
5 changes: 2 additions & 3 deletions nibabel/cifti2/cifti2_axes.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@
"""
import numpy as np
from . import cifti2
from six import string_types, add_metaclass, integer_types
from six import string_types, integer_types
from operator import xor
import abc

Expand Down Expand Up @@ -173,8 +173,7 @@ def to_header(axes):
return cifti2.Cifti2Header(matrix)


@add_metaclass(abc.ABCMeta)
class Axis(object):
class Axis(abc.ABC):
"""
Abstract class for any object describing the rows or columns of a CIFTI-2 vector/matrix
Expand Down
5 changes: 2 additions & 3 deletions nibabel/streamlines/tractogram_file.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
""" Define abstract interface for Tractogram file classes
"""
from abc import ABCMeta, abstractmethod
from six import with_metaclass
from abc import ABC, abstractmethod

from .header import Field

Expand Down Expand Up @@ -34,7 +33,7 @@ def __init__(self, callable):
super(abstractclassmethod, self).__init__(callable)


class TractogramFile(with_metaclass(ABCMeta)):
class TractogramFile(ABC):
""" Convenience class to encapsulate tractogram file format. """

def __init__(self, tractogram, header=None):
Expand Down
4 changes: 1 addition & 3 deletions nibabel/tests/test_api_validators.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
""" Metaclass and class for validating instance APIs
"""

from six import with_metaclass

from nose.tools import assert_equal


Expand Down Expand Up @@ -32,7 +30,7 @@ def meth(self):
return klass


class ValidateAPI(with_metaclass(validator2test)):
class ValidateAPI(metaclass=validator2test):
""" A class to validate APIs
Your job is twofold:
Expand Down

0 comments on commit 676be6b

Please sign in to comment.