changeset 615:d1f0bb0b7a17

Don’t inherit explicitely from object, we are not on Python 2.7 anymore. :)
author Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
date Sat, 28 Mar 2015 21:40:51 +0100
parents 2cf518129725
children 4ce3ef053a25
files pytouhou/formats/ecl.py pytouhou/formats/exe.py pytouhou/formats/fmt.py pytouhou/formats/hint.py pytouhou/formats/msg.py pytouhou/formats/music.py pytouhou/formats/pbg3.py pytouhou/formats/score.py pytouhou/formats/sht.py pytouhou/formats/std.py pytouhou/formats/t6rp.py pytouhou/formats/thtx.py pytouhou/game/background.py pytouhou/game/bullettype.py pytouhou/game/element.py pytouhou/game/itemtype.py pytouhou/game/lasertype.py pytouhou/game/music.py pytouhou/games/eosd/game.py pytouhou/games/eosd/interface.py pytouhou/games/sample/game.py pytouhou/games/sample/interface.py pytouhou/lib/sdl.pyx pytouhou/menu.py pytouhou/network.py pytouhou/options.py pytouhou/resource/loader.py pytouhou/ui/sdl/gamerenderer.py pytouhou/utils/pe.py pytouhou/vm/__init__.py
diffstat 30 files changed, 37 insertions(+), 37 deletions(-) [+]
line wrap: on
line diff
--- 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.
--- 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.
--- 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 = ''
 
--- 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,
--- 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'),
--- 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
--- 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.
--- 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('<I'),
                   namedtuple('TH6K', ('unknown',))),
--- a/pytouhou/formats/sht.py
+++ b/pytouhou/formats/sht.py
@@ -19,7 +19,7 @@ from pytouhou.utils.helpers import get_l
 logger = get_logger(__name__)
 
 
-class Shot(object):
+class Shot:
     def __init__(self):
         self.interval = 0
         self.delay = 0
@@ -38,7 +38,7 @@ class Shot(object):
         self.unknown5 = None
 
 
-class SHT(object):
+class SHT:
     def __init__(self):
         self.unknown1 = None
         self.bombs = 0.
--- a/pytouhou/formats/std.py
+++ b/pytouhou/formats/std.py
@@ -27,7 +27,7 @@ from pytouhou.utils.helpers import read_
 logger = get_logger(__name__)
 
 
