-
-
Notifications
You must be signed in to change notification settings - Fork 18.6k
CLN: Use new-style classes instead of old-style classes #20563
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,7 +25,7 @@ def get_keywords(): | |
return keywords | ||
|
||
|
||
class VersioneerConfig: | ||
class VersioneerConfig(object): | ||
pass | ||
|
||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -102,7 +102,7 @@ | |
61: "wcyrillic", 62: "wlatin1", 90: "ebcdic870"} | ||
|
||
|
||
class index: | ||
class index(object): | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. can you rename this class (capitalize, but needs a differnt name then) |
||
rowSizeIndex = 0 | ||
columnSizeIndex = 1 | ||
subheaderCountsIndex = 2 | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -460,11 +460,11 @@ def test_decodeFromUnicode(self): | |
def test_encodeRecursionMax(self): | ||
# 8 is the max recursion depth | ||
|
||
class O2: | ||
class O2(object): | ||
member = 0 | ||
pass | ||
|
||
class O1: | ||
class O1(object): | ||
member = 0 | ||
pass | ||
|
||
|
@@ -772,7 +772,7 @@ def test_dumpToFile(self): | |
assert "[1,2,3]" == f.getvalue() | ||
|
||
def test_dumpToFileLikeObject(self): | ||
class filelike: | ||
class filelike(object): | ||
|
||
def __init__(self): | ||
self.bytes = '' | ||
|
@@ -800,7 +800,7 @@ def test_loadFile(self): | |
np.array([1, 2, 3, 4]), ujson.load(f, numpy=True)) | ||
|
||
def test_loadFileLikeObject(self): | ||
class filelike: | ||
class filelike(object): | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. can you rename this |
||
|
||
def read(self): | ||
try: | ||
|
@@ -837,7 +837,7 @@ def test_encodeNumericOverflow(self): | |
|
||
def test_encodeNumericOverflowNested(self): | ||
for n in range(0, 100): | ||
class Nested: | ||
class Nested(object): | ||
x = 12839128391289382193812939 | ||
|
||
nested = Nested() | ||
|
@@ -886,7 +886,7 @@ def test_decodeBigEscape(self): | |
def test_toDict(self): | ||
d = {u("key"): 31337} | ||
|
||
class DictTest: | ||
class DictTest(object): | ||
|
||
def toDict(self): | ||
return d | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1082,7 +1082,7 @@ def test_resample_how_callables(self): | |
def fn(x, a=1): | ||
return str(type(x)) | ||
|
||
class fn_class: | ||
class fn_class(object): | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. can you rename this |
||
|
||
def __call__(self, x): | ||
return str(type(x)) | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -352,7 +352,7 @@ | |
import sys | ||
|
||
|
||
class VersioneerConfig: | ||
class VersioneerConfig(object): | ||
pass | ||
|
||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not a regex wizard, so an extra careful look here would be appreciated