import os.path
import pickle
import shutil
-import six
import subprocess
import textwrap
# Settings.
#
-class MetaSetting(type):
+class MetaSetting(abc.ABCMeta):
def __new__(mcls, name, bases, d):
- cls = super(MetaSetting, mcls).__new__(mcls, name, bases, d)
+ cls = super().__new__(mcls, name, bases, d)
key = d.get('key', None)
if key is not None:
assert('default' in d)
all_settings[key] = instance
return cls
-@six.add_metaclass(MetaSetting)
-@six.add_metaclass(abc.ABCMeta)
-class Setting(object):
+class Setting(object, metaclass=MetaSetting):
key = None
@abc.abstractmethod
# Steps of the build process.
#
-class MetaStep(type):
+class MetaStep(abc.ABCMeta):
def __new__(mcls, name, bases, d):
- cls = super(MetaStep, mcls).__new__(mcls, name, bases, d)
+ cls = super().__new__(mcls, name, bases, d)
number = d.get('number', None)
if number is not None:
all_steps[number] = cls()
return cls
-@six.add_metaclass(MetaStep)
-@six.add_metaclass(abc.ABCMeta)
-class Step(object):
+class Step(object, metaclass=MetaStep):
'Steps to set up a cross compiling gcc.'
number = None
import re
import sys
-from six import add_metaclass
-
from . import style
from . import sort_includes
from .region import *
return regions
-@add_metaclass(ABCMeta)
-class Verifier(object):
+class Verifier(object, metaclass=ABCMeta):
"""Base class for style verifiers
Verifiers check for style violations and optionally fix such
"""
pass
-@add_metaclass(ABCMeta)
class LineVerifier(Verifier):
def check(self, filename, regions=all_regions, fobj=None, silent=False):
close = False