Skip to content

Commit e6ed5a5

Browse files
committed
No longer derive classes from object
1 parent 221a483 commit e6ed5a5

14 files changed

Lines changed: 22 additions & 22 deletions

curtsies/configfile_keynames.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
}
1212

1313
# TODO make a precalculated version of this
14-
class KeyMap(object):
14+
class KeyMap:
1515
"""Maps config file key syntax to Curtsies names"""
1616

1717
def __getitem__(self, key):

curtsies/events.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@
9696
)
9797

9898

99-
class Event(object):
99+
class Event:
100100
pass
101101

102102

curtsies/formatstring.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ def stable_format_dict(d):
9090
return '{%s}' % inner
9191

9292

93-
class Chunk(object):
93+
class Chunk:
9494
"""A string with a single set of formatting attributes
9595
9696
Subject to change, not part of the API"""
@@ -195,7 +195,7 @@ def splitter(self):
195195
return ChunkSplitter(self)
196196

197197

198-
class ChunkSplitter(object):
198+
class ChunkSplitter:
199199
"""
200200
View of a Chunk for breaking it into smaller Chunks.
201201
"""
@@ -259,7 +259,7 @@ def request(self, max_width):
259259
i += 1
260260

261261

262-
class FmtStr(object):
262+
class FmtStr:
263263
"""A string whose substrings carry attributes."""
264264
def __init__(self, *components):
265265
# type: (*Chunk) -> None

curtsies/input.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ def is_main_thread():
3232
return isinstance(threading.current_thread(), threading._MainThread) # type: ignore
3333

3434

35-
class ReplacedSigIntHandler(object):
35+
class ReplacedSigIntHandler:
3636
def __init__(self, handler):
3737
# type: (Callable) -> None
3838
self.handler = handler
@@ -47,7 +47,7 @@ def __exit__(self, type=None, value=None, traceback=None):
4747
signal.signal(signal.SIGINT, self.orig_sigint_handler)
4848

4949

50-
class Input(object):
50+
class Input:
5151
"""Keypress and control event generator"""
5252

5353
def __init__(

curtsies/termhelpers.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
_Attr = List[Union[int, List[bytes]]]
1010

1111

12-
class Nonblocking(object):
12+
class Nonblocking:
1313
"""
1414
A context manager for making an input stream nonblocking.
1515
"""
@@ -29,7 +29,7 @@ def __exit__(self, type=None, value=None, traceback=None):
2929
fcntl.fcntl(self.fd, fcntl.F_SETFL, self.orig_fl)
3030

3131

32-
class Cbreak(object):
32+
class Cbreak:
3333
def __init__(self, stream):
3434
# type: (IO) -> None
3535
self.stream = stream
@@ -45,7 +45,7 @@ def __exit__(self, type=None, value=None, traceback=None):
4545
termios.tcsetattr(self.stream, termios.TCSANOW, self.original_stty)
4646

4747

48-
class Termmode(object):
48+
class Termmode:
4949
def __init__(self, stream, attrs):
5050
# type: (IO, _Attr) -> None
5151
self.stream = stream

curtsies/window.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
T = TypeVar("T", bound="BaseWindow")
4343

4444

45-
class BaseWindow(object):
45+
class BaseWindow:
4646
def __init__(self, out_stream=None, hide_cursor=True):
4747
# type: (IO, bool) -> None
4848
logger.debug("-------initializing Window object %r------" % self)

examples/chat.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
from curtsies.formatstring import linesplit
99
from curtsies.fmtfuncs import blue, red, green
1010

11-
class Connection(object):
11+
class Connection:
1212
def __init__(self, sock):
1313
self.sock = sock
1414
self.received = []

examples/fps.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
class Frame(curtsies.events.ScheduledEvent):
1010
pass
1111

12-
class World(object):
12+
class World:
1313
def __init__(self):
1414
self.s = 'Hello'
1515
def tick(self):

examples/gameexample.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ def unicode_str(obj):
1616
return str(obj)
1717

1818

19-
class Entity(object):
19+
class Entity:
2020
def __init__(self, display, x, y, speed=1):
2121
self.display = display
2222
self.x, self.y = x, y
@@ -37,7 +37,7 @@ def sign(n):
3737
def vscale(c, v):
3838
return tuple(c*x for x in v)
3939

40-
class World(object):
40+
class World:
4141
def __init__(self, width, height):
4242
self.width = width
4343
self.height = height

examples/realtime.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
MAX_FPS = 1000
99
time_per_frame = 1. / MAX_FPS
1010

11-
class FrameCounter(object):
11+
class FrameCounter:
1212
def __init__(self):
1313
self.render_times = []
1414
self.dt = .5

0 commit comments

Comments
 (0)