diff options
author | Charles Harris <charlesr.harris@gmail.com> | 2011-04-05 13:28:50 -0600 |
---|---|---|
committer | Charles Harris <charlesr.harris@gmail.com> | 2011-04-05 13:28:50 -0600 |
commit | 2812406e48a7ffa011dc60ed37dda6131c08ae3d (patch) | |
tree | b1aed2c18202686fde71124ebaa4771d52b6afce | |
parent | 06dc70263debc5fbbb3e58592c91ca24766b3e3a (diff) | |
download | numpy-2812406e48a7ffa011dc60ed37dda6131c08ae3d.tar.gz |
STY: Replace remaining old style classes with classes subclassing object.
-rw-r--r-- | numpy/_import_tools.py | 2 | ||||
-rw-r--r-- | numpy/core/code_generators/genapi.py | 8 | ||||
-rw-r--r-- | numpy/core/getlimits.py | 2 | ||||
-rw-r--r-- | numpy/distutils/environment.py | 2 | ||||
-rw-r--r-- | numpy/distutils/misc_util.py | 2 | ||||
-rw-r--r-- | numpy/lib/_iotools.py | 6 | ||||
-rwxr-xr-x | numpy/linalg/lapack_lite/make_lite.py | 4 | ||||
-rw-r--r-- | numpy/ma/timer_comparison.py | 2 | ||||
-rw-r--r-- | numpy/numarray/numerictypes.py | 4 | ||||
-rwxr-xr-x | numpy/testing/print_coercion_tables.py | 2 | ||||
-rw-r--r-- | numpy/testing/utils.py | 2 |
11 files changed, 18 insertions, 18 deletions
diff --git a/numpy/_import_tools.py b/numpy/_import_tools.py index 38bf712fe..c0a901a8d 100644 --- a/numpy/_import_tools.py +++ b/numpy/_import_tools.py @@ -3,7 +3,7 @@ import sys __all__ = ['PackageLoader'] -class PackageLoader: +class PackageLoader(object): def __init__(self, verbose=False, infunc=False): """ Manages loading packages. """ diff --git a/numpy/core/code_generators/genapi.py b/numpy/core/code_generators/genapi.py index 2f6d0039a..3cded2810 100644 --- a/numpy/core/code_generators/genapi.py +++ b/numpy/core/code_generators/genapi.py @@ -257,7 +257,7 @@ def should_rebuild(targets, source_files): return False # Those *Api classes instances know how to output strings for the generated code -class TypeApi: +class TypeApi(object): def __init__(self, name, index, ptr_cast, api_name): self.index = index self.name = name @@ -283,7 +283,7 @@ class TypeApi: """ % {'type': self.name} return astr -class GlobalVarApi: +class GlobalVarApi(object): def __init__(self, name, index, type, api_name): self.name = name self.index = index @@ -311,7 +311,7 @@ class GlobalVarApi: # Dummy to be able to consistently use *Api instances for all items in the # array api -class BoolValuesApi: +class BoolValuesApi(object): def __init__(self, name, index, api_name): self.name = name self.index = index @@ -337,7 +337,7 @@ NPY_NO_EXPORT PyBoolScalarObject _PyArrayScalar_BoolValues[2]; """ return astr -class FunctionApi: +class FunctionApi(object): def __init__(self, name, index, return_type, args, api_name): self.name = name self.index = index diff --git a/numpy/core/getlimits.py b/numpy/core/getlimits.py index 53728bc59..37f33c66d 100644 --- a/numpy/core/getlimits.py +++ b/numpy/core/getlimits.py @@ -181,7 +181,7 @@ nexp =%(nexp)6s min= -max ''' % self.__dict__ -class iinfo: +class iinfo(object): """ iinfo(type) diff --git a/numpy/distutils/environment.py b/numpy/distutils/environment.py index c701bce47..7d3ae56ae 100644 --- a/numpy/distutils/environment.py +++ b/numpy/distutils/environment.py @@ -3,7 +3,7 @@ from distutils.dist import Distribution __metaclass__ = type -class EnvironmentConfig: +class EnvironmentConfig(object): def __init__(self, distutils_section='ALL', **kw): self._distutils_section = distutils_section self._conf_keys = kw diff --git a/numpy/distutils/misc_util.py b/numpy/distutils/misc_util.py index 8af492894..bf180cd73 100644 --- a/numpy/distutils/misc_util.py +++ b/numpy/distutils/misc_util.py @@ -30,7 +30,7 @@ __all__ = ['Configuration', 'get_numpy_include_dirs', 'default_config_dict', 'is_sequence', 'is_string', 'as_list', 'gpaths', 'get_language', 'quote_args', 'get_build_architecture', 'get_info', 'get_pkg_info'] -class InstallableLib: +class InstallableLib(object): """ Container to hold information on an installable library. diff --git a/numpy/lib/_iotools.py b/numpy/lib/_iotools.py index dec0f5a27..27c1e76db 100644 --- a/numpy/lib/_iotools.py +++ b/numpy/lib/_iotools.py @@ -142,7 +142,7 @@ def flatten_dtype(ndtype, flatten_base=False): -class LineSplitter: +class LineSplitter(object): """ Object to split a string at a given delimiter or at given places. @@ -228,7 +228,7 @@ class LineSplitter: -class NameValidator: +class NameValidator(object): """ Object to validate a list of strings to use as field names. @@ -448,7 +448,7 @@ class ConversionWarning(UserWarning): -class StringConverter: +class StringConverter(object): """ Factory class for function transforming a string into another object (int, float). diff --git a/numpy/linalg/lapack_lite/make_lite.py b/numpy/linalg/lapack_lite/make_lite.py index 1687cfd82..e857866e1 100755 --- a/numpy/linalg/lapack_lite/make_lite.py +++ b/numpy/linalg/lapack_lite/make_lite.py @@ -36,7 +36,7 @@ extern doublereal dlapy2_(doublereal *x, doublereal *y); ''' -class FortranRoutine: +class FortranRoutine(object): """Wrapper for a Fortran routine in a file. """ type = 'generic' @@ -65,7 +65,7 @@ class UnknownFortranRoutine(FortranRoutine): def dependencies(self): return [] -class FortranLibrary: +class FortranLibrary(object): """Container for a bunch of Fortran routines. """ def __init__(self, src_dirs): diff --git a/numpy/ma/timer_comparison.py b/numpy/ma/timer_comparison.py index 57cccf0b4..2588f53b2 100644 --- a/numpy/ma/timer_comparison.py +++ b/numpy/ma/timer_comparison.py @@ -14,7 +14,7 @@ pi = np.pi if sys.version_info[0] >= 3: from functools import reduce -class moduletester: +class moduletester(object): def __init__(self, module): self.module = module self.allequal = module.allequal diff --git a/numpy/numarray/numerictypes.py b/numpy/numarray/numerictypes.py index 7bc91612e..70a134855 100644 --- a/numpy/numarray/numerictypes.py +++ b/numpy/numarray/numerictypes.py @@ -137,11 +137,11 @@ class NumericType(object): class BooleanType(NumericType): pass -class SignedType: +class SignedType(object): """Marker class used for signed type check""" pass -class UnsignedType: +class UnsignedType(object): """Marker class used for unsigned type check""" pass diff --git a/numpy/testing/print_coercion_tables.py b/numpy/testing/print_coercion_tables.py index 7b5320d7e..d87544987 100755 --- a/numpy/testing/print_coercion_tables.py +++ b/numpy/testing/print_coercion_tables.py @@ -4,7 +4,7 @@ import numpy as np # Generic object that can be added, but doesn't do anything else -class GenericObject: +class GenericObject(object): def __init__(self, v): self.v = v diff --git a/numpy/testing/utils.py b/numpy/testing/utils.py index 01ce31c4a..a2d3119c5 100644 --- a/numpy/testing/utils.py +++ b/numpy/testing/utils.py @@ -1380,7 +1380,7 @@ class WarningMessage(object): "line : %r}" % (self.message, self._category_name, self.filename, self.lineno, self.line)) -class WarningManager: +class WarningManager(object): """ A context manager that copies and restores the warnings filter upon exiting the context. |