diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 671d95a2..03d4c18c 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -3,7 +3,7 @@ default_language_version: repos: - repo: "https://github.com/PyCQA/pylint" - rev: v3.0.0a6 + rev: v3.0.1 hooks: - id: pylint - repo: "https://github.com/bwhmather/ssort" @@ -11,17 +11,17 @@ repos: hooks: - id: ssort - repo: "https://github.com/charliermarsh/ruff-pre-commit" - rev: v0.0.284 + rev: v0.1.3 hooks: - id: ruff args: ["--fix", "--exit-non-zero-on-fix"] - repo: "https://github.com/pre-commit/mirrors-mypy" - rev: v1.5.0 + rev: v1.6.1 hooks: - id: mypy additional_dependencies: ["arcade==3.0.0.dev24", "pytest==7.4.0"] - repo: "https://github.com/pre-commit/pre-commit-hooks" - rev: v4.4.0 + rev: v4.5.0 hooks: - id: check-json - id: check-toml @@ -33,6 +33,6 @@ repos: args: ["--autofix"] - id: trailing-whitespace - repo: "https://github.com/psf/black" - rev: 23.7.0 + rev: 23.10.1 hooks: - id: black diff --git a/build.py b/build.py index 652d9d2a..0b0701d5 100644 --- a/build.py +++ b/build.py @@ -1,4 +1,5 @@ """Manages various building/compiling operations on the game.""" + from __future__ import annotations # Builtin diff --git a/src/hades/__init__.py b/src/hades/__init__.py index e87745de..8eccb64b 100644 --- a/src/hades/__init__.py +++ b/src/hades/__init__.py @@ -1,4 +1,5 @@ """Stores all the functionality which creates the game and makes it playable.""" + from __future__ import annotations # Builtin diff --git a/src/hades/__main__.py b/src/hades/__main__.py index fc50293f..e97952c8 100644 --- a/src/hades/__main__.py +++ b/src/hades/__main__.py @@ -1,4 +1,5 @@ """Allows the game to be run from the command line.""" + from __future__ import annotations # Custom diff --git a/src/hades/constants.py b/src/hades/constants.py index 0d41a96f..b87da1bf 100644 --- a/src/hades/constants.py +++ b/src/hades/constants.py @@ -1,4 +1,5 @@ """Stores constants relating to the game and its functionality.""" + from __future__ import annotations # Builtin diff --git a/src/hades/game_objects/__init__.py b/src/hades/game_objects/__init__.py index 79bdb74c..1c447169 100644 --- a/src/hades/game_objects/__init__.py +++ b/src/hades/game_objects/__init__.py @@ -1,2 +1,3 @@ """Contains the functionality which manages the game objects.""" + from __future__ import annotations diff --git a/src/hades/game_objects/attacks.py b/src/hades/game_objects/attacks.py index e99b5f52..fd5755d2 100644 --- a/src/hades/game_objects/attacks.py +++ b/src/hades/game_objects/attacks.py @@ -1,4 +1,5 @@ """Manages the different attack algorithms available.""" + from __future__ import annotations # Builtin diff --git a/src/hades/game_objects/attributes.py b/src/hades/game_objects/attributes.py index 83442e5a..286f34c0 100644 --- a/src/hades/game_objects/attributes.py +++ b/src/hades/game_objects/attributes.py @@ -1,4 +1,5 @@ """Manages the different game object attributes available.""" + from __future__ import annotations # Builtin diff --git a/src/hades/game_objects/base.py b/src/hades/game_objects/base.py index 849c5ed8..c47e5886 100644 --- a/src/hades/game_objects/base.py +++ b/src/hades/game_objects/base.py @@ -1,4 +1,5 @@ """Stores the foundations for the entity component system and its functionality.""" + from __future__ import annotations # Builtin diff --git a/src/hades/game_objects/components.py b/src/hades/game_objects/components.py index fd9915b5..9ba33ea3 100644 --- a/src/hades/game_objects/components.py +++ b/src/hades/game_objects/components.py @@ -1,4 +1,5 @@ """Manages various components available to the game objects.""" + from __future__ import annotations # Builtin diff --git a/src/hades/game_objects/constructors.py b/src/hades/game_objects/constructors.py index e6e4c673..f22bb86e 100644 --- a/src/hades/game_objects/constructors.py +++ b/src/hades/game_objects/constructors.py @@ -1,4 +1,5 @@ """Stores all the constructors used to make the game objects.""" + from __future__ import annotations # Builtin diff --git a/src/hades/game_objects/movements.py b/src/hades/game_objects/movements.py index f03dc852..45c2062a 100644 --- a/src/hades/game_objects/movements.py +++ b/src/hades/game_objects/movements.py @@ -1,4 +1,5 @@ """Manages the different movement algorithms available to the game objects.""" + from __future__ import annotations # Builtin diff --git a/src/hades/game_objects/system.py b/src/hades/game_objects/system.py index 2a62a401..02fdbc47 100644 --- a/src/hades/game_objects/system.py +++ b/src/hades/game_objects/system.py @@ -1,4 +1,5 @@ """Manages the entity component system and its processes.""" + from __future__ import annotations # Builtin diff --git a/src/hades/physics.py b/src/hades/physics.py index 8b383378..6c321e71 100644 --- a/src/hades/physics.py +++ b/src/hades/physics.py @@ -1,4 +1,5 @@ """Manages the physics using an abstracted version of the Pymunk physics engine.""" + from __future__ import annotations # Builtin diff --git a/src/hades/sprite.py b/src/hades/sprite.py index d39b75a3..ef6516ba 100644 --- a/src/hades/sprite.py +++ b/src/hades/sprite.py @@ -1,4 +1,5 @@ """Manages the operations related to the sprite object.""" + from __future__ import annotations # Builtin diff --git a/src/hades/textures.py b/src/hades/textures.py index 983e1972..01974e8c 100644 --- a/src/hades/textures.py +++ b/src/hades/textures.py @@ -1,4 +1,5 @@ """Handles loading and storage of textures needed by the game.""" + from __future__ import annotations # Builtin diff --git a/src/hades/views/__init__.py b/src/hades/views/__init__.py index 3de2054d..d6426c29 100644 --- a/src/hades/views/__init__.py +++ b/src/hades/views/__init__.py @@ -1,2 +1,3 @@ """Contains the functionality that allows the user to play the game.""" + from __future__ import annotations diff --git a/src/hades/views/game.py b/src/hades/views/game.py index 7da958b7..7a0e691c 100644 --- a/src/hades/views/game.py +++ b/src/hades/views/game.py @@ -1,4 +1,5 @@ """Initialises and manages the main game.""" + from __future__ import annotations # Builtin diff --git a/src/hades/views/inventory.py b/src/hades/views/inventory.py index f83298ea..72650c51 100644 --- a/src/hades/views/inventory.py +++ b/src/hades/views/inventory.py @@ -1,4 +1,5 @@ """Displays the player's inventory graphically.""" + from __future__ import annotations # Builtin diff --git a/src/hades/views/shop.py b/src/hades/views/shop.py index bc441c47..5fe791e1 100644 --- a/src/hades/views/shop.py +++ b/src/hades/views/shop.py @@ -1,4 +1,5 @@ """Creates a shop for upgrades and special attributes/items.""" + from __future__ import annotations # Builtin diff --git a/src/hades/views/start_menu.py b/src/hades/views/start_menu.py index 34f35f20..19c67bd9 100644 --- a/src/hades/views/start_menu.py +++ b/src/hades/views/start_menu.py @@ -1,4 +1,5 @@ """Creates a start menu so the player can change their settings or game mode.""" + from __future__ import annotations # Builtin diff --git a/src/hades/window.py b/src/hades/window.py index f69430f3..bcdc87ad 100644 --- a/src/hades/window.py +++ b/src/hades/window.py @@ -1,4 +1,5 @@ """Acts as the entry point to the game by creating and initialising the window.""" + from __future__ import annotations # Builtin diff --git a/tests/game_objects/test_attacks.py b/tests/game_objects/test_attacks.py index 683e4eb6..45f5d203 100644 --- a/tests/game_objects/test_attacks.py +++ b/tests/game_objects/test_attacks.py @@ -1,4 +1,5 @@ """Tests all functions in game_objects/attacks.py.""" + from __future__ import annotations # Builtin diff --git a/tests/game_objects/test_attributes.py b/tests/game_objects/test_attributes.py index 329c48bc..32bacb9b 100644 --- a/tests/game_objects/test_attributes.py +++ b/tests/game_objects/test_attributes.py @@ -1,4 +1,5 @@ """Tests all functions in game_objects/attributes.py.""" + from __future__ import annotations # Builtin diff --git a/tests/game_objects/test_base.py b/tests/game_objects/test_base.py index 717a8724..1de96b15 100644 --- a/tests/game_objects/test_base.py +++ b/tests/game_objects/test_base.py @@ -1,4 +1,5 @@ """Tests all functions in game_objects/base.py.""" + from __future__ import annotations # Builtin diff --git a/tests/game_objects/test_components.py b/tests/game_objects/test_components.py index 27ef7054..cc9cd547 100644 --- a/tests/game_objects/test_components.py +++ b/tests/game_objects/test_components.py @@ -1,4 +1,5 @@ """Tests all functions in game_objects/components.py.""" + from __future__ import annotations # Builtin diff --git a/tests/game_objects/test_movements.py b/tests/game_objects/test_movements.py index 6f773a1c..08648c83 100644 --- a/tests/game_objects/test_movements.py +++ b/tests/game_objects/test_movements.py @@ -1,4 +1,5 @@ """Tests all functions in game_objects/movements.py.""" + from __future__ import annotations # Builtin diff --git a/tests/game_objects/test_system.py b/tests/game_objects/test_system.py index 5303ab75..6e997a38 100644 --- a/tests/game_objects/test_system.py +++ b/tests/game_objects/test_system.py @@ -1,4 +1,5 @@ """Tests all functions in game_objects/system.py.""" + from __future__ import annotations # Builtin diff --git a/tests/test_textures.py b/tests/test_textures.py index a65f51b5..c70e036c 100644 --- a/tests/test_textures.py +++ b/tests/test_textures.py @@ -1,4 +1,5 @@ """Tests all functions in textures.py.""" + from __future__ import annotations # Pip