Skip to content

Commit

Permalink
Remove links to types.ClassType
Browse files Browse the repository at this point in the history
This was the type of old-style classes, which don't exist anymore
in Python 3.
  • Loading branch information
mthuurne committed Oct 27, 2020
1 parent 8b3e91b commit 10f4006
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/twisted/names/dns.py
Original file line number Diff line number Diff line change
Expand Up @@ -2725,7 +2725,7 @@ def lookupRecordType(self, type):
@return: An object which implements L{IRecord} or L{None} if none
can be found for the given type.
@rtype: L{types.ClassType}
@rtype: C{Type[IRecord]}
"""
return self._recordTypes.get(type, UnknownRecord)

Expand Down
2 changes: 1 addition & 1 deletion src/twisted/persisted/aot.py
Original file line number Diff line number Diff line change
Expand Up @@ -492,7 +492,7 @@ def _classOfMethod(methodObject):
@type methodObject: L{types.MethodType}
@return: a class
@rtype: L{types.ClassType} or L{type}
@rtype: L{type}
"""
return methodObject.__self__.__class__

Expand Down
4 changes: 2 additions & 2 deletions src/twisted/persisted/styles.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def _methodFunction(classObject, methodName):
it's on and a method name.
@param classObject: A class to retrieve the method's function from.
@type classObject: L{type} or L{types.ClassType}
@type classObject: L{type}
@param methodName: The name of the method whose function to retrieve.
@type methodName: native L{str}
Expand All @@ -60,7 +60,7 @@ def unpickleMethod(im_name, im_self, im_class):
@type im_self: L{object}
@param im_class: The class where the method was declared.
@type im_class: L{types.ClassType} or L{type} or L{None}
@type im_class: L{type} or L{None}
"""
if im_self is None:
return getattr(im_class, im_name)
Expand Down
2 changes: 1 addition & 1 deletion src/twisted/python/compat.py
Original file line number Diff line number Diff line change
Expand Up @@ -497,7 +497,7 @@ def _constructMethod(cls, name, self):
Construct a bound method.
@param cls: The class that the method should be bound to.
@type cls: L{types.ClassType} or L{type}.
@type cls: L{type}
@param name: The name of the method.
@type name: native L{str}
Expand Down
2 changes: 1 addition & 1 deletion src/twisted/trial/test/test_loader.py
Original file line number Diff line number Diff line change
Expand Up @@ -613,7 +613,7 @@ def test_sortPackagesSillyOrder(self):
def sillySorter(s):
# This has to work on fully-qualified class names and class
# objects, which is silly, but it's the "spec", such as it is.
# if isinstance(s, type) or isinstance(s, types.ClassType):
# if isinstance(s, type):
# return s.__module__+'.'+s.__name__
n = runner.name(s)
d = md5(n.encode("utf8")).hexdigest()
Expand Down

0 comments on commit 10f4006

Please sign in to comment.