Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

STY: Replace remaining old style classes with classes subclassing obj…

…ect.
  • Loading branch information...
commit 2812406e48a7ffa011dc60ed37dda6131c08ae3d 1 parent 06dc702
@charris charris authored
View
2  numpy/_import_tools.py
@@ -3,7 +3,7 @@
__all__ = ['PackageLoader']
-class PackageLoader:
+class PackageLoader(object):
def __init__(self, verbose=False, infunc=False):
""" Manages loading packages.
"""
View
8 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 @@ def internal_define(self):
""" % {'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 @@ def internal_define(self):
# 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 @@ def internal_define(self):
"""
return astr
-class FunctionApi:
+class FunctionApi(object):
def __init__(self, name, index, return_type, args, api_name):
self.name = name
self.index = index
View
2  numpy/core/getlimits.py
@@ -181,7 +181,7 @@ def __str__(self):
''' % self.__dict__
-class iinfo:
+class iinfo(object):
"""
iinfo(type)
View
2  numpy/distutils/environment.py
@@ -3,7 +3,7 @@
__metaclass__ = type
-class EnvironmentConfig:
+class EnvironmentConfig(object):
def __init__(self, distutils_section='ALL', **kw):
self._distutils_section = distutils_section
self._conf_keys = kw
View
2  numpy/distutils/misc_util.py
@@ -30,7 +30,7 @@
'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.
View
6 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 @@ def __call__(self, line):
-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).
View
4 numpy/linalg/lapack_lite/make_lite.py
@@ -36,7 +36,7 @@
'''
-class FortranRoutine:
+class FortranRoutine(object):
"""Wrapper for a Fortran routine in a file.
"""
type = 'generic'
@@ -65,7 +65,7 @@ def __init__(self, name):
def dependencies(self):
return []
-class FortranLibrary:
+class FortranLibrary(object):
"""Container for a bunch of Fortran routines.
"""
def __init__(self, src_dirs):
View
2  numpy/ma/timer_comparison.py
@@ -14,7 +14,7 @@
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
View
4 numpy/numarray/numerictypes.py
@@ -137,11 +137,11 @@ def __getstate__(self):
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
View
2  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
View
2  numpy/testing/utils.py
@@ -1380,7 +1380,7 @@ def __str__(self):
"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.
Please sign in to comment.
Something went wrong with that request. Please try again.