-class Model(object):
+class Model:
     def __init__(self, unknown=0, bounding_box=None, quads=None):
         self.unknown = 0
         self.bounding_box = bounding_box or (0., 0., 0.,
@@ -36,7 +36,7 @@ class Model(object):
 
 
 
-class Stage(object):
+class Stage:
     """Handle Touhou 6 Stage Definition files.
 
     Stage Definition files are structured files describing non-gameplay aspects
--- a/pytouhou/formats/t6rp.py
+++ b/pytouhou/formats/t6rp.py
@@ -30,7 +30,7 @@ from pytouhou.formats import ChecksumErr
 logger = get_logger(__name__)
 
 
-class Level(object):
+class Level:
     def __init__(self):
         self.score = 0
         self.random_seed = 0
@@ -55,7 +55,7 @@ class Level(object):
 
 
 
-class T6RP(object):
+class T6RP:
     def __init__(self):
         self.version = 0x102
         self.character = 0
--- a/pytouhou/formats/thtx.py
+++ b/pytouhou/formats/thtx.py
@@ -13,7 +13,7 @@
 ##
 
 
-class Texture(object):
+class Texture:
     def __init__(self, width, height, fmt, data):
         self.width = width
         self.height = height
--- a/pytouhou/game/background.py
+++ b/pytouhou/game/background.py
@@ -18,7 +18,7 @@ from pytouhou.vm import ANMRunner
 from pytouhou.game.sprite import Sprite
 
 
-class Background(object):
+class Background:
     def __init__(self, stage, anm):
         self.stage = stage
         self.anm = anm
--- a/pytouhou/game/bullettype.py
+++ b/pytouhou/game/bullettype.py
@@ -1,4 +1,4 @@
-class BulletType(object):
+class BulletType:
     def __init__(self, anm, anim_index, cancel_anim_index,
                  launch_anim2_index, launch_anim4_index, launch_anim8_index,
                  hitbox_size,
--- a/pytouhou/game/element.py
+++ b/pytouhou/game/element.py
@@ -12,7 +12,7 @@
 ## GNU General Public License for more details.
 ##
 
-class Element(object):
+class Element:
     def __init__(self, pos=None):
         self.sprite = None
         self.anmrunner = None
--- a/pytouhou/game/itemtype.py
+++ b/pytouhou/game/itemtype.py
@@ -1,4 +1,4 @@
-class ItemType(object):
+class ItemType:
     def __init__(self, anm, sprite_index, indicator_sprite_index):
         self.anm = anm
         self.sprite = Sprite()
--- a/pytouhou/game/lasertype.py
+++ b/pytouhou/game/lasertype.py
@@ -1,4 +1,4 @@
-class LaserType(object):
+class LaserType:
     def __init__(self, anm, anim_index,
                  launch_sprite_idx=140,
                  launch_anim_offsets=(0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 4, 4, 4, 0)):
--- a/pytouhou/game/music.py
+++ b/pytouhou/game/music.py
@@ -1,4 +1,4 @@
-class MusicPlayer(object):
+class MusicPlayer:
     def play(self, name):
         pass
 
--- a/pytouhou/games/eosd/game.py
+++ b/pytouhou/games/eosd/game.py
@@ -25,7 +25,7 @@ from pytouhou.game.background import Bac
 from pytouhou.vm import ECLMainRunner
 
 
-class Common(object):
+class Common:
     default_power = [0, 64, 128, 128, 128, 128, 0]
 
     def __init__(self, resource_loader, player_characters, continues, *,
--- a/pytouhou/games/eosd/interface.py
+++ b/pytouhou/games/eosd/interface.py
@@ -16,7 +16,7 @@ from pytouhou.game.effect import Effect
 from pytouhou.game.text import Text, Counter, Gauge, NativeText
 
 
-class Interface(object):
+class Interface:
     width = 640
     height = 480
     game_pos = (32, 16)
--- a/pytouhou/games/sample/game.py
+++ b/pytouhou/games/sample/game.py
@@ -26,7 +26,7 @@ from pytouhou.vm import PythonMainRunner
 from . import enemies, shots
 
 
-class Common(object):
+class Common:
     default_power = [0, 64, 128, 128, 128, 128, 0]
 
     def __init__(self, resource_loader, player_characters, continues, *,
--- a/pytouhou/games/sample/interface.py
+++ b/pytouhou/games/sample/interface.py
@@ -12,7 +12,7 @@
 ## GNU General Public License for more details.
 ##
 
-class Interface(object):
+class Interface:
     width = 384
     height = 448
     game_pos = (0, 0)
--- a/pytouhou/lib/sdl.pyx
+++ b/pytouhou/lib/sdl.pyx
@@ -59,7 +59,7 @@ class SDLError(Exception):
         Exception.__init__(self, error.decode())
 
 
-class SDL(object):
+class SDL:
     def __init__(self, sound=True):
         self.sound = sound
 
--- a/pytouhou/menu.py
+++ b/pytouhou/menu.py
@@ -24,7 +24,7 @@ import re
 GL_VERSION_REGEX = re.compile(r'^\d\.\d$')
 
 
-class Handler(object):
+class Handler:
     def __init__(self, config, args):
         self.config = config
         self.args = args
--- a/pytouhou/network.py
+++ b/pytouhou/network.py
@@ -9,7 +9,7 @@ logger = get_logger(__name__)
 
 MSG_STRUCT = Struct('!HHH')
 
-class Network(object):
+class Network:
     def __init__(self, port=8080, dest=None, selected_player=0):
         self.frame = 0
         self.keystate = 0
--- a/pytouhou/options.py
+++ b/pytouhou/options.py
@@ -18,7 +18,7 @@ from configparser import RawConfigParser
 from pytouhou.utils.xdg import load_config_paths, save_config_path
 
 
-class Options(object):
+class Options:
     def __init__(self, name, defaults):
         load_paths = list(reversed([os.path.join(directory, '%s.cfg' % name)
                                     for directory
--- a/pytouhou/resource/loader.py
+++ b/pytouhou/resource/loader.py
@@ -33,7 +33,7 @@ logger = get_logger(__name__)
 
 
 
-class Directory(object):
+class Directory:
     def __init__(self, path):
         self.path = path
 
@@ -59,7 +59,7 @@ class Directory(object):
 
 
 
-class ArchiveDescription(object):
+class ArchiveDescription:
     _formats = {b'PBG3': PBG3}
 
     def __init__(self, path, format_class, file_list=None):
@@ -93,7 +93,7 @@ class ArchiveDescription(object):
 
 
 
-class Loader(object):
+class Loader:
     def __init__(self, game_dir=None):
         self.exe_files = []
         self.game_dir = game_dir
--- a/pytouhou/ui/sdl/gamerenderer.py
+++ b/pytouhou/ui/sdl/gamerenderer.py
@@ -21,7 +21,7 @@ from pytouhou.utils.helpers import get_l
 logger = get_logger(__name__)
 
 
-class GameRenderer(object):
+class GameRenderer:
     def __init__(self, resource_loader, window):
         self.window = window
         self.texture_manager = TextureManager(resource_loader, self.window.win)
--- a/pytouhou/utils/pe.py
+++ b/pytouhou/utils/pe.py
@@ -84,7 +84,7 @@ class PEStructs:
 
 
 
-class PEFile(object):
+class PEFile:
     def __init__(self, file):
         self.file = file
 
--- a/pytouhou/vm/__init__.py
+++ b/pytouhou/vm/__init__.py
@@ -3,7 +3,7 @@ from .msgrunner import MSGRunner
 from .eclrunner import ECLMainRunner
 
 
-class PythonMainRunner(object):
+class PythonMainRunner:
     def __init__(self, main, game):
         self.main = main
         self.game = game
@@ -12,7 +12,7 @@ class PythonMainRunner(object):
         self.main(self.game)
 
 
-class EnemyRunner(object):
+class EnemyRunner:
     def __init__(self, enemy, game, sub):
         self.enemy = enemy
         self.game = game