📦 Use Python3 default for class inheriting from object
This commit is contained in:
1 parent
bb8fafaacb
commit
95441dafd4
8 files changed
+14
-14
No files matched your search
@@ -107,7 +107,7 @@ class CodeBlockExt(CodeBlock):
|
||||
return literal
|
||||
|
||||
|
||||
class PygmentsBridgeExt(object):
|
||||
class PygmentsBridgeExt:
|
||||
"""
|
||||
Wrapper for :class:`PygmentsBridge`, delegates everything to the wrapped ``bridge`` but :method:`highlight_block`,
|
||||
which calls the parent implementation for lexer selection, then
|
||||
@@ -133,7 +133,7 @@ class PygmentsBridgeExt(object):
|
||||
# For this we define a context manager that will allow us to wrap a lexer and modify its filters on the fly to
|
||||
# include the whitespace filter.
|
||||
|
||||
class whitespace(object):
|
||||
class whitespace:
|
||||
def __init__(self, lexer):
|
||||
self._lexer = lexer
|
||||
self._orig_filters = lexer.filters
|
||||
@@ -229,7 +229,7 @@ class PygmentsBridgeExt(object):
|
||||
return hlsource
|
||||
|
||||
|
||||
class whitespace_highlighter(object):
|
||||
class whitespace_highlighter:
|
||||
"""
|
||||
Context manager for adapting the used highlighter on a translator for a given node's whitespace properties.
|
||||
"""
|
||||
|
||||
@@ -267,7 +267,7 @@ class PermissionsMetaClass(type):
|
||||
return None
|
||||
|
||||
|
||||
class Permissions(object, metaclass=PermissionsMetaClass):
|
||||
class Permissions(metaclass=PermissionsMetaClass):
|
||||
|
||||
# Special permission
|
||||
ADMIN = OctoPrintPermission(
|
||||
|
||||
@@ -25,7 +25,7 @@ class SocketTimeout(BaseException):
|
||||
pass
|
||||
|
||||
|
||||
class SocketClient(object):
|
||||
class SocketClient:
|
||||
def __init__(self, url, use_ssl=False, daemon=True, **kwargs):
|
||||
self._url = url
|
||||
self._use_ssl = use_ssl
|
||||
@@ -219,7 +219,7 @@ class SocketClient(object):
|
||||
return False
|
||||
|
||||
|
||||
class Client(object):
|
||||
class Client:
|
||||
def __init__(self, baseurl, apikey):
|
||||
self.baseurl = baseurl
|
||||
self.apikey = apikey
|
||||
|
||||
@@ -13,7 +13,7 @@ from ddt import data, ddt, unpack
|
||||
from octoprint.filemanager.storage import LocalFileStorage, StorageError
|
||||
|
||||
|
||||
class FileWrapper(object):
|
||||
class FileWrapper:
|
||||
def __init__(self, filename):
|
||||
self.path = os.path.join(
|
||||
os.path.dirname(os.path.realpath(__file__)), "_files", filename
|
||||
|
||||
@@ -17,7 +17,7 @@ OLD_VERSION = "1.0.0"
|
||||
NEW_VERSION = "2.0.0"
|
||||
|
||||
|
||||
class Foo(object):
|
||||
class Foo:
|
||||
def get_latest(self, target, check, full_data=None):
|
||||
information = {
|
||||
"local": {"name": OLD_VERSION, "value": OLD_VERSION},
|
||||
|
||||
@@ -9,7 +9,7 @@ import octoprint.plugin.core
|
||||
##~~ Helpers for testing mixin type extraction
|
||||
|
||||
|
||||
class A(object):
|
||||
class A:
|
||||
pass
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@ class A1_1(A_1):
|
||||
pass
|
||||
|
||||
|
||||
class B(object):
|
||||
class B:
|
||||
pass
|
||||
|
||||
|
||||
@@ -37,7 +37,7 @@ class B_1(B):
|
||||
pass
|
||||
|
||||
|
||||
class C(object):
|
||||
class C:
|
||||
pass
|
||||
|
||||
|
||||
@@ -45,7 +45,7 @@ class C_1(C):
|
||||
pass
|
||||
|
||||
|
||||
class D(object):
|
||||
class D:
|
||||
pass
|
||||
|
||||
|
||||
|
||||
@@ -116,7 +116,7 @@ class TestSlicingManager(unittest.TestCase):
|
||||
self.slicer_plugin.get_slicer_default_profile.return_value = default_profile
|
||||
|
||||
# mock threading
|
||||
class MockThread(object):
|
||||
class MockThread:
|
||||
def __init__(self):
|
||||
self.target = None
|
||||
self.args = None
|
||||
|
||||
@@ -9,7 +9,7 @@ import unittest.mock as mock
|
||||
from octoprint.util import RepeatedTimer
|
||||
|
||||
|
||||
class Countdown(object):
|
||||
class Countdown:
|
||||
def __init__(self, start):
|
||||
self._counter = start
|
||||
|
||||
|
||||
Reference in new issue
Block a user