# HG changeset patch # User Emmanuel Gil Peyrot # Date 1427575251 -3600 # Node ID d1f0bb0b7a176194e02731ae4997aa782e104f61 # Parent 2cf51812972595f0a6f0a549f7ef934edbd6b45d Don’t inherit explicitely from object, we are not on Python 2.7 anymore. :) diff --git a/pytouhou/formats/ecl.py b/pytouhou/formats/ecl.py --- a/pytouhou/formats/ecl.py +++ b/pytouhou/formats/ecl.py @@ -26,7 +26,7 @@ from pytouhou.utils.helpers import get_l logger = get_logger(__name__) -class ECL(object): +class ECL: """Handle Touhou 6 ECL files. ECL files are binary script files used to describe the behavior of enemies. diff --git a/pytouhou/formats/exe.py b/pytouhou/formats/exe.py --- a/pytouhou/formats/exe.py +++ b/pytouhou/formats/exe.py @@ -30,7 +30,7 @@ class InvalidExeException(Exception): pass -class Shot(object): +class Shot: def __init__(self): self.interval = 0 self.delay = 0 @@ -45,7 +45,7 @@ class Shot(object): self.unknown1 = None -class SHT(object): +class SHT: def __init__(self): #self.unknown1 = None #self.bombs = 0. diff --git a/pytouhou/formats/fmt.py b/pytouhou/formats/fmt.py --- a/pytouhou/formats/fmt.py +++ b/pytouhou/formats/fmt.py @@ -16,7 +16,7 @@ from struct import unpack -class Track(object): +class Track: def __init__(self): self.name = '' diff --git a/pytouhou/formats/hint.py b/pytouhou/formats/hint.py --- a/pytouhou/formats/hint.py +++ b/pytouhou/formats/hint.py @@ -27,7 +27,7 @@ class Stage(list): self.number = number -class Hint(object): +class Hint: _fields = {'Stage': int, 'Tips': None, 'Remain': int, diff --git a/pytouhou/formats/msg.py b/pytouhou/formats/msg.py --- a/pytouhou/formats/msg.py +++ b/pytouhou/formats/msg.py @@ -18,7 +18,7 @@ from pytouhou.utils.helpers import get_l logger = get_logger(__name__) -class MSG(object): +class MSG: _instructions = {0: ('', None), 1: ('hh', None), 2: ('hh', 'change_face'), diff --git a/pytouhou/formats/music.py b/pytouhou/formats/music.py --- a/pytouhou/formats/music.py +++ b/pytouhou/formats/music.py @@ -16,7 +16,7 @@ from struct import unpack -class Track(object): +class Track: def __init__(self): self.start = 0 self.end = 0 diff --git a/pytouhou/formats/pbg3.py b/pytouhou/formats/pbg3.py --- a/pytouhou/formats/pbg3.py +++ b/pytouhou/formats/pbg3.py @@ -69,7 +69,7 @@ PBG3Entry = namedtuple('PBG3Entry', 'unk -class PBG3(object): +class PBG3: """Handle PBG3 archive files. PBG3 is a file archive format used in Touhou 6: EoSD. diff --git a/pytouhou/formats/score.py b/pytouhou/formats/score.py --- a/pytouhou/formats/score.py +++ b/pytouhou/formats/score.py @@ -20,7 +20,7 @@ from io import BytesIO from pytouhou.formats import ChecksumError -class TH6Score(object): +class TH6Score: entry_types = { b'TH6K': (Struct('