diff --git a/arcade/__init__.py b/arcade/__init__.py
index 2a470690a8..f13a1ff3d7 100644
--- a/arcade/__init__.py
+++ b/arcade/__init__.py
@@ -3,8 +3,9 @@
A Python simple, easy to use module for creating 2D games.
"""
-# flake8: noqa: E402
+from __future__ import annotations
+# flake8: noqa: E402
# Error out if we import Arcade with an incompatible version of Python.
import sys
import os
diff --git a/arcade/__main__.py b/arcade/__main__.py
index 5adc7f4fca..dcb8a7ff69 100644
--- a/arcade/__main__.py
+++ b/arcade/__main__.py
@@ -1,3 +1,5 @@
+from __future__ import annotations
+
from arcade.management import show_info
diff --git a/arcade/__pyinstaller/__init__.py b/arcade/__pyinstaller/__init__.py
index 1c52aadf4b..9309da9cc5 100644
--- a/arcade/__pyinstaller/__init__.py
+++ b/arcade/__pyinstaller/__init__.py
@@ -1,3 +1,5 @@
+from __future__ import annotations
+
import os
diff --git a/arcade/__pyinstaller/hook-arcade.py b/arcade/__pyinstaller/hook-arcade.py
index 0104a55e31..05b4423d2e 100644
--- a/arcade/__pyinstaller/hook-arcade.py
+++ b/arcade/__pyinstaller/hook-arcade.py
@@ -9,6 +9,8 @@
For a walk through of building an Arcade application with pyinstaller see:
https://api.arcade.academy/en/latest/tutorials/bundling_with_pyinstaller/index.html
"""
+from __future__ import annotations
+
from pathlib import Path
import arcade
diff --git a/arcade/application.py b/arcade/application.py
index 9dcccf50dc..46f97f3e8e 100644
--- a/arcade/application.py
+++ b/arcade/application.py
@@ -2,6 +2,8 @@
The main window class that all object-oriented applications should
derive from.
"""
+from __future__ import annotations
+
import logging
import os
import time
diff --git a/arcade/background/__init__.py b/arcade/background/__init__.py
index 121ee26939..dfdb671a64 100644
--- a/arcade/background/__init__.py
+++ b/arcade/background/__init__.py
@@ -1,3 +1,5 @@
+from __future__ import annotations
+
from typing import Optional, Tuple
from PIL import Image
diff --git a/arcade/background/background.py b/arcade/background/background.py
index 01c43da40e..b96ac7f13b 100644
--- a/arcade/background/background.py
+++ b/arcade/background/background.py
@@ -1,3 +1,5 @@
+from __future__ import annotations
+
from typing import Optional, Union, Tuple
from arcade.window_commands import get_window
diff --git a/arcade/background/background_texture.py b/arcade/background/background_texture.py
index 6e3c230350..ebdcdea77e 100644
--- a/arcade/background/background_texture.py
+++ b/arcade/background/background_texture.py
@@ -1,3 +1,5 @@
+from __future__ import annotations
+
from typing import Optional, List, Tuple
from PIL import Image
diff --git a/arcade/background/groups.py b/arcade/background/groups.py
index d7f089de60..09b098e6c7 100644
--- a/arcade/background/groups.py
+++ b/arcade/background/groups.py
@@ -1,3 +1,5 @@
+from __future__ import annotations
+
from typing import Optional, Union, List, Tuple
import arcade.gl as gl
diff --git a/arcade/cache/__init__.py b/arcade/cache/__init__.py
index 2ade7311c9..94a2e2000d 100644
--- a/arcade/cache/__init__.py
+++ b/arcade/cache/__init__.py
@@ -1,3 +1,5 @@
+from __future__ import annotations
+
from typing import Any, List
from .hit_box import HitBoxCache
from .texture import TextureCache
diff --git a/arcade/cache/hit_box.py b/arcade/cache/hit_box.py
index 7c3abaab4e..3688c2dace 100644
--- a/arcade/cache/hit_box.py
+++ b/arcade/cache/hit_box.py
@@ -8,6 +8,8 @@
* Simple : Scanning the corners for the texture
* Detailed : fairly detailed hit box generated by pymunk with detail parameter
"""
+from __future__ import annotations
+
import gzip
import json
from pathlib import Path
diff --git a/arcade/cache/image_data.py b/arcade/cache/image_data.py
index 34b0688b5a..6e89102347 100644
--- a/arcade/cache/image_data.py
+++ b/arcade/cache/image_data.py
@@ -1,3 +1,5 @@
+from __future__ import annotations
+
from typing import Dict, Optional, TYPE_CHECKING
from weakref import WeakValueDictionary
diff --git a/arcade/cache/texture.py b/arcade/cache/texture.py
index b45a121998..e2e1bd5b4c 100644
--- a/arcade/cache/texture.py
+++ b/arcade/cache/texture.py
@@ -1,3 +1,5 @@
+from __future__ import annotations
+
from typing import Dict, Optional, TYPE_CHECKING, Union, List
from pathlib import Path
from weakref import WeakValueDictionary
diff --git a/arcade/camera.py b/arcade/camera.py
index 4fdaabf246..f3fb893430 100644
--- a/arcade/camera.py
+++ b/arcade/camera.py
@@ -1,6 +1,8 @@
"""
Camera class
"""
+from __future__ import annotations
+
import math
from typing import TYPE_CHECKING, List, Optional, Tuple, Union
diff --git a/arcade/color/__init__.py b/arcade/color/__init__.py
index 116d2871e4..dbb679ad45 100644
--- a/arcade/color/__init__.py
+++ b/arcade/color/__init__.py
@@ -1,6 +1,8 @@
"""
This module pre-defines several colors.
"""
+from __future__ import annotations
+
from arcade.types import Color
AERO_BLUE = Color(201, 255, 229, 255)
diff --git a/arcade/context.py b/arcade/context.py
index 9bb3d7fbcb..4d3f9b23ba 100644
--- a/arcade/context.py
+++ b/arcade/context.py
@@ -2,6 +2,8 @@
Arcade's version of the OpenGL Context.
Contains pre-loaded programs
"""
+from __future__ import annotations
+
from pathlib import Path
from typing import Any, Iterable, Dict, Optional, Tuple, Union, Sequence
from contextlib import contextmanager
diff --git a/arcade/controller.py b/arcade/controller.py
index cc81dd5104..8d0f49a9e9 100644
--- a/arcade/controller.py
+++ b/arcade/controller.py
@@ -4,6 +4,8 @@
For more info on this API, see https://pyglet.readthedocs.io/en/latest/programming_guide/input.html#using-controllers
"""
+from __future__ import annotations
+
import pyglet.input
__all__ = [
diff --git a/arcade/csscolor/__init__.py b/arcade/csscolor/__init__.py
index c296804b9d..93668117e9 100644
--- a/arcade/csscolor/__init__.py
+++ b/arcade/csscolor/__init__.py
@@ -2,6 +2,8 @@
This module pre-defines colors as defined by the W3C CSS standard:
https://www.w3.org/TR/2018/PR-css-color-3-20180315/
"""
+from __future__ import annotations
+
from arcade.types import Color
ALICE_BLUE = Color(240, 248, 255, 255)
diff --git a/arcade/draw_commands.py b/arcade/draw_commands.py
index 3ccbaf2b5b..bad76c26a4 100644
--- a/arcade/draw_commands.py
+++ b/arcade/draw_commands.py
@@ -6,6 +6,8 @@
graphics card each time a shape is drawn. For faster drawing, see the
Buffered Draw Commands.
"""
+from __future__ import annotations
+
import array
import math
from typing import Optional, Tuple
diff --git a/arcade/drawing_support.py b/arcade/drawing_support.py
index 8a08f4abb5..8fbc89e4f9 100644
--- a/arcade/drawing_support.py
+++ b/arcade/drawing_support.py
@@ -2,6 +2,8 @@
Functions used to support drawing. No Pyglet/OpenGL here.
"""
+from __future__ import annotations
+
import math
__all__ = ["get_points_for_thick_line"]
diff --git a/arcade/earclip.py b/arcade/earclip.py
index fc97c3fe2e..5c72fa4bd3 100644
--- a/arcade/earclip.py
+++ b/arcade/earclip.py
@@ -3,6 +3,8 @@
from: https://github.com/linuxlewis/tripy/blob/master/tripy.py
"""
+from __future__ import annotations
+
from arcade.types import Point, PointList
from typing import List, Tuple
diff --git a/arcade/easing.py b/arcade/easing.py
index 3577c5c154..5f86cccb69 100644
--- a/arcade/easing.py
+++ b/arcade/easing.py
@@ -1,6 +1,8 @@
"""
Functions used to support easing
"""
+from __future__ import annotations
+
from math import pi, sin, cos
from dataclasses import dataclass
from typing import Callable, Tuple
diff --git a/arcade/examples/array_backed_grid.py b/arcade/examples/array_backed_grid.py
index f84fcda98f..175a8fab63 100644
--- a/arcade/examples/array_backed_grid.py
+++ b/arcade/examples/array_backed_grid.py
@@ -13,6 +13,8 @@
If Python and Arcade are installed, this example can be run from the command line with:
python -m arcade.examples.array_backed_grid
"""
+from __future__ import annotations
+
import arcade
# Set how many rows and columns we will have
diff --git a/arcade/examples/array_backed_grid_buffered.py b/arcade/examples/array_backed_grid_buffered.py
index 7323ea1cb3..569e90ec7f 100644
--- a/arcade/examples/array_backed_grid_buffered.py
+++ b/arcade/examples/array_backed_grid_buffered.py
@@ -13,6 +13,8 @@
If Python and Arcade are installed, this example can be run from the command line with:
python -m arcade.examples.array_backed_grid_buffered
"""
+from __future__ import annotations
+
import arcade
# Set how many rows and columns we will have
diff --git a/arcade/examples/array_backed_grid_sprites_1.py b/arcade/examples/array_backed_grid_sprites_1.py
index fba7d83e67..aed04930fc 100644
--- a/arcade/examples/array_backed_grid_sprites_1.py
+++ b/arcade/examples/array_backed_grid_sprites_1.py
@@ -12,6 +12,8 @@
If Python and Arcade are installed, this example can be run from the command line with:
python -m arcade.examples.array_backed_grid_sprites_1
"""
+from __future__ import annotations
+
import arcade
# Set how many rows and columns we will have
diff --git a/arcade/examples/array_backed_grid_sprites_2.py b/arcade/examples/array_backed_grid_sprites_2.py
index 74de7b8169..397ce74622 100644
--- a/arcade/examples/array_backed_grid_sprites_2.py
+++ b/arcade/examples/array_backed_grid_sprites_2.py
@@ -12,6 +12,8 @@
If Python and Arcade are installed, this example can be run from the command line with:
python -m arcade.examples.array_backed_grid_sprites_2
"""
+from __future__ import annotations
+
import arcade
# Set how many rows and columns we will have
diff --git a/arcade/examples/astar_pathfinding.py b/arcade/examples/astar_pathfinding.py
index 9d799ab790..1ddb047935 100644
--- a/arcade/examples/astar_pathfinding.py
+++ b/arcade/examples/astar_pathfinding.py
@@ -7,6 +7,8 @@
python -m arcade.examples.astar_pathfinding
"""
+from __future__ import annotations
+
import arcade
import random
diff --git a/arcade/examples/asteroid_smasher.py b/arcade/examples/asteroid_smasher.py
index 1e9f7092ea..569663388f 100644
--- a/arcade/examples/asteroid_smasher.py
+++ b/arcade/examples/asteroid_smasher.py
@@ -13,6 +13,8 @@
the command line with:
python -m arcade.examples.asteroid_smasher
"""
+from __future__ import annotations
+
import random
import math
import arcade
diff --git a/arcade/examples/background_blending.py b/arcade/examples/background_blending.py
index b1a8048edf..c9797e66ee 100644
--- a/arcade/examples/background_blending.py
+++ b/arcade/examples/background_blending.py
@@ -9,6 +9,8 @@
python -m arcade.examples.background_blending
"""
+from __future__ import annotations
+
import arcade
import arcade.background as background
diff --git a/arcade/examples/background_groups.py b/arcade/examples/background_groups.py
index caddaf0884..147d070898 100644
--- a/arcade/examples/background_groups.py
+++ b/arcade/examples/background_groups.py
@@ -11,6 +11,8 @@
python -m arcade.examples.background_groups
"""
+from __future__ import annotations
+
import arcade
import arcade.background as background
diff --git a/arcade/examples/background_parallax.py b/arcade/examples/background_parallax.py
index 0ab9243ea7..a05973773d 100644
--- a/arcade/examples/background_parallax.py
+++ b/arcade/examples/background_parallax.py
@@ -13,6 +13,8 @@
python -m arcade.examples.background_parallax
"""
+from __future__ import annotations
+
import arcade
import arcade.background as background
diff --git a/arcade/examples/background_scrolling.py b/arcade/examples/background_scrolling.py
index 4ba542559a..7417bfc587 100644
--- a/arcade/examples/background_scrolling.py
+++ b/arcade/examples/background_scrolling.py
@@ -9,6 +9,8 @@
If Python and Arcade are installed, this example can be run from the command line with:
python -m arcade.examples.background_scrolling
"""
+from __future__ import annotations
+
import arcade
import arcade.background as background
diff --git a/arcade/examples/background_stationary.py b/arcade/examples/background_stationary.py
index 2f6e0a9cba..160578e64c 100644
--- a/arcade/examples/background_stationary.py
+++ b/arcade/examples/background_stationary.py
@@ -8,6 +8,8 @@
python -m arcade.examples.background_stationary
"""
+from __future__ import annotations
+
import arcade
import arcade.background as background
diff --git a/arcade/examples/bloom_defender.py b/arcade/examples/bloom_defender.py
index a8279e91f6..323ad74749 100644
--- a/arcade/examples/bloom_defender.py
+++ b/arcade/examples/bloom_defender.py
@@ -7,6 +7,8 @@
python -m arcade.examples.bloom_defender
"""
+from __future__ import annotations
+
import arcade
import random
diff --git a/arcade/examples/bouncing_rectangle.py b/arcade/examples/bouncing_rectangle.py
index 8c045657fb..7b1809f091 100644
--- a/arcade/examples/bouncing_rectangle.py
+++ b/arcade/examples/bouncing_rectangle.py
@@ -7,6 +7,8 @@
python -m arcade.examples.bouncing_rectangle
"""
+from __future__ import annotations
+
import arcade
# --- Set up the constants
diff --git a/arcade/examples/camera_platform.py b/arcade/examples/camera_platform.py
index 3fe65e609e..c2fa7d2ca0 100644
--- a/arcade/examples/camera_platform.py
+++ b/arcade/examples/camera_platform.py
@@ -8,6 +8,8 @@
python -m arcade.examples.camera_platform
"""
+from __future__ import annotations
+
import time
import arcade
diff --git a/arcade/examples/conway_alpha.py b/arcade/examples/conway_alpha.py
index 2492d18667..ed85898bff 100644
--- a/arcade/examples/conway_alpha.py
+++ b/arcade/examples/conway_alpha.py
@@ -8,6 +8,8 @@
typing:
python -m arcade.examples.conway_alpha
"""
+from __future__ import annotations
+
import arcade
import random
diff --git a/arcade/examples/drawing_primitives.py b/arcade/examples/drawing_primitives.py
index ae4752809f..b47564cdbc 100644
--- a/arcade/examples/drawing_primitives.py
+++ b/arcade/examples/drawing_primitives.py
@@ -15,6 +15,8 @@
python -m arcade.examples.drawing_primitives
"""
+from __future__ import annotations
+
# Import the Arcade library. If this fails, then try following the instructions
# for how to install arcade:
# https://api.arcade.academy/en/latest/install/index.html
diff --git a/arcade/examples/drawing_text.py b/arcade/examples/drawing_text.py
index 9dd5fd160c..8f082eb5eb 100644
--- a/arcade/examples/drawing_text.py
+++ b/arcade/examples/drawing_text.py
@@ -4,6 +4,8 @@
If Python and Arcade are installed, this example can be run from the command line with:
python -m arcade.examples.drawing_text
"""
+from __future__ import annotations
+
import arcade
SCREEN_WIDTH = 1200
diff --git a/arcade/examples/drawing_text_objects.py b/arcade/examples/drawing_text_objects.py
index 54d97727ae..5297685d59 100644
--- a/arcade/examples/drawing_text_objects.py
+++ b/arcade/examples/drawing_text_objects.py
@@ -5,6 +5,8 @@
If Python and Arcade are installed, this example can be run from the command line with:
python -m arcade.examples.drawing_text_objects
"""
+from __future__ import annotations
+
import arcade
SCREEN_WIDTH = 1200
diff --git a/arcade/examples/drawing_text_objects_batch.py b/arcade/examples/drawing_text_objects_batch.py
index 5bfce1cc37..dbc6586c8c 100644
--- a/arcade/examples/drawing_text_objects_batch.py
+++ b/arcade/examples/drawing_text_objects_batch.py
@@ -10,6 +10,8 @@
If Python and Arcade are installed, this example can be run from the command line with:
python -m arcade.examples.drawing_text_objects_batch
"""
+from __future__ import annotations
+
import arcade
import pyglet.graphics
diff --git a/arcade/examples/dual_stick_shooter.py b/arcade/examples/dual_stick_shooter.py
index c45f8fc161..1f7c1d868d 100644
--- a/arcade/examples/dual_stick_shooter.py
+++ b/arcade/examples/dual_stick_shooter.py
@@ -7,6 +7,8 @@
If Python and Arcade are installed, this example can be run from the command line with:
python -m arcade.examples.dual_stick_shooter
"""
+from __future__ import annotations
+
import math
import pprint
import random
diff --git a/arcade/examples/easing_example_1.py b/arcade/examples/easing_example_1.py
index a28fa923be..23806fab93 100644
--- a/arcade/examples/easing_example_1.py
+++ b/arcade/examples/easing_example_1.py
@@ -10,6 +10,8 @@
If Python and Arcade are installed, this example can be run from the command line with:
python -m arcade.examples.easing_example_1
"""
+from __future__ import annotations
+
import arcade
from arcade import easing
from arcade.types import Color
diff --git a/arcade/examples/easing_example_2.py b/arcade/examples/easing_example_2.py
index 94ca0a1a81..92bf419dc4 100644
--- a/arcade/examples/easing_example_2.py
+++ b/arcade/examples/easing_example_2.py
@@ -9,6 +9,8 @@
If Python and Arcade are installed, this example can be run from the command line with:
python -m arcade.examples.easing_example_2
"""
+from __future__ import annotations
+
import arcade
from arcade import easing
diff --git a/arcade/examples/follow_path.py b/arcade/examples/follow_path.py
index b08cdb9ec4..727218bf9a 100644
--- a/arcade/examples/follow_path.py
+++ b/arcade/examples/follow_path.py
@@ -9,6 +9,8 @@
python -m arcade.examples.follow_path
"""
+from __future__ import annotations
+
import arcade
import math
diff --git a/arcade/examples/full_screen_example.py b/arcade/examples/full_screen_example.py
index 94b674059b..07e2a9e2c2 100644
--- a/arcade/examples/full_screen_example.py
+++ b/arcade/examples/full_screen_example.py
@@ -9,6 +9,8 @@
python -m arcade.examples.full_screen_example
"""
+from __future__ import annotations
+
import arcade
SPRITE_SCALING = 0.5
diff --git a/arcade/examples/gl/3d_cube.py b/arcade/examples/gl/3d_cube.py
index 62dd86b4d2..b274361862 100644
--- a/arcade/examples/gl/3d_cube.py
+++ b/arcade/examples/gl/3d_cube.py
@@ -4,6 +4,8 @@
If Python and Arcade are installed, this example can be run from the command line with:
python -m arcade.examples.gl.3d_cube
"""
+from __future__ import annotations
+
from pyglet.math import Mat4
import arcade
from arcade.gl import geometry
diff --git a/arcade/examples/gl/3d_cube_with_cubes.py b/arcade/examples/gl/3d_cube_with_cubes.py
index 09663cdafc..d32182b190 100644
--- a/arcade/examples/gl/3d_cube_with_cubes.py
+++ b/arcade/examples/gl/3d_cube_with_cubes.py
@@ -4,6 +4,8 @@
If Python and Arcade are installed, this example can be run from the command line with:
python -m arcade.examples.gl.3d_cube_with_cubes
"""
+from __future__ import annotations
+
from pyglet.math import Mat4
import arcade
diff --git a/arcade/examples/gl/3d_sphere.py b/arcade/examples/gl/3d_sphere.py
index c63869c7b3..771bcf87c1 100644
--- a/arcade/examples/gl/3d_sphere.py
+++ b/arcade/examples/gl/3d_sphere.py
@@ -7,6 +7,8 @@
If Python and Arcade are installed, this example can be run from the command line with:
python -m arcade.examples.gl.3d_sphere
"""
+from __future__ import annotations
+
import arcade
from arcade.math import clamp
from arcade.gl import geometry
diff --git a/arcade/examples/gl/basic_renderer.py b/arcade/examples/gl/basic_renderer.py
index ce8f261636..3975748505 100644
--- a/arcade/examples/gl/basic_renderer.py
+++ b/arcade/examples/gl/basic_renderer.py
@@ -5,6 +5,8 @@
python -m arcade.examples.gl.basic_renderer
"""
+from __future__ import annotations
+
import math
import arcade
from arcade.gl import geometry
diff --git a/arcade/examples/gl/bindless_texture.py b/arcade/examples/gl/bindless_texture.py
index 5725b084cd..1c3fcd462b 100644
--- a/arcade/examples/gl/bindless_texture.py
+++ b/arcade/examples/gl/bindless_texture.py
@@ -24,6 +24,8 @@
If Python and Arcade are installed, this example can be run from the command line with:
python -m arcade.examples.gl.bindless_texture
"""
+from __future__ import annotations
+
from array import array
from typing import List
from itertools import cycle
diff --git a/arcade/examples/gl/chip8_display.py b/arcade/examples/gl/chip8_display.py
index 87f6ccb61a..5744d13533 100644
--- a/arcade/examples/gl/chip8_display.py
+++ b/arcade/examples/gl/chip8_display.py
@@ -13,6 +13,8 @@
If Python and Arcade are installed, this example can be run from the command line with:
python -m arcade.examples.gl.chip8_display
"""
+from __future__ import annotations
+
from array import array
import arcade
diff --git a/arcade/examples/gl/compute_ssbo.py b/arcade/examples/gl/compute_ssbo.py
index ecd380a03a..29513c2e7e 100644
--- a/arcade/examples/gl/compute_ssbo.py
+++ b/arcade/examples/gl/compute_ssbo.py
@@ -23,6 +23,8 @@
If Python and Arcade are installed, this example can be run from the command line with:
python -m arcade.examples.gl.compute_ssbo
"""
+from __future__ import annotations
+
import random
import math
from array import array
diff --git a/arcade/examples/gl/compute_texture.py b/arcade/examples/gl/compute_texture.py
index f1f720bfdb..4cc1f1a574 100644
--- a/arcade/examples/gl/compute_texture.py
+++ b/arcade/examples/gl/compute_texture.py
@@ -4,6 +4,8 @@
If Python and Arcade are installed, this example can be run from the command line with:
python -m arcade.examples.gl.compute_texture
"""
+from __future__ import annotations
+
import arcade
from arcade.gl import geometry
diff --git a/arcade/examples/gl/custom_sprite.py b/arcade/examples/gl/custom_sprite.py
index 161802bc5e..d73e770549 100644
--- a/arcade/examples/gl/custom_sprite.py
+++ b/arcade/examples/gl/custom_sprite.py
@@ -22,6 +22,8 @@
If Python and Arcade are installed, this example can be run from the command line with:
python -m arcade.examples.gl.custom_sprite
"""
+from __future__ import annotations
+
from random import randint
from array import array
import arcade
diff --git a/arcade/examples/gl/game_of_life_colors.py b/arcade/examples/gl/game_of_life_colors.py
index 44a1247599..23d3973408 100644
--- a/arcade/examples/gl/game_of_life_colors.py
+++ b/arcade/examples/gl/game_of_life_colors.py
@@ -16,6 +16,8 @@
If Python and Arcade are installed, this example can be run from the command line with:
python -m arcade.examples.gl.game_of_life_colors
"""
+from __future__ import annotations
+
import random
from array import array
diff --git a/arcade/examples/gl/geometry_index_buffers.py b/arcade/examples/gl/geometry_index_buffers.py
index 044b64b805..1801322d8b 100644
--- a/arcade/examples/gl/geometry_index_buffers.py
+++ b/arcade/examples/gl/geometry_index_buffers.py
@@ -7,6 +7,8 @@
If Python and Arcade are installed, this example can be run from the command line with:
python -m arcade.examples.gl.geometry_index_buffers
"""
+from __future__ import annotations
+
from array import array
import arcade
diff --git a/arcade/examples/gl/geometry_shader.py b/arcade/examples/gl/geometry_shader.py
index ab53da1a00..22263ecf80 100644
--- a/arcade/examples/gl/geometry_shader.py
+++ b/arcade/examples/gl/geometry_shader.py
@@ -8,6 +8,8 @@
If Python and Arcade are installed, this example can be run from the command line with:
python -m arcade.examples.gl.geometry_shader
"""
+from __future__ import annotations
+
import random
from array import array
import arcade
diff --git a/arcade/examples/gl/instancing.py b/arcade/examples/gl/instancing.py
index 30d7bfe212..66ce9d427d 100644
--- a/arcade/examples/gl/instancing.py
+++ b/arcade/examples/gl/instancing.py
@@ -8,6 +8,8 @@
If Python and Arcade are installed, this example can be run from the command line with:
python -m arcade.examples.gl.instancing
"""
+from __future__ import annotations
+
import random
from array import array
diff --git a/arcade/examples/gl/multisample_fbo.py b/arcade/examples/gl/multisample_fbo.py
index 724bfe3a75..93864ff614 100644
--- a/arcade/examples/gl/multisample_fbo.py
+++ b/arcade/examples/gl/multisample_fbo.py
@@ -9,6 +9,8 @@
python -m arcade.examples.gl.multisample_fbo
"""
+from __future__ import annotations
+
import math
import arcade
diff --git a/arcade/examples/gl/normal_mapping_simple.py b/arcade/examples/gl/normal_mapping_simple.py
index 7e6412037f..fd39774bf5 100644
--- a/arcade/examples/gl/normal_mapping_simple.py
+++ b/arcade/examples/gl/normal_mapping_simple.py
@@ -15,6 +15,8 @@
Run this example from the command line with:
python -m arcade.examples.gl.normal_mapping_simple
"""
+from __future__ import annotations
+
import arcade
from arcade.gl import geometry
diff --git a/arcade/examples/gl/random_shader_simple.py b/arcade/examples/gl/random_shader_simple.py
index db5125a991..320a482665 100644
--- a/arcade/examples/gl/random_shader_simple.py
+++ b/arcade/examples/gl/random_shader_simple.py
@@ -12,6 +12,8 @@
If Python and Arcade are installed, this example can be run from the command line with:
python -m arcade.examples.gl.random_shader_simple
"""
+from __future__ import annotations
+
from time import time
from array import array
from random import random
diff --git a/arcade/examples/gl/ray_marching/ray_marching_simple.py b/arcade/examples/gl/ray_marching/ray_marching_simple.py
index 48f7ee24e5..9dc6dd31c0 100644
--- a/arcade/examples/gl/ray_marching/ray_marching_simple.py
+++ b/arcade/examples/gl/ray_marching/ray_marching_simple.py
@@ -6,6 +6,8 @@
"Ray Marching for Dummies!" video from The Art of Code
YouTube channel : https://www.youtube.com/watch?v=PGtv-dBi2wE
"""
+from __future__ import annotations
+
from pathlib import Path
import arcade
from arcade.gl import geometry
diff --git a/arcade/examples/gl/render_indirect.py b/arcade/examples/gl/render_indirect.py
index 2a4e33ea0a..01ab1cb20b 100644
--- a/arcade/examples/gl/render_indirect.py
+++ b/arcade/examples/gl/render_indirect.py
@@ -19,6 +19,8 @@
If Python and Arcade are installed, this example can be run from the command line with:
python -m arcade.examples.gl.render_indirect
"""
+from __future__ import annotations
+
from random import (
randint,
random,
diff --git a/arcade/examples/gl/shader_setup.py b/arcade/examples/gl/shader_setup.py
index 562193bf6c..6da74ebcdf 100644
--- a/arcade/examples/gl/shader_setup.py
+++ b/arcade/examples/gl/shader_setup.py
@@ -5,6 +5,8 @@
If Python and Arcade are installed, this example can be run from the command line with:
python -m arcade.examples.gl.shader_setup
"""
+from __future__ import annotations
+
import arcade
from arcade.gl import geometry
diff --git a/arcade/examples/gl/shader_setup_simple_texture.py b/arcade/examples/gl/shader_setup_simple_texture.py
index 823e172bda..b8e059e8f4 100644
--- a/arcade/examples/gl/shader_setup_simple_texture.py
+++ b/arcade/examples/gl/shader_setup_simple_texture.py
@@ -4,6 +4,8 @@
If Python and Arcade are installed, this example can be run from the command line with:
python -m arcade.examples.gl.shader_setup_simple_texture
"""
+from __future__ import annotations
+
import arcade
from arcade.gl import geometry
diff --git a/arcade/examples/gl/spritelist_interaction_bouncing_coins.py b/arcade/examples/gl/spritelist_interaction_bouncing_coins.py
index 36e90a408d..aecc89f0f9 100644
--- a/arcade/examples/gl/spritelist_interaction_bouncing_coins.py
+++ b/arcade/examples/gl/spritelist_interaction_bouncing_coins.py
@@ -12,6 +12,8 @@
If Python and Arcade are installed, this example can be run from the command line with:
python -m arcade.examples.gl.spritelist_interaction_bouncing_coins
"""
+from __future__ import annotations
+
from array import array
from random import randint, uniform
diff --git a/arcade/examples/gl/spritelist_interaction_hijack_positions.py b/arcade/examples/gl/spritelist_interaction_hijack_positions.py
index c48566d462..514f921ff2 100644
--- a/arcade/examples/gl/spritelist_interaction_hijack_positions.py
+++ b/arcade/examples/gl/spritelist_interaction_hijack_positions.py
@@ -7,6 +7,8 @@
If Python and Arcade are installed, this example can be run from the command line with:
python -m arcade.examples.gl.spritelist_interaction_hijack_positions
"""
+from __future__ import annotations
+
import math
import arcade
from arcade import hitbox
diff --git a/arcade/examples/gl/spritelist_interaction_visualize_dist.py b/arcade/examples/gl/spritelist_interaction_visualize_dist.py
index 049cedaa21..e765f2ad8d 100644
--- a/arcade/examples/gl/spritelist_interaction_visualize_dist.py
+++ b/arcade/examples/gl/spritelist_interaction_visualize_dist.py
@@ -7,6 +7,8 @@
If Python and Arcade are installed, this example can be run from the command line with:
python -m arcade.examples.gl.spritelist_interaction_visualize_dist
"""
+from __future__ import annotations
+
import random
import arcade
diff --git a/arcade/examples/gl/spritelist_interaction_visualize_dist_los.py b/arcade/examples/gl/spritelist_interaction_visualize_dist_los.py
index 8b2f1c0141..be528ab3ad 100644
--- a/arcade/examples/gl/spritelist_interaction_visualize_dist_los.py
+++ b/arcade/examples/gl/spritelist_interaction_visualize_dist_los.py
@@ -13,6 +13,8 @@
If Python and Arcade are installed, this example can be run from the command line with:
python -m arcade.examples.gl.spritelist_interaction_visualize_dist_los
"""
+from __future__ import annotations
+
import random
import arcade
diff --git a/arcade/examples/gl/spritelist_interaction_visualize_dist_los_trans.py b/arcade/examples/gl/spritelist_interaction_visualize_dist_los_trans.py
index a23616d218..19d294fa8e 100644
--- a/arcade/examples/gl/spritelist_interaction_visualize_dist_los_trans.py
+++ b/arcade/examples/gl/spritelist_interaction_visualize_dist_los_trans.py
@@ -20,6 +20,8 @@
If Python and Arcade are installed, this example can be run from the command line with:
python -m arcade.examples.gl.spritelist_interaction_visualize_dist_los_trans
"""
+from __future__ import annotations
+
import random
import struct
import arcade
diff --git a/arcade/examples/gl/tessellation.py b/arcade/examples/gl/tessellation.py
index 96580377e8..f0340633fd 100644
--- a/arcade/examples/gl/tessellation.py
+++ b/arcade/examples/gl/tessellation.py
@@ -5,6 +5,8 @@
If Python and Arcade are installed, this example can be run from the command line with:
python -m arcade.examples.gl.tessellation
"""
+from __future__ import annotations
+
from array import array
import arcade
diff --git a/arcade/examples/gl/transform_emit.py b/arcade/examples/gl/transform_emit.py
index 3e6ba33b5d..16c15150b9 100644
--- a/arcade/examples/gl/transform_emit.py
+++ b/arcade/examples/gl/transform_emit.py
@@ -7,6 +7,8 @@
If Python and Arcade are installed, this example can be run from the command line with:
python -m arcade.examples.gl.transform_emit
"""
+from __future__ import annotations
+
# import struct
import random
from array import array
diff --git a/arcade/examples/gl/transform_feedback.py b/arcade/examples/gl/transform_feedback.py
index dbbc50798a..8ba9e6db8b 100644
--- a/arcade/examples/gl/transform_feedback.py
+++ b/arcade/examples/gl/transform_feedback.py
@@ -18,6 +18,8 @@
If Python and Arcade are installed, this example can be run from the command line with:
python -m arcade.examples.gl.transform_feedback
"""
+from __future__ import annotations
+
from array import array
import math
import time
diff --git a/arcade/examples/gl/transform_feedback_geo.py b/arcade/examples/gl/transform_feedback_geo.py
index 471ac8cc0b..6133cc2073 100644
--- a/arcade/examples/gl/transform_feedback_geo.py
+++ b/arcade/examples/gl/transform_feedback_geo.py
@@ -21,6 +21,8 @@
If Python and Arcade are installed, this example can be run from the command line with:
python -m arcade.examples.gl.transform_feedback_geo
"""
+from __future__ import annotations
+
from array import array
import time
import random
diff --git a/arcade/examples/gl/transform_multi.py b/arcade/examples/gl/transform_multi.py
index 343b006946..dfd57efeca 100644
--- a/arcade/examples/gl/transform_multi.py
+++ b/arcade/examples/gl/transform_multi.py
@@ -12,6 +12,8 @@
If Python and Arcade are installed, this example can be run from the command line with:
python -m arcade.examples.gl.transform_multi
"""
+from __future__ import annotations
+
import struct
import arcade
diff --git a/arcade/examples/gl/transform_point_grid.py b/arcade/examples/gl/transform_point_grid.py
index 78954f42bd..2e57af75fc 100644
--- a/arcade/examples/gl/transform_point_grid.py
+++ b/arcade/examples/gl/transform_point_grid.py
@@ -16,6 +16,8 @@
If Python and Arcade are installed, this example can be run from the command line with:
python -m arcade.examples.gl.transform_point_grid
"""
+from __future__ import annotations
+
import random
import time
from array import array
diff --git a/arcade/examples/gradients.py b/arcade/examples/gradients.py
index 03fc1e6de5..2d01fd5d76 100644
--- a/arcade/examples/gradients.py
+++ b/arcade/examples/gradients.py
@@ -4,6 +4,8 @@
If Python and Arcade are installed, this example can be run from the command line with:
python -m arcade.examples.gradients
"""
+from __future__ import annotations
+
import arcade
from arcade import shape_list
diff --git a/arcade/examples/gui_flat_button.py b/arcade/examples/gui_flat_button.py
index 133fe5af36..ffe75f7294 100644
--- a/arcade/examples/gui_flat_button.py
+++ b/arcade/examples/gui_flat_button.py
@@ -5,6 +5,8 @@
If Python and Arcade are installed, this example can be run from the command line with:
python -m arcade.examples.gui_flat_button
"""
+from __future__ import annotations
+
import arcade
import arcade.gui
diff --git a/arcade/examples/gui_flat_button_styled.py b/arcade/examples/gui_flat_button_styled.py
index 88e71e133a..aba97c0275 100644
--- a/arcade/examples/gui_flat_button_styled.py
+++ b/arcade/examples/gui_flat_button_styled.py
@@ -4,6 +4,8 @@
If Python and Arcade are installed, this example can be run from the command line with:
python -m arcade.examples.gui_flat_button_styled
"""
+from __future__ import annotations
+
import arcade
import arcade.gui
import arcade.gui.widgets.buttons
diff --git a/arcade/examples/gui_ok_messagebox.py b/arcade/examples/gui_ok_messagebox.py
index 587ce00530..8fc7eb83c3 100644
--- a/arcade/examples/gui_ok_messagebox.py
+++ b/arcade/examples/gui_ok_messagebox.py
@@ -4,6 +4,8 @@
If Python and Arcade are installed, this example can be run from the command line with:
python -m arcade.examples.gui_ok_messagebox
"""
+from __future__ import annotations
+
import arcade
import arcade.gui
import arcade.gui.widgets.buttons
diff --git a/arcade/examples/gui_scrollable_text.py b/arcade/examples/gui_scrollable_text.py
index afa9f10280..178a8a861f 100644
--- a/arcade/examples/gui_scrollable_text.py
+++ b/arcade/examples/gui_scrollable_text.py
@@ -2,6 +2,8 @@
If Python and Arcade are installed, this example can be run from the command line with:
python -m arcade.examples.gui_scrollable_text
"""
+from __future__ import annotations
+
import arcade
from arcade import load_texture
from arcade.gui import UIManager, UIInputText, UITextArea
diff --git a/arcade/examples/gui_slider.py b/arcade/examples/gui_slider.py
index 828e6cc24f..da8f12c1ac 100644
--- a/arcade/examples/gui_slider.py
+++ b/arcade/examples/gui_slider.py
@@ -14,6 +14,8 @@
If Python and Arcade are installed, this example can be run from the command line with:
python -m arcade.examples.gui_slider
"""
+from __future__ import annotations
+
import arcade
from arcade.gui import UIManager, UILabel
from arcade.gui.events import UIOnChangeEvent
diff --git a/arcade/examples/gui_widgets.py b/arcade/examples/gui_widgets.py
index f9a30520cc..c22b1e0c29 100644
--- a/arcade/examples/gui_widgets.py
+++ b/arcade/examples/gui_widgets.py
@@ -4,6 +4,8 @@
If Python and Arcade are installed, this example can be run from the command line with:
python -m arcade.examples.gui_widgets
"""
+from __future__ import annotations
+
import arcade
import arcade.gui
import arcade.gui.widgets.buttons
diff --git a/arcade/examples/happy_face.py b/arcade/examples/happy_face.py
index 3396b2d3f9..f7aec386cb 100644
--- a/arcade/examples/happy_face.py
+++ b/arcade/examples/happy_face.py
@@ -5,6 +5,8 @@
python -m arcade.examples.happy_face
"""
+from __future__ import annotations
+
import arcade
# Set constants for the screen size
diff --git a/arcade/examples/light_demo.py b/arcade/examples/light_demo.py
index 60a674e387..9fe7bba0cf 100644
--- a/arcade/examples/light_demo.py
+++ b/arcade/examples/light_demo.py
@@ -6,6 +6,8 @@
If Python and Arcade are installed, this example can be run from the command line with:
python -m arcade.examples.light_demo
"""
+from __future__ import annotations
+
import arcade
from arcade.experimental.lights import Light, LightLayer
diff --git a/arcade/examples/line_of_sight.py b/arcade/examples/line_of_sight.py
index 249ba7e5e6..fe600d7312 100644
--- a/arcade/examples/line_of_sight.py
+++ b/arcade/examples/line_of_sight.py
@@ -7,6 +7,8 @@
python -m arcade.examples.line_of_sight
"""
+from __future__ import annotations
+
import arcade
import random
diff --git a/arcade/examples/lines_buffered.py b/arcade/examples/lines_buffered.py
index 80c765822d..e0b04df07c 100644
--- a/arcade/examples/lines_buffered.py
+++ b/arcade/examples/lines_buffered.py
@@ -4,6 +4,8 @@
If Python and Arcade are installed, this example can be run from the command line with:
python -m arcade.examples.lines_buffered
"""
+from __future__ import annotations
+
import random
import arcade
from arcade.shape_list import (
diff --git a/arcade/examples/maze_depth_first.py b/arcade/examples/maze_depth_first.py
index 0d09feaf15..90e3fc1320 100644
--- a/arcade/examples/maze_depth_first.py
+++ b/arcade/examples/maze_depth_first.py
@@ -9,6 +9,8 @@
If Python and Arcade are installed, this example can be run from the command line with:
python -m arcade.examples.maze_depth_first
"""
+from __future__ import annotations
+
import random
import arcade
import timeit
diff --git a/arcade/examples/maze_recursive.py b/arcade/examples/maze_recursive.py
index 610d302a11..4bdb65f33d 100644
--- a/arcade/examples/maze_recursive.py
+++ b/arcade/examples/maze_recursive.py
@@ -9,6 +9,8 @@
If Python and Arcade are installed, this example can be run from the command line with:
python -m arcade.examples.maze_recursive
"""
+from __future__ import annotations
+
import random
import arcade
import timeit
diff --git a/arcade/examples/minimap.py b/arcade/examples/minimap.py
index 6478f6526a..fa9dc6846d 100644
--- a/arcade/examples/minimap.py
+++ b/arcade/examples/minimap.py
@@ -7,6 +7,8 @@
python -m arcade.examples.minimap
"""
+from __future__ import annotations
+
import random
from uuid import uuid4
diff --git a/arcade/examples/minimap_camera.py b/arcade/examples/minimap_camera.py
index 229bcd3739..5fe24db378 100644
--- a/arcade/examples/minimap_camera.py
+++ b/arcade/examples/minimap_camera.py
@@ -7,6 +7,8 @@
python -m arcade.examples.minimap_camera
"""
+from __future__ import annotations
+
import random
import arcade
diff --git a/arcade/examples/music_control_demo.py b/arcade/examples/music_control_demo.py
index cb279b2dfe..e01d74f4fd 100644
--- a/arcade/examples/music_control_demo.py
+++ b/arcade/examples/music_control_demo.py
@@ -2,6 +2,8 @@
If Python and Arcade are installed, this example can be run from the command line with:
python -m arcade.examples.music_control_demo
"""
+from __future__ import annotations
+
import arcade
import arcade.gui
import arcade.gui.widgets.buttons
diff --git a/arcade/examples/net_process_animal_facts.py b/arcade/examples/net_process_animal_facts.py
index 418f90195b..ddc4166d6b 100644
--- a/arcade/examples/net_process_animal_facts.py
+++ b/arcade/examples/net_process_animal_facts.py
@@ -28,6 +28,8 @@
If Python and Arcade are installed, this example can be run from the command line with:
python -m arcade.examples.net_process_animal_facts
"""
+from __future__ import annotations
+
import PIL.Image
import random
import time
diff --git a/arcade/examples/particle_fireworks.py b/arcade/examples/particle_fireworks.py
index cb5f980296..fe73056cb5 100644
--- a/arcade/examples/particle_fireworks.py
+++ b/arcade/examples/particle_fireworks.py
@@ -6,6 +6,8 @@
If Python and Arcade are installed, this example can be run from the command line with:
python -m arcade.examples.particle_fireworks
"""
+from __future__ import annotations
+
import random
import pyglet
from pyglet.math import Vec2
diff --git a/arcade/examples/particle_systems.py b/arcade/examples/particle_systems.py
index 36590ecc75..1cd658086e 100644
--- a/arcade/examples/particle_systems.py
+++ b/arcade/examples/particle_systems.py
@@ -10,6 +10,8 @@
If Python and Arcade are installed, this example can be run from the command line with:
python -m arcade.examples.particle_systems
"""
+from __future__ import annotations
+
import arcade
import pyglet
import random
diff --git a/arcade/examples/perf_test/stress_test_collision_arcade.py b/arcade/examples/perf_test/stress_test_collision_arcade.py
index ecafd4bd8e..5359016812 100644
--- a/arcade/examples/perf_test/stress_test_collision_arcade.py
+++ b/arcade/examples/perf_test/stress_test_collision_arcade.py
@@ -8,6 +8,8 @@
If Python and Arcade are installed, this example can be run from the command line with:
python -m arcade.examples.stress_test_draw_moving
"""
+from __future__ import annotations
+
import arcade
import random
import timeit
diff --git a/arcade/examples/perf_test/stress_test_draw_moving_arcade.py b/arcade/examples/perf_test/stress_test_draw_moving_arcade.py
index 29ed9c8d90..7ce65104f2 100644
--- a/arcade/examples/perf_test/stress_test_draw_moving_arcade.py
+++ b/arcade/examples/perf_test/stress_test_draw_moving_arcade.py
@@ -8,6 +8,8 @@
If Python and Arcade are installed, this example can be run from the command line with:
python -m arcade.examples.stress_test_draw_moving
"""
+from __future__ import annotations
+
import random
import arcade
import timeit
diff --git a/arcade/examples/performance_statistics.py b/arcade/examples/performance_statistics.py
index 3e02cbe006..5756f2cc6a 100644
--- a/arcade/examples/performance_statistics.py
+++ b/arcade/examples/performance_statistics.py
@@ -19,6 +19,8 @@
command line with:
python -m arcade.examples.performance_statistics
"""
+from __future__ import annotations
+
import random
from typing import Optional
diff --git a/arcade/examples/perspective.py b/arcade/examples/perspective.py
index d2b99e3dc5..f994ad2455 100644
--- a/arcade/examples/perspective.py
+++ b/arcade/examples/perspective.py
@@ -15,6 +15,8 @@
python -m arcade.examples.perspective
"""
+from __future__ import annotations
+
from array import array
import arcade
diff --git a/arcade/examples/platform_tutorial/01_open_window.py b/arcade/examples/platform_tutorial/01_open_window.py
index 2f3b4808b3..3b9ef264bb 100644
--- a/arcade/examples/platform_tutorial/01_open_window.py
+++ b/arcade/examples/platform_tutorial/01_open_window.py
@@ -3,6 +3,8 @@
python -m arcade.examples.platform_tutorial.01_open_window
"""
+from __future__ import annotations
+
import arcade
# Constants
diff --git a/arcade/examples/platform_tutorial/02_draw_sprites.py b/arcade/examples/platform_tutorial/02_draw_sprites.py
index 80212935f5..e1cb7297ec 100644
--- a/arcade/examples/platform_tutorial/02_draw_sprites.py
+++ b/arcade/examples/platform_tutorial/02_draw_sprites.py
@@ -3,6 +3,8 @@
python -m arcade.examples.platform_tutorial.02_draw_sprites
"""
+from __future__ import annotations
+
import arcade
# Constants
diff --git a/arcade/examples/platform_tutorial/03_scene_object.py b/arcade/examples/platform_tutorial/03_scene_object.py
index 31b40109d3..bc0ea03032 100644
--- a/arcade/examples/platform_tutorial/03_scene_object.py
+++ b/arcade/examples/platform_tutorial/03_scene_object.py
@@ -3,6 +3,8 @@
python -m arcade.examples.platform_tutorial.03_scene_object
"""
+from __future__ import annotations
+
import arcade
# Constants
diff --git a/arcade/examples/platform_tutorial/04_user_control.py b/arcade/examples/platform_tutorial/04_user_control.py
index deb77e7e29..738180bfba 100644
--- a/arcade/examples/platform_tutorial/04_user_control.py
+++ b/arcade/examples/platform_tutorial/04_user_control.py
@@ -3,6 +3,8 @@
python -m arcade.examples.platform_tutorial.04_user_control
"""
+from __future__ import annotations
+
import arcade
# Constants
diff --git a/arcade/examples/platform_tutorial/05_add_gravity.py b/arcade/examples/platform_tutorial/05_add_gravity.py
index d0627442f8..381526e7f9 100644
--- a/arcade/examples/platform_tutorial/05_add_gravity.py
+++ b/arcade/examples/platform_tutorial/05_add_gravity.py
@@ -3,6 +3,8 @@
python -m arcade.examples.platform_tutorial.05_add_gravity
"""
+from __future__ import annotations
+
import arcade
# Constants
diff --git a/arcade/examples/platform_tutorial/06_camera.py b/arcade/examples/platform_tutorial/06_camera.py
index 047d38c88d..2a43e9bede 100644
--- a/arcade/examples/platform_tutorial/06_camera.py
+++ b/arcade/examples/platform_tutorial/06_camera.py
@@ -3,6 +3,8 @@
python -m arcade.examples.platform_tutorial.06_camera
"""
+from __future__ import annotations
+
import arcade
# Constants
diff --git a/arcade/examples/platform_tutorial/07_coins_and_sound.py b/arcade/examples/platform_tutorial/07_coins_and_sound.py
index 2fa961c626..bcd55733b7 100644
--- a/arcade/examples/platform_tutorial/07_coins_and_sound.py
+++ b/arcade/examples/platform_tutorial/07_coins_and_sound.py
@@ -3,6 +3,8 @@
python -m arcade.examples.platform_tutorial.07_coins_and_sound
"""
+from __future__ import annotations
+
import arcade
# Constants
diff --git a/arcade/examples/platform_tutorial/08_score.py b/arcade/examples/platform_tutorial/08_score.py
index 368321d332..9c737f15a5 100644
--- a/arcade/examples/platform_tutorial/08_score.py
+++ b/arcade/examples/platform_tutorial/08_score.py
@@ -3,6 +3,8 @@
python -m arcade.examples.platform_tutorial.08_score
"""
+from __future__ import annotations
+
import arcade
# Constants
diff --git a/arcade/examples/platform_tutorial/09_load_map.py b/arcade/examples/platform_tutorial/09_load_map.py
index 54b45da449..61cc1528c4 100644
--- a/arcade/examples/platform_tutorial/09_load_map.py
+++ b/arcade/examples/platform_tutorial/09_load_map.py
@@ -3,6 +3,8 @@
python -m arcade.examples.platform_tutorial.09_load_map
"""
+from __future__ import annotations
+
import arcade
# Constants
diff --git a/arcade/examples/platform_tutorial/10_multiple_levels.py b/arcade/examples/platform_tutorial/10_multiple_levels.py
index 1b333d2b0b..34d1aad1bd 100644
--- a/arcade/examples/platform_tutorial/10_multiple_levels.py
+++ b/arcade/examples/platform_tutorial/10_multiple_levels.py
@@ -3,6 +3,8 @@
python -m arcade.examples.platform_tutorial.10_multiple_levels
"""
+from __future__ import annotations
+
import arcade
# Constants
diff --git a/arcade/examples/platform_tutorial/11_ladders_and_more.py b/arcade/examples/platform_tutorial/11_ladders_and_more.py
index e82c9b5810..319c56fe30 100644
--- a/arcade/examples/platform_tutorial/11_ladders_and_more.py
+++ b/arcade/examples/platform_tutorial/11_ladders_and_more.py
@@ -3,6 +3,8 @@
python -m arcade.examples.platform_tutorial.11_ladders_and_more
"""
+from __future__ import annotations
+
import arcade
# Constants
diff --git a/arcade/examples/platform_tutorial/12_animate_character.py b/arcade/examples/platform_tutorial/12_animate_character.py
index 08b523ae24..6ed7e4909b 100644
--- a/arcade/examples/platform_tutorial/12_animate_character.py
+++ b/arcade/examples/platform_tutorial/12_animate_character.py
@@ -3,6 +3,8 @@
python -m arcade.examples.platform_tutorial.12_animate_character
"""
+from __future__ import annotations
+
import arcade
# Constants
diff --git a/arcade/examples/platform_tutorial/13_add_enemies.py b/arcade/examples/platform_tutorial/13_add_enemies.py
index f4952157f3..7abef6c99b 100644
--- a/arcade/examples/platform_tutorial/13_add_enemies.py
+++ b/arcade/examples/platform_tutorial/13_add_enemies.py
@@ -3,6 +3,8 @@
python -m arcade.examples.platform_tutorial.13_add_enemies
"""
+from __future__ import annotations
+
import math
import arcade
diff --git a/arcade/examples/platform_tutorial/14_moving_enemies.py b/arcade/examples/platform_tutorial/14_moving_enemies.py
index 3312bc15f5..dd044edf7f 100644
--- a/arcade/examples/platform_tutorial/14_moving_enemies.py
+++ b/arcade/examples/platform_tutorial/14_moving_enemies.py
@@ -3,6 +3,8 @@
python -m arcade.examples.platform_tutorial.14_moving_enemies
"""
+from __future__ import annotations
+
import math
import arcade
diff --git a/arcade/examples/platform_tutorial/15_collision_with_enemies.py b/arcade/examples/platform_tutorial/15_collision_with_enemies.py
index 5eea8deaff..17a97c8748 100644
--- a/arcade/examples/platform_tutorial/15_collision_with_enemies.py
+++ b/arcade/examples/platform_tutorial/15_collision_with_enemies.py
@@ -3,6 +3,8 @@
python -m arcade.examples.platform_tutorial.15_collision_with_enemies
"""
+from __future__ import annotations
+
import math
import arcade
diff --git a/arcade/examples/platform_tutorial/16_shooting_bullets.py b/arcade/examples/platform_tutorial/16_shooting_bullets.py
index 1caab59d56..05e2c8d99c 100644
--- a/arcade/examples/platform_tutorial/16_shooting_bullets.py
+++ b/arcade/examples/platform_tutorial/16_shooting_bullets.py
@@ -3,6 +3,8 @@
python -m arcade.examples.platform_tutorial.16_shooting_bullets
"""
+from __future__ import annotations
+
import math
import arcade
diff --git a/arcade/examples/platform_tutorial/17_views.py b/arcade/examples/platform_tutorial/17_views.py
index bb83827e4f..c75211d9d6 100644
--- a/arcade/examples/platform_tutorial/17_views.py
+++ b/arcade/examples/platform_tutorial/17_views.py
@@ -3,6 +3,8 @@
python -m arcade.examples.platform_tutorial.17_views
"""
+from __future__ import annotations
+
import math
import arcade
diff --git a/arcade/examples/procedural_caves_bsp.py b/arcade/examples/procedural_caves_bsp.py
index 847782430f..f9b40c7931 100644
--- a/arcade/examples/procedural_caves_bsp.py
+++ b/arcade/examples/procedural_caves_bsp.py
@@ -10,6 +10,8 @@
python -m arcade.examples.procedural_caves_bsp
"""
+from __future__ import annotations
+
import random
import arcade
import timeit
diff --git a/arcade/examples/procedural_caves_cellular.py b/arcade/examples/procedural_caves_cellular.py
index dcdaa4793a..e122770211 100644
--- a/arcade/examples/procedural_caves_cellular.py
+++ b/arcade/examples/procedural_caves_cellular.py
@@ -8,6 +8,8 @@
python -m arcade.examples.procedural_caves_cellular
"""
+from __future__ import annotations
+
import random
import arcade
import timeit
diff --git a/arcade/examples/pymunk_box_stacks.py b/arcade/examples/pymunk_box_stacks.py
index 2ae73b0e36..90c74878bc 100644
--- a/arcade/examples/pymunk_box_stacks.py
+++ b/arcade/examples/pymunk_box_stacks.py
@@ -15,6 +15,8 @@
Click and drag with the mouse to move the boxes.
"""
+from __future__ import annotations
+
import arcade
import pymunk
import timeit
diff --git a/arcade/examples/pymunk_demo_top_down.py b/arcade/examples/pymunk_demo_top_down.py
index 6d0acc2a91..5e3c43c3ed 100644
--- a/arcade/examples/pymunk_demo_top_down.py
+++ b/arcade/examples/pymunk_demo_top_down.py
@@ -5,6 +5,8 @@
If Python and Arcade are installed, this example can be run from the command line with:
python -m arcade.examples.pymunk_demo_top_down
"""
+from __future__ import annotations
+
import math
import random
import arcade
diff --git a/arcade/examples/pymunk_joint_builder.py b/arcade/examples/pymunk_joint_builder.py
index 1c45230e15..7160e98faf 100644
--- a/arcade/examples/pymunk_joint_builder.py
+++ b/arcade/examples/pymunk_joint_builder.py
@@ -4,6 +4,8 @@
If Python and Arcade are installed, this example can be run from the command line with:
python -m arcade.examples.pymunk_joint_builder
"""
+from __future__ import annotations
+
import arcade
import pymunk
import timeit
diff --git a/arcade/examples/pymunk_pegboard.py b/arcade/examples/pymunk_pegboard.py
index 00252fc645..d0cf29e15b 100644
--- a/arcade/examples/pymunk_pegboard.py
+++ b/arcade/examples/pymunk_pegboard.py
@@ -15,6 +15,8 @@
Click and drag with the mouse to move the boxes.
"""
+from __future__ import annotations
+
import arcade
import pymunk
import random
diff --git a/arcade/examples/radar_sweep.py b/arcade/examples/radar_sweep.py
index 586080dfc4..a36a8523e6 100644
--- a/arcade/examples/radar_sweep.py
+++ b/arcade/examples/radar_sweep.py
@@ -4,6 +4,8 @@
If Python and Arcade are installed, this example can be run from the command line with:
python -m arcade.examples.radar_sweep
"""
+from __future__ import annotations
+
import arcade
import math
diff --git a/arcade/examples/resizable_window.py b/arcade/examples/resizable_window.py
index b49907be1a..5bae2aa609 100644
--- a/arcade/examples/resizable_window.py
+++ b/arcade/examples/resizable_window.py
@@ -4,6 +4,8 @@
If Python and Arcade are installed, this example can be run from the command line with:
python -m arcade.examples.resizable_window
"""
+from __future__ import annotations
+
import arcade
SCREEN_WIDTH = 500
diff --git a/arcade/examples/sections_demo_1.py b/arcade/examples/sections_demo_1.py
index 39b9e7adfe..0783e758e7 100644
--- a/arcade/examples/sections_demo_1.py
+++ b/arcade/examples/sections_demo_1.py
@@ -15,6 +15,8 @@
If Python and Arcade are installed, this example can be run from the command line with:
python -m arcade.examples.sections_demo_1
"""
+from __future__ import annotations
+
from typing import Optional
import arcade
diff --git a/arcade/examples/sections_demo_2.py b/arcade/examples/sections_demo_2.py
index c2962f3538..7d05daa9ed 100644
--- a/arcade/examples/sections_demo_2.py
+++ b/arcade/examples/sections_demo_2.py
@@ -18,6 +18,8 @@
If Python and Arcade are installed, this example can be run from the command line with:
python -m arcade.examples.sections_demo_2
"""
+from __future__ import annotations
+
import random
from arcade import Window, Section, View, SpriteList, SpriteSolidColor, \
diff --git a/arcade/examples/sections_demo_3.py b/arcade/examples/sections_demo_3.py
index 69c8f720a9..2474b70b53 100644
--- a/arcade/examples/sections_demo_3.py
+++ b/arcade/examples/sections_demo_3.py
@@ -21,6 +21,8 @@
If Python and Arcade are installed, this example can be run from the command line with:
python -m arcade.examples.sections_demo_3
"""
+from __future__ import annotations
+
from typing import Optional
from math import sqrt
diff --git a/arcade/examples/shape_list_demo_1.py b/arcade/examples/shape_list_demo_1.py
index 58a1f61ed1..4722de01cb 100644
--- a/arcade/examples/shape_list_demo_1.py
+++ b/arcade/examples/shape_list_demo_1.py
@@ -10,6 +10,8 @@
python -m arcade.examples.shape_list_demo_1
"""
+from __future__ import annotations
+
import arcade
import timeit
diff --git a/arcade/examples/shape_list_demo_2.py b/arcade/examples/shape_list_demo_2.py
index 8082bb9cbd..a2ca89f6e3 100644
--- a/arcade/examples/shape_list_demo_2.py
+++ b/arcade/examples/shape_list_demo_2.py
@@ -12,6 +12,8 @@
python -m arcade.examples.shape_list_demo_2
"""
+from __future__ import annotations
+
import arcade
import timeit
diff --git a/arcade/examples/shape_list_demo_3.py b/arcade/examples/shape_list_demo_3.py
index 6100a0cfb8..4864ce9420 100644
--- a/arcade/examples/shape_list_demo_3.py
+++ b/arcade/examples/shape_list_demo_3.py
@@ -12,6 +12,8 @@
python -m arcade.examples.shape_list_demo_3
"""
+from __future__ import annotations
+
import arcade
import timeit
diff --git a/arcade/examples/shape_list_demo_skylines.py b/arcade/examples/shape_list_demo_skylines.py
index dc780cb268..8b89cc7397 100644
--- a/arcade/examples/shape_list_demo_skylines.py
+++ b/arcade/examples/shape_list_demo_skylines.py
@@ -4,6 +4,8 @@
If Python and Arcade are installed, this example can be run from the command line with:
python -m arcade.examples.shape_list_demo_skylines
"""
+from __future__ import annotations
+
import random
import arcade
from arcade.shape_list import (
diff --git a/arcade/examples/shapes.py b/arcade/examples/shapes.py
index 5e4cbc4885..6ea132e6d2 100644
--- a/arcade/examples/shapes.py
+++ b/arcade/examples/shapes.py
@@ -8,6 +8,8 @@
python -m arcade.examples.shapes
"""
+from __future__ import annotations
+
import arcade
import random
diff --git a/arcade/examples/slime_invaders.py b/arcade/examples/slime_invaders.py
index 39fc47f3df..c605a3065e 100644
--- a/arcade/examples/slime_invaders.py
+++ b/arcade/examples/slime_invaders.py
@@ -13,6 +13,8 @@
If Python and Arcade are installed, this example can be run from the command line with:
python -m arcade.examples.slime_invaders
"""
+from __future__ import annotations
+
import random
import arcade
diff --git a/arcade/examples/snow.py b/arcade/examples/snow.py
index a560e4eafe..1ec254e09e 100644
--- a/arcade/examples/snow.py
+++ b/arcade/examples/snow.py
@@ -9,6 +9,8 @@
python -m arcade.examples.snow
"""
+from __future__ import annotations
+
import random
import math
import arcade
diff --git a/arcade/examples/sound_demo.py b/arcade/examples/sound_demo.py
index 5a70737f27..c07c32187d 100644
--- a/arcade/examples/sound_demo.py
+++ b/arcade/examples/sound_demo.py
@@ -18,6 +18,8 @@
right speaker. Lower rows play the sound louder than the higher ones.
"""
+from __future__ import annotations
+
import typing
import arcade
diff --git a/arcade/examples/sound_speed_demo.py b/arcade/examples/sound_speed_demo.py
index 9da91f9ee2..f1b5828ea9 100644
--- a/arcade/examples/sound_speed_demo.py
+++ b/arcade/examples/sound_speed_demo.py
@@ -14,6 +14,8 @@
the screen are quieter, while the ones further down are louder.
"""
+from __future__ import annotations
+
import typing
import arcade
diff --git a/arcade/examples/sprite_bouncing_coins.py b/arcade/examples/sprite_bouncing_coins.py
index 9264f8f688..374979c951 100644
--- a/arcade/examples/sprite_bouncing_coins.py
+++ b/arcade/examples/sprite_bouncing_coins.py
@@ -10,6 +10,8 @@
python -m arcade.examples.sprite_bouncing_coins
"""
+from __future__ import annotations
+
import arcade
import random
diff --git a/arcade/examples/sprite_bullets.py b/arcade/examples/sprite_bullets.py
index d872ae9848..8043c700fe 100644
--- a/arcade/examples/sprite_bullets.py
+++ b/arcade/examples/sprite_bullets.py
@@ -8,6 +8,8 @@
If Python and Arcade are installed, this example can be run from the command line with:
python -m arcade.examples.sprite_bullets
"""
+from __future__ import annotations
+
import random
import arcade
diff --git a/arcade/examples/sprite_bullets_aimed.py b/arcade/examples/sprite_bullets_aimed.py
index 3d9dd8a6d3..0bf26d776a 100644
--- a/arcade/examples/sprite_bullets_aimed.py
+++ b/arcade/examples/sprite_bullets_aimed.py
@@ -9,6 +9,8 @@
python -m arcade.examples.sprite_bullets_aimed
"""
+from __future__ import annotations
+
import random
import arcade
import math
diff --git a/arcade/examples/sprite_bullets_enemy_aims.py b/arcade/examples/sprite_bullets_enemy_aims.py
index 7bfcfafaba..74a15d7680 100644
--- a/arcade/examples/sprite_bullets_enemy_aims.py
+++ b/arcade/examples/sprite_bullets_enemy_aims.py
@@ -5,6 +5,8 @@
python -m arcade.examples.sprite_bullets_enemy_aims
"""
+from __future__ import annotations
+
import arcade
import math
diff --git a/arcade/examples/sprite_bullets_periodic.py b/arcade/examples/sprite_bullets_periodic.py
index 0d8403b72c..b85eb2882d 100644
--- a/arcade/examples/sprite_bullets_periodic.py
+++ b/arcade/examples/sprite_bullets_periodic.py
@@ -4,6 +4,8 @@
If Python and Arcade are installed, this example can be run from the command line with:
python -m arcade.examples.sprite_bullets_periodic
"""
+from __future__ import annotations
+
import arcade
SCREEN_WIDTH = 800
diff --git a/arcade/examples/sprite_bullets_random.py b/arcade/examples/sprite_bullets_random.py
index ea30fbc4b8..b675ed2029 100644
--- a/arcade/examples/sprite_bullets_random.py
+++ b/arcade/examples/sprite_bullets_random.py
@@ -4,6 +4,8 @@
If Python and Arcade are installed, this example can be run from the command line with:
python -m arcade.examples.sprite_bullets_random
"""
+from __future__ import annotations
+
import arcade
import random
diff --git a/arcade/examples/sprite_change_coins.py b/arcade/examples/sprite_change_coins.py
index ca7e94ac27..802a2de616 100644
--- a/arcade/examples/sprite_change_coins.py
+++ b/arcade/examples/sprite_change_coins.py
@@ -9,6 +9,8 @@
python -m arcade.examples.sprite_change_coins
"""
+from __future__ import annotations
+
import random
import arcade
diff --git a/arcade/examples/sprite_collect_coins.py b/arcade/examples/sprite_collect_coins.py
index 44126099ba..143fe0162f 100644
--- a/arcade/examples/sprite_collect_coins.py
+++ b/arcade/examples/sprite_collect_coins.py
@@ -10,6 +10,8 @@
python -m arcade.examples.sprite_collect_coins
"""
+from __future__ import annotations
+
import random
import arcade
diff --git a/arcade/examples/sprite_collect_coins_background.py b/arcade/examples/sprite_collect_coins_background.py
index 0df3cbe2ce..85566dbe9a 100644
--- a/arcade/examples/sprite_collect_coins_background.py
+++ b/arcade/examples/sprite_collect_coins_background.py
@@ -8,6 +8,8 @@
If Python and Arcade are installed, this example can be run from the command line with:
python -m arcade.examples.sprite_collect_coins_background
"""
+from __future__ import annotations
+
import random
import arcade
diff --git a/arcade/examples/sprite_collect_coins_diff_levels.py b/arcade/examples/sprite_collect_coins_diff_levels.py
index 61a57c9ca6..624041d29f 100644
--- a/arcade/examples/sprite_collect_coins_diff_levels.py
+++ b/arcade/examples/sprite_collect_coins_diff_levels.py
@@ -9,6 +9,8 @@
python -m arcade.examples.sprite_collect_coins_diff_levels
"""
+from __future__ import annotations
+
import random
import arcade
diff --git a/arcade/examples/sprite_collect_coins_move_bouncing.py b/arcade/examples/sprite_collect_coins_move_bouncing.py
index e2e99e81da..beb6c31b31 100644
--- a/arcade/examples/sprite_collect_coins_move_bouncing.py
+++ b/arcade/examples/sprite_collect_coins_move_bouncing.py
@@ -9,6 +9,8 @@
python -m arcade.examples.sprite_collect_coins_move_bouncing
"""
+from __future__ import annotations
+
import random
import arcade
diff --git a/arcade/examples/sprite_collect_coins_move_circle.py b/arcade/examples/sprite_collect_coins_move_circle.py
index ab057d613b..f41a2cf682 100644
--- a/arcade/examples/sprite_collect_coins_move_circle.py
+++ b/arcade/examples/sprite_collect_coins_move_circle.py
@@ -9,6 +9,8 @@
python -m arcade.examples.sprite_collect_coins_move_circle
"""
+from __future__ import annotations
+
import random
import arcade
import math
diff --git a/arcade/examples/sprite_collect_coins_move_down.py b/arcade/examples/sprite_collect_coins_move_down.py
index c5457fc226..f4e88ac762 100644
--- a/arcade/examples/sprite_collect_coins_move_down.py
+++ b/arcade/examples/sprite_collect_coins_move_down.py
@@ -9,6 +9,8 @@
python -m arcade.examples.sprite_collect_coins_move_down
"""
+from __future__ import annotations
+
import random
import arcade
diff --git a/arcade/examples/sprite_collect_rotating.py b/arcade/examples/sprite_collect_rotating.py
index 4ffec29483..ac51239c1c 100644
--- a/arcade/examples/sprite_collect_rotating.py
+++ b/arcade/examples/sprite_collect_rotating.py
@@ -8,6 +8,8 @@
If Python and Arcade are installed, this example can be run from the command line with:
python -m arcade.examples.sprite_collect_rotating
"""
+from __future__ import annotations
+
import random
import arcade
diff --git a/arcade/examples/sprite_enemies_in_platformer.py b/arcade/examples/sprite_enemies_in_platformer.py
index 910007740c..392f39187a 100644
--- a/arcade/examples/sprite_enemies_in_platformer.py
+++ b/arcade/examples/sprite_enemies_in_platformer.py
@@ -8,6 +8,8 @@
python -m arcade.examples.sprite_enemies_in_platformer
"""
+from __future__ import annotations
+
import arcade
SPRITE_SCALING = 0.5
diff --git a/arcade/examples/sprite_explosion_bitmapped.py b/arcade/examples/sprite_explosion_bitmapped.py
index 844953d146..9decedac3a 100644
--- a/arcade/examples/sprite_explosion_bitmapped.py
+++ b/arcade/examples/sprite_explosion_bitmapped.py
@@ -9,6 +9,8 @@
If Python and Arcade are installed, this example can be run from the command line with:
python -m arcade.examples.sprite_explosion_bitmapped
"""
+from __future__ import annotations
+
import random
import arcade
diff --git a/arcade/examples/sprite_explosion_particles.py b/arcade/examples/sprite_explosion_particles.py
index 2b640db044..a266113f99 100644
--- a/arcade/examples/sprite_explosion_particles.py
+++ b/arcade/examples/sprite_explosion_particles.py
@@ -8,6 +8,8 @@
If Python and Arcade are installed, this example can be run from the command line with:
python -m arcade.examples.sprite_explosion_particles
"""
+from __future__ import annotations
+
import random
import math
import arcade
diff --git a/arcade/examples/sprite_face_left_or_right.py b/arcade/examples/sprite_face_left_or_right.py
index 24fc2dd64a..5232486eb9 100644
--- a/arcade/examples/sprite_face_left_or_right.py
+++ b/arcade/examples/sprite_face_left_or_right.py
@@ -10,6 +10,8 @@
python -m arcade.examples.sprite_face_left_or_right
"""
+from __future__ import annotations
+
import arcade
SPRITE_SCALING = 0.5
diff --git a/arcade/examples/sprite_follow_simple.py b/arcade/examples/sprite_follow_simple.py
index d7ad310188..f5f23a7bb3 100644
--- a/arcade/examples/sprite_follow_simple.py
+++ b/arcade/examples/sprite_follow_simple.py
@@ -9,6 +9,8 @@
python -m arcade.examples.sprite_follow_simple
"""
+from __future__ import annotations
+
import random
import arcade
diff --git a/arcade/examples/sprite_follow_simple_2.py b/arcade/examples/sprite_follow_simple_2.py
index 1cc5ffca66..0d998d205c 100644
--- a/arcade/examples/sprite_follow_simple_2.py
+++ b/arcade/examples/sprite_follow_simple_2.py
@@ -11,6 +11,8 @@
python -m arcade.examples.sprite_follow_simple_2
"""
+from __future__ import annotations
+
import random
import arcade
import math
diff --git a/arcade/examples/sprite_health.py b/arcade/examples/sprite_health.py
index b27a9fa6ab..1a1a957007 100644
--- a/arcade/examples/sprite_health.py
+++ b/arcade/examples/sprite_health.py
@@ -6,6 +6,8 @@
If Python and Arcade are installed, this example can be run from the command line with:
python -m arcade.examples.sprite_health
"""
+from __future__ import annotations
+
import math
from typing import Tuple
diff --git a/arcade/examples/sprite_minimal.py b/arcade/examples/sprite_minimal.py
index 048a459557..e0d5e270fe 100644
--- a/arcade/examples/sprite_minimal.py
+++ b/arcade/examples/sprite_minimal.py
@@ -6,6 +6,8 @@
If Python and Arcade are installed, this example can be run from the command line with:
python -m arcade.examples.sprite_minimal
"""
+from __future__ import annotations
+
import arcade
diff --git a/arcade/examples/sprite_move_angle.py b/arcade/examples/sprite_move_angle.py
index b8133bd854..6ee5339ec2 100644
--- a/arcade/examples/sprite_move_angle.py
+++ b/arcade/examples/sprite_move_angle.py
@@ -8,6 +8,8 @@
If Python and Arcade are installed, this example can be run from the command line with:
python -m arcade.examples.sprite_move_angle
"""
+from __future__ import annotations
+
import arcade
import math
diff --git a/arcade/examples/sprite_move_animation.py b/arcade/examples/sprite_move_animation.py
index 4d832b3934..9d28e467fd 100644
--- a/arcade/examples/sprite_move_animation.py
+++ b/arcade/examples/sprite_move_animation.py
@@ -8,6 +8,8 @@
If Python and Arcade are installed, this example can be run from the command line with:
python -m arcade.examples.sprite_move_animation
"""
+from __future__ import annotations
+
import arcade
import random
diff --git a/arcade/examples/sprite_move_controller.py b/arcade/examples/sprite_move_controller.py
index 1904ed3745..e911e1bd1b 100644
--- a/arcade/examples/sprite_move_controller.py
+++ b/arcade/examples/sprite_move_controller.py
@@ -10,6 +10,8 @@
command line with:
python -m arcade.examples.sprite_move_controller
"""
+from __future__ import annotations
+
import arcade
SPRITE_SCALING = 0.5
diff --git a/arcade/examples/sprite_move_keyboard.py b/arcade/examples/sprite_move_keyboard.py
index 672902a587..c1498f4c98 100644
--- a/arcade/examples/sprite_move_keyboard.py
+++ b/arcade/examples/sprite_move_keyboard.py
@@ -11,6 +11,8 @@
python -m arcade.examples.sprite_move_keyboard
"""
+from __future__ import annotations
+
import arcade
SPRITE_SCALING = 0.5
diff --git a/arcade/examples/sprite_move_keyboard_accel.py b/arcade/examples/sprite_move_keyboard_accel.py
index cd0175d016..3e3e83fc7a 100644
--- a/arcade/examples/sprite_move_keyboard_accel.py
+++ b/arcade/examples/sprite_move_keyboard_accel.py
@@ -11,6 +11,8 @@
python -m arcade.examples.sprite_move_keyboard_accel
"""
+from __future__ import annotations
+
import arcade
SPRITE_SCALING = 0.5
diff --git a/arcade/examples/sprite_move_keyboard_better.py b/arcade/examples/sprite_move_keyboard_better.py
index db7e9fb40e..b6834ca3b6 100644
--- a/arcade/examples/sprite_move_keyboard_better.py
+++ b/arcade/examples/sprite_move_keyboard_better.py
@@ -11,6 +11,8 @@
python -m arcade.examples.sprite_move_keyboard_better
"""
+from __future__ import annotations
+
import arcade
SPRITE_SCALING = 0.5
diff --git a/arcade/examples/sprite_move_scrolling.py b/arcade/examples/sprite_move_scrolling.py
index 4f661e6c18..76489f63b5 100644
--- a/arcade/examples/sprite_move_scrolling.py
+++ b/arcade/examples/sprite_move_scrolling.py
@@ -7,6 +7,8 @@
python -m arcade.examples.sprite_move_scrolling
"""
+from __future__ import annotations
+
import random
import arcade
from pyglet.math import Vec2
diff --git a/arcade/examples/sprite_move_scrolling_box.py b/arcade/examples/sprite_move_scrolling_box.py
index 1baf848ad6..c8d2f98c0f 100644
--- a/arcade/examples/sprite_move_scrolling_box.py
+++ b/arcade/examples/sprite_move_scrolling_box.py
@@ -7,6 +7,8 @@
python -m arcade.examples.sprite_move_scrolling_box
"""
+from __future__ import annotations
+
import random
import arcade
diff --git a/arcade/examples/sprite_move_scrolling_shake.py b/arcade/examples/sprite_move_scrolling_shake.py
index d1778fd2d9..0c0d46724b 100644
--- a/arcade/examples/sprite_move_scrolling_shake.py
+++ b/arcade/examples/sprite_move_scrolling_shake.py
@@ -7,6 +7,8 @@
python -m arcade.examples.sprite_move_scrolling_shake
"""
+from __future__ import annotations
+
import random
import math
import arcade
diff --git a/arcade/examples/sprite_move_walls.py b/arcade/examples/sprite_move_walls.py
index 51fa04cea8..669f1a39e5 100644
--- a/arcade/examples/sprite_move_walls.py
+++ b/arcade/examples/sprite_move_walls.py
@@ -9,6 +9,8 @@
python -m arcade.examples.sprite_move_walls
"""
+from __future__ import annotations
+
import arcade
SPRITE_SCALING = 0.5
diff --git a/arcade/examples/sprite_moving_platforms.py b/arcade/examples/sprite_moving_platforms.py
index 11606f8f64..6180022629 100644
--- a/arcade/examples/sprite_moving_platforms.py
+++ b/arcade/examples/sprite_moving_platforms.py
@@ -6,6 +6,8 @@
If Python and Arcade are installed, this example can be run from the command line with:
python -m arcade.examples.sprite_moving_platforms
"""
+from __future__ import annotations
+
import arcade
from pyglet.math import Vec2
diff --git a/arcade/examples/sprite_no_coins_on_walls.py b/arcade/examples/sprite_no_coins_on_walls.py
index dc029c2576..561296b6fc 100644
--- a/arcade/examples/sprite_no_coins_on_walls.py
+++ b/arcade/examples/sprite_no_coins_on_walls.py
@@ -9,6 +9,8 @@
If Python and Arcade are installed, this example can be run from the command line with:
python -m arcade.examples.sprite_no_coins_on_walls
"""
+from __future__ import annotations
+
import arcade
import random
diff --git a/arcade/examples/sprite_properties.py b/arcade/examples/sprite_properties.py
index 9e887244aa..b7afcdc261 100644
--- a/arcade/examples/sprite_properties.py
+++ b/arcade/examples/sprite_properties.py
@@ -8,6 +8,8 @@
If Python and Arcade are installed, this example can be run from the command line with:
python -m arcade.examples.sprite_properties
"""
+from __future__ import annotations
+
import arcade
# --- Constants ---
diff --git a/arcade/examples/sprite_rooms.py b/arcade/examples/sprite_rooms.py
index 8b81880b7b..6c28917dc1 100644
--- a/arcade/examples/sprite_rooms.py
+++ b/arcade/examples/sprite_rooms.py
@@ -6,6 +6,8 @@
If Python and Arcade are installed, this example can be run from the command line with:
python -m arcade.examples.sprite_rooms
"""
+from __future__ import annotations
+
import arcade
SPRITE_SCALING = 0.5
diff --git a/arcade/examples/sprite_rotate_around_point.py b/arcade/examples/sprite_rotate_around_point.py
index 524018d91a..3c9c02144c 100644
--- a/arcade/examples/sprite_rotate_around_point.py
+++ b/arcade/examples/sprite_rotate_around_point.py
@@ -9,6 +9,8 @@
If Python and Arcade are installed, this example can be run from the command line with:
python -m arcade.examples.sprite_rotate_around_point
"""
+from __future__ import annotations
+
import arcade
from arcade.math import rotate_point
diff --git a/arcade/examples/sprite_rotate_around_tank.py b/arcade/examples/sprite_rotate_around_tank.py
index eea0c8bc61..c3e7f15ba5 100644
--- a/arcade/examples/sprite_rotate_around_tank.py
+++ b/arcade/examples/sprite_rotate_around_tank.py
@@ -21,6 +21,8 @@
If Python and Arcade are installed, this example can be run from the command line with:
python -m arcade.examples.sprite_rotate_around_tank
"""
+from __future__ import annotations
+
import math
import arcade
from arcade.types import Point
diff --git a/arcade/examples/sprite_tiled_map.py b/arcade/examples/sprite_tiled_map.py
index 0761c38a53..7f83b38441 100644
--- a/arcade/examples/sprite_tiled_map.py
+++ b/arcade/examples/sprite_tiled_map.py
@@ -8,6 +8,8 @@
python -m arcade.examples.sprite_tiled_map
"""
+from __future__ import annotations
+
import time
import arcade
diff --git a/arcade/examples/sprite_tiled_map_with_levels.py b/arcade/examples/sprite_tiled_map_with_levels.py
index be6a34d002..d5ad290991 100644
--- a/arcade/examples/sprite_tiled_map_with_levels.py
+++ b/arcade/examples/sprite_tiled_map_with_levels.py
@@ -7,6 +7,8 @@
If Python and Arcade are installed, this example can be run from the command line with:
python -m arcade.examples.sprite_tiled_map_with_levels
"""
+from __future__ import annotations
+
import time
import arcade
diff --git a/arcade/examples/starting_template.py b/arcade/examples/starting_template.py
index d0e20388a2..66a4c2875f 100644
--- a/arcade/examples/starting_template.py
+++ b/arcade/examples/starting_template.py
@@ -7,6 +7,8 @@
If Python and Arcade are installed, this example can be run from the command line with:
python -m arcade.examples.starting_template
"""
+from __future__ import annotations
+
import arcade
SCREEN_WIDTH = 800
diff --git a/arcade/examples/template_platformer.py b/arcade/examples/template_platformer.py
index 35a4a165e4..b1c98332d9 100644
--- a/arcade/examples/template_platformer.py
+++ b/arcade/examples/template_platformer.py
@@ -4,6 +4,8 @@
If Python and Arcade are installed, this example can be run from the command line with:
python -m arcade.examples.template_platformer
"""
+from __future__ import annotations
+
import arcade
# --- Constants
diff --git a/arcade/examples/tetris.py b/arcade/examples/tetris.py
index 36158de9e4..df46528a84 100644
--- a/arcade/examples/tetris.py
+++ b/arcade/examples/tetris.py
@@ -7,6 +7,8 @@
If Python and Arcade are installed, this example can be run from the command line with:
python -m arcade.examples.tetris
"""
+from __future__ import annotations
+
# flake8: noqa: E241
import arcade
import random
diff --git a/arcade/examples/text_loc_example_done.py b/arcade/examples/text_loc_example_done.py
index f609ab6fd7..14dbe984cc 100644
--- a/arcade/examples/text_loc_example_done.py
+++ b/arcade/examples/text_loc_example_done.py
@@ -4,6 +4,8 @@
If Python and Arcade are installed, this example can be run from the command line with:
python -m arcade.examples.text_loc_example_done
"""
+from __future__ import annotations
+
import arcade
import gettext
diff --git a/arcade/examples/text_loc_example_start.py b/arcade/examples/text_loc_example_start.py
index 0a146c2654..39b9a4fa08 100644
--- a/arcade/examples/text_loc_example_start.py
+++ b/arcade/examples/text_loc_example_start.py
@@ -4,6 +4,8 @@
If Python and Arcade are installed, this example can be run from the command line with:
python -m arcade.examples.text_loc_example_start
"""
+from __future__ import annotations
+
import arcade
SCREEN_WIDTH = 500
diff --git a/arcade/examples/timer.py b/arcade/examples/timer.py
index 3f2b8fa564..b180da2098 100644
--- a/arcade/examples/timer.py
+++ b/arcade/examples/timer.py
@@ -4,6 +4,8 @@
If Python and Arcade are installed, this example can be run from the command line with:
python -m arcade.examples.timer
"""
+from __future__ import annotations
+
import arcade
SCREEN_WIDTH = 800
diff --git a/arcade/examples/transform_feedback.py b/arcade/examples/transform_feedback.py
index b4ce242c02..9b7a5454b7 100644
--- a/arcade/examples/transform_feedback.py
+++ b/arcade/examples/transform_feedback.py
@@ -18,6 +18,8 @@
If Python and Arcade are installed, this example can be run from the command line with:
python -m arcade.examples.transform_feedback
"""
+from __future__ import annotations
+
from array import array
import math
import time
diff --git a/arcade/examples/transitions.py b/arcade/examples/transitions.py
index b4907ca7b1..5226714be8 100644
--- a/arcade/examples/transitions.py
+++ b/arcade/examples/transitions.py
@@ -4,6 +4,8 @@
If Python and Arcade are installed, this example can be run from the command line with:
python -m arcade.examples.transitions
"""
+from __future__ import annotations
+
import arcade
WIDTH = 800
diff --git a/arcade/examples/turn_and_move.py b/arcade/examples/turn_and_move.py
index 1cfb94fe72..5d64608e29 100644
--- a/arcade/examples/turn_and_move.py
+++ b/arcade/examples/turn_and_move.py
@@ -6,6 +6,8 @@
If Python and Arcade are installed, this example can be run from the command line with:
python -m arcade.examples.turn_and_move
"""
+from __future__ import annotations
+
import math
import arcade
diff --git a/arcade/examples/view_instructions_and_game_over.py b/arcade/examples/view_instructions_and_game_over.py
index f0d82dd1ac..6d901b4b42 100644
--- a/arcade/examples/view_instructions_and_game_over.py
+++ b/arcade/examples/view_instructions_and_game_over.py
@@ -18,6 +18,8 @@
python -m arcade.examples.view_instructions_and_game_over
"""
+from __future__ import annotations
+
import arcade
import random
diff --git a/arcade/examples/view_pause_screen.py b/arcade/examples/view_pause_screen.py
index 5012862b5e..64337dcf76 100644
--- a/arcade/examples/view_pause_screen.py
+++ b/arcade/examples/view_pause_screen.py
@@ -11,6 +11,8 @@
python -m arcade.examples.view_pause_screen
"""
+from __future__ import annotations
+
import arcade
WIDTH = 800
diff --git a/arcade/examples/view_screens_minimal.py b/arcade/examples/view_screens_minimal.py
index 2f8d1035ce..6e61d88feb 100644
--- a/arcade/examples/view_screens_minimal.py
+++ b/arcade/examples/view_screens_minimal.py
@@ -17,6 +17,8 @@ class makes it easy to separate the code for each screen into
python -m arcade.examples.view_screens_minimal
"""
+from __future__ import annotations
+
import arcade
diff --git a/arcade/experimental/__init__.py b/arcade/experimental/__init__.py
index c98ce7ad84..0ce6821213 100644
--- a/arcade/experimental/__init__.py
+++ b/arcade/experimental/__init__.py
@@ -1,6 +1,8 @@
"""
Experimental stuff. API may change.
"""
+from __future__ import annotations
+
from .video_player import VideoPlayer, VideoPlayerView
from .texture_render_target import RenderTargetTexture
from .shadertoy import Shadertoy, ShadertoyBuffer, ShadertoyBase
@@ -20,7 +22,7 @@
# Keep cv2 an optional dependency
try:
- from .video_cv2 import VideoPlayerCV2, CV2PlayerView # noqa: F401
+ from .video_cv2 import CV2PlayerView, VideoPlayerCV2 # noqa: F401
__all__.extend([
"VideoPlayerCV2",
diff --git a/arcade/experimental/actor_map.py b/arcade/experimental/actor_map.py
index debb349bed..fec2dcd100 100644
--- a/arcade/experimental/actor_map.py
+++ b/arcade/experimental/actor_map.py
@@ -5,6 +5,8 @@
This example is using the lower level rendering API
in arcade.
"""
+from __future__ import annotations
+
import random
from typing import Tuple
diff --git a/arcade/experimental/atlas_load_save.py b/arcade/experimental/atlas_load_save.py
index 520adee7c4..27fc17bcd6 100644
--- a/arcade/experimental/atlas_load_save.py
+++ b/arcade/experimental/atlas_load_save.py
@@ -8,6 +8,8 @@
python arcade/experimental/atlas_load_save.py load
"""
+from __future__ import annotations
+
import sys
import math
import pprint
diff --git a/arcade/experimental/atlas_render_into.py b/arcade/experimental/atlas_render_into.py
index 7e5ea4caa7..c43919f9df 100644
--- a/arcade/experimental/atlas_render_into.py
+++ b/arcade/experimental/atlas_render_into.py
@@ -1,6 +1,8 @@
"""
Render into a sub-section of a texture atlas
"""
+from __future__ import annotations
+
import math
import arcade
diff --git a/arcade/experimental/atlas_replace_image.py b/arcade/experimental/atlas_replace_image.py
index 057c2c4def..558f63be5d 100644
--- a/arcade/experimental/atlas_replace_image.py
+++ b/arcade/experimental/atlas_replace_image.py
@@ -4,6 +4,8 @@
one, but in instances were images are created manually by code and changing
over time at (not too frequently) we can update the underlying atlas directly.
"""
+from __future__ import annotations
+
from itertools import cycle
import arcade
diff --git a/arcade/experimental/bloom_filter.py b/arcade/experimental/bloom_filter.py
index a30bcffca6..050b56ec2e 100644
--- a/arcade/experimental/bloom_filter.py
+++ b/arcade/experimental/bloom_filter.py
@@ -1,6 +1,8 @@
"""
See: https://www.shadertoy.com/view/lsBfRc
"""
+from __future__ import annotations
+
from arcade.experimental import Shadertoy
diff --git a/arcade/experimental/bloom_multilayer_defender.py b/arcade/experimental/bloom_multilayer_defender.py
index 2eaac1f8e4..8e4f2284e2 100644
--- a/arcade/experimental/bloom_multilayer_defender.py
+++ b/arcade/experimental/bloom_multilayer_defender.py
@@ -9,6 +9,8 @@
python -m arcade.examples.defender
"""
+from __future__ import annotations
+
import arcade
import os
import random
diff --git a/arcade/experimental/crt_filter.py b/arcade/experimental/crt_filter.py
index 2240e87ea7..8d0ca152d9 100644
--- a/arcade/experimental/crt_filter.py
+++ b/arcade/experimental/crt_filter.py
@@ -1,3 +1,5 @@
+from __future__ import annotations
+
from arcade.experimental import Shadertoy
from pyglet.math import Vec2
diff --git a/arcade/experimental/gaussian_kernel.py b/arcade/experimental/gaussian_kernel.py
index c6911f64f8..d06d77c087 100644
--- a/arcade/experimental/gaussian_kernel.py
+++ b/arcade/experimental/gaussian_kernel.py
@@ -3,6 +3,8 @@
Adapted from:
https://observablehq.com/@jobleonard/gaussian-kernel-calculater
"""
+from __future__ import annotations
+
import math
SQRT2 = math.sqrt(2)
diff --git a/arcade/experimental/geo_culling_check.py b/arcade/experimental/geo_culling_check.py
index 74c3d291c2..b7d9fabc92 100644
--- a/arcade/experimental/geo_culling_check.py
+++ b/arcade/experimental/geo_culling_check.py
@@ -6,6 +6,8 @@
Simply run the program and move draw the sprites around using the mouse.
"""
+from __future__ import annotations
+
from arcade.sprite import Sprite
import PIL
import arcade
diff --git a/arcade/experimental/light_demo.py b/arcade/experimental/light_demo.py
index b04b9d2964..38478d60df 100644
--- a/arcade/experimental/light_demo.py
+++ b/arcade/experimental/light_demo.py
@@ -1,3 +1,5 @@
+from __future__ import annotations
+
import math
import arcade
from arcade.experimental.lights import Light, LightLayer
diff --git a/arcade/experimental/light_demo_perf.py b/arcade/experimental/light_demo_perf.py
index 647554edde..82f691c22e 100644
--- a/arcade/experimental/light_demo_perf.py
+++ b/arcade/experimental/light_demo_perf.py
@@ -1,3 +1,5 @@
+from __future__ import annotations
+
import math
import random
import arcade
diff --git a/arcade/experimental/lights.py b/arcade/experimental/lights.py
index 4bd4f8b1cf..280dbe35b1 100644
--- a/arcade/experimental/lights.py
+++ b/arcade/experimental/lights.py
@@ -1,3 +1,5 @@
+from __future__ import annotations
+
from array import array
from typing import Iterable, Tuple, Sequence, List, Optional
diff --git a/arcade/experimental/postprocessing.py b/arcade/experimental/postprocessing.py
index d629275398..1b510b762a 100644
--- a/arcade/experimental/postprocessing.py
+++ b/arcade/experimental/postprocessing.py
@@ -1,6 +1,8 @@
"""
Post-processing shaders.
"""
+from __future__ import annotations
+
from typing import Tuple
from arcade.context import ArcadeContext
from arcade.gl.texture import Texture2D
diff --git a/arcade/experimental/profiling.py b/arcade/experimental/profiling.py
index 8e6f13d464..dd03141596 100644
--- a/arcade/experimental/profiling.py
+++ b/arcade/experimental/profiling.py
@@ -1,6 +1,8 @@
"""
Simple experimental profiler. This api is not stable.
"""
+from __future__ import annotations
+
import cProfile
import pstats
from io import StringIO
diff --git a/arcade/experimental/pygame_interaction.py b/arcade/experimental/pygame_interaction.py
index e11a8ff4bf..7201cc35ed 100644
--- a/arcade/experimental/pygame_interaction.py
+++ b/arcade/experimental/pygame_interaction.py
@@ -12,6 +12,8 @@
pip install -I pygame-ce==2.1.3
"""
+from __future__ import annotations
+
import math
from typing import Tuple
diff --git a/arcade/experimental/query_demo.py b/arcade/experimental/query_demo.py
index d7c08d5cbd..06a09076df 100644
--- a/arcade/experimental/query_demo.py
+++ b/arcade/experimental/query_demo.py
@@ -1,3 +1,5 @@
+from __future__ import annotations
+
import math
import time
import arcade
diff --git a/arcade/experimental/render_offscreen_animated.py b/arcade/experimental/render_offscreen_animated.py
index 867f3ffce5..975c8037c3 100644
--- a/arcade/experimental/render_offscreen_animated.py
+++ b/arcade/experimental/render_offscreen_animated.py
@@ -4,6 +4,8 @@
If Python and Arcade are installed, this example can be run from the command line with:
python -m arcade.examples.shape_list_skylines
"""
+from __future__ import annotations
+
import random
import arcade
import time
diff --git a/arcade/experimental/shadertoy.py b/arcade/experimental/shadertoy.py
index f4035e9f89..8133628a06 100644
--- a/arcade/experimental/shadertoy.py
+++ b/arcade/experimental/shadertoy.py
@@ -14,6 +14,8 @@
uniform vec4 iDate; // (year, month, day, time in seconds)
uniform float iSampleRate; // sound sample rate (i.e., 44100)
"""
+from __future__ import annotations
+
import string
from datetime import datetime
from pathlib import Path
diff --git a/arcade/experimental/shadertoy_demo.py b/arcade/experimental/shadertoy_demo.py
index a71727002b..fcd9d8d323 100644
--- a/arcade/experimental/shadertoy_demo.py
+++ b/arcade/experimental/shadertoy_demo.py
@@ -1,3 +1,5 @@
+from __future__ import annotations
+
from pathlib import Path
import arcade
from arcade.experimental.shadertoy import Shadertoy
diff --git a/arcade/experimental/shadertoy_demo_simple.py b/arcade/experimental/shadertoy_demo_simple.py
index eeb696a9b0..5e3d905b59 100644
--- a/arcade/experimental/shadertoy_demo_simple.py
+++ b/arcade/experimental/shadertoy_demo_simple.py
@@ -1,3 +1,5 @@
+from __future__ import annotations
+
import arcade
from arcade.experimental.shadertoy import Shadertoy
diff --git a/arcade/experimental/shadertoy_textures.py b/arcade/experimental/shadertoy_textures.py
index f7eb27343e..df14f0ee88 100644
--- a/arcade/experimental/shadertoy_textures.py
+++ b/arcade/experimental/shadertoy_textures.py
@@ -2,6 +2,8 @@
Use texture layers with shadertoy.
We simply mix the two texture layers.
"""
+from __future__ import annotations
+
import arcade
from arcade.experimental.shadertoy import Shadertoy
diff --git a/arcade/experimental/shadertoy_video_cv2.py b/arcade/experimental/shadertoy_video_cv2.py
index 313bcb74fb..c485b3fedb 100644
--- a/arcade/experimental/shadertoy_video_cv2.py
+++ b/arcade/experimental/shadertoy_video_cv2.py
@@ -5,6 +5,8 @@
pip install opencv-python
"""
+from __future__ import annotations
+
import arcade
from arcade.experimental.shadertoy import Shadertoy
import cv2 # type: ignore
diff --git a/arcade/experimental/shapes_buffered_2_glow.py b/arcade/experimental/shapes_buffered_2_glow.py
index 0b89f2d64d..db8dced2a1 100644
--- a/arcade/experimental/shapes_buffered_2_glow.py
+++ b/arcade/experimental/shapes_buffered_2_glow.py
@@ -6,6 +6,8 @@
If Python and Arcade are installed, this example can be run from the command line with:
python -m arcade.examples.shapes_buffered
"""
+from __future__ import annotations
+
import random
import arcade
from arcade.experimental import postprocessing
diff --git a/arcade/experimental/shapes_perf.py b/arcade/experimental/shapes_perf.py
index 9542c14d46..e4ba9be777 100644
--- a/arcade/experimental/shapes_perf.py
+++ b/arcade/experimental/shapes_perf.py
@@ -1,6 +1,8 @@
"""
This is for testing geometry shader shapes. Please keep.
"""
+from __future__ import annotations
+
import time
import math
import random
diff --git a/arcade/experimental/sprite_collect_coins_minimap.py b/arcade/experimental/sprite_collect_coins_minimap.py
index 6b3ee89732..e670dd6341 100644
--- a/arcade/experimental/sprite_collect_coins_minimap.py
+++ b/arcade/experimental/sprite_collect_coins_minimap.py
@@ -9,6 +9,8 @@
python -m arcade.examples.sprite_collect_coins
"""
+from __future__ import annotations
+
import random
import arcade
import os
diff --git a/arcade/experimental/sprite_depth_cosine.py b/arcade/experimental/sprite_depth_cosine.py
index 27e3329461..f74a7bf9f7 100644
--- a/arcade/experimental/sprite_depth_cosine.py
+++ b/arcade/experimental/sprite_depth_cosine.py
@@ -13,6 +13,8 @@
If Python and Arcade are installed, this example can be run from the command line with:
python -m arcade.experimental.sprite_depth_cosine
"""
+from __future__ import annotations
+
import math
import arcade
from pyglet.graphics import Batch
diff --git a/arcade/experimental/subpixel_experiment.py b/arcade/experimental/subpixel_experiment.py
index a55c5376b9..5e957d4652 100644
--- a/arcade/experimental/subpixel_experiment.py
+++ b/arcade/experimental/subpixel_experiment.py
@@ -1,3 +1,5 @@
+from __future__ import annotations
+
import logging
from itertools import cycle
import arcade
diff --git a/arcade/experimental/texture_render_target.py b/arcade/experimental/texture_render_target.py
index 538e466e54..0da073d5f2 100644
--- a/arcade/experimental/texture_render_target.py
+++ b/arcade/experimental/texture_render_target.py
@@ -1,3 +1,5 @@
+from __future__ import annotations
+
from arcade import get_window
from arcade.types import RGBA255
from arcade.gl import geometry
diff --git a/arcade/experimental/texture_transforms.py b/arcade/experimental/texture_transforms.py
index d8b12e3708..5548497c57 100644
--- a/arcade/experimental/texture_transforms.py
+++ b/arcade/experimental/texture_transforms.py
@@ -1,3 +1,5 @@
+from __future__ import annotations
+
import random
import arcade
from arcade.texture import transforms
diff --git a/arcade/experimental/video_cv2.py b/arcade/experimental/video_cv2.py
index 6fae26f97b..90755fd0f0 100644
--- a/arcade/experimental/video_cv2.py
+++ b/arcade/experimental/video_cv2.py
@@ -8,6 +8,8 @@
Dependencies:
pip install opencv-python
"""
+from __future__ import annotations
+
from math import floor
from pathlib import Path
from typing import Union
diff --git a/arcade/experimental/video_player.py b/arcade/experimental/video_player.py
index 11cd71f227..246b38403c 100644
--- a/arcade/experimental/video_player.py
+++ b/arcade/experimental/video_player.py
@@ -4,6 +4,8 @@
This requires that you have ffmpeg installed
and you might need to tell pyglet where it's located.
"""
+from __future__ import annotations
+
from pathlib import Path
from typing import Optional, Tuple, Union
diff --git a/arcade/experimental/video_record_cv2.py b/arcade/experimental/video_record_cv2.py
index ebab5916a7..d77f8d032d 100644
--- a/arcade/experimental/video_record_cv2.py
+++ b/arcade/experimental/video_record_cv2.py
@@ -19,6 +19,8 @@
pip install opencv-python numpy
"""
+from __future__ import annotations
+
import cv2 # type: ignore
import numpy # type: ignore
import pyglet.gl as gl
diff --git a/arcade/geometry.py b/arcade/geometry.py
index 617082413c..e38e130aa1 100644
--- a/arcade/geometry.py
+++ b/arcade/geometry.py
@@ -5,6 +5,8 @@
Point in polygon function from https://www.geeksforgeeks.org/how-to-check-if-a-given-point-lies-inside-a-polygon/
"""
+from __future__ import annotations
+
from arcade.types import Point, PointList
diff --git a/arcade/gl/__init__.py b/arcade/gl/__init__.py
index 03f35256bf..14b3fb861e 100644
--- a/arcade/gl/__init__.py
+++ b/arcade/gl/__init__.py
@@ -14,8 +14,9 @@
.. warning:: This module contains the low level rendering API for arcade
and is only recommended for more advanced users
"""
-# flake8: noqa
+from __future__ import annotations
+# flake8: noqa
from .context import Context
from .types import BufferDescription
from .compute_shader import ComputeShader
diff --git a/arcade/gl/buffer.py b/arcade/gl/buffer.py
index 2980d686e5..2c90bb4bb2 100644
--- a/arcade/gl/buffer.py
+++ b/arcade/gl/buffer.py
@@ -1,3 +1,5 @@
+from __future__ import annotations
+
from ctypes import byref, string_at
import weakref
from typing import Optional, TYPE_CHECKING
diff --git a/arcade/gl/compute_shader.py b/arcade/gl/compute_shader.py
index f52f74ca42..2bedc44871 100644
--- a/arcade/gl/compute_shader.py
+++ b/arcade/gl/compute_shader.py
@@ -1,3 +1,5 @@
+from __future__ import annotations
+
from typing import TYPE_CHECKING, Dict, Tuple, Union
from ctypes import c_char, cast, byref, POINTER, c_char_p, pointer, c_int, create_string_buffer, c_buffer
import weakref
diff --git a/arcade/gl/context.py b/arcade/gl/context.py
index 25b1d4b08e..7e15c6d98c 100644
--- a/arcade/gl/context.py
+++ b/arcade/gl/context.py
@@ -1,3 +1,5 @@
+from __future__ import annotations
+
import logging
import weakref
from collections import deque
diff --git a/arcade/gl/enums.py b/arcade/gl/enums.py
index 21fd6296e4..08169d20f4 100644
--- a/arcade/gl/enums.py
+++ b/arcade/gl/enums.py
@@ -1,3 +1,5 @@
+from __future__ import annotations
+
from pyglet import gl
diff --git a/arcade/gl/exceptions.py b/arcade/gl/exceptions.py
index 1f788297f0..c1c567c661 100644
--- a/arcade/gl/exceptions.py
+++ b/arcade/gl/exceptions.py
@@ -1,3 +1,6 @@
+from __future__ import annotations
+
+
class ShaderException(Exception):
""" Exception class for shader-specific problems. """
diff --git a/arcade/gl/framebuffer.py b/arcade/gl/framebuffer.py
index bef9a88ce5..714fc71bb6 100644
--- a/arcade/gl/framebuffer.py
+++ b/arcade/gl/framebuffer.py
@@ -1,3 +1,5 @@
+from __future__ import annotations
+
from ctypes import c_int, string_at
from contextlib import contextmanager
from typing import Optional, Tuple, List, TYPE_CHECKING, Union
diff --git a/arcade/gl/geometry.py b/arcade/gl/geometry.py
index 4356c51936..941009c911 100644
--- a/arcade/gl/geometry.py
+++ b/arcade/gl/geometry.py
@@ -1,6 +1,8 @@
"""
A module providing commonly used geometry
"""
+from __future__ import annotations
+
import math
from array import array
from typing import Tuple
diff --git a/arcade/gl/glsl.py b/arcade/gl/glsl.py
index ef946f200f..9388d84e26 100644
--- a/arcade/gl/glsl.py
+++ b/arcade/gl/glsl.py
@@ -1,3 +1,5 @@
+from __future__ import annotations
+
from typing import TYPE_CHECKING, Dict, Iterable, List, Optional
import re
diff --git a/arcade/gl/program.py b/arcade/gl/program.py
index 8b67427be1..dd8cc8fa23 100644
--- a/arcade/gl/program.py
+++ b/arcade/gl/program.py
@@ -1,3 +1,5 @@
+from __future__ import annotations
+
from ctypes import (
c_char,
c_int,
diff --git a/arcade/gl/query.py b/arcade/gl/query.py
index d7cabc36af..04f4b980e2 100644
--- a/arcade/gl/query.py
+++ b/arcade/gl/query.py
@@ -1,3 +1,5 @@
+from __future__ import annotations
+
from typing import TYPE_CHECKING
import weakref
diff --git a/arcade/gl/texture.py b/arcade/gl/texture.py
index 3a9b56ce25..234b1d6fac 100644
--- a/arcade/gl/texture.py
+++ b/arcade/gl/texture.py
@@ -1,3 +1,5 @@
+from __future__ import annotations
+
from ctypes import byref, string_at
import weakref
from typing import Optional, Tuple, Union, TYPE_CHECKING
diff --git a/arcade/gl/types.py b/arcade/gl/types.py
index fe81e27d03..2ca225c257 100644
--- a/arcade/gl/types.py
+++ b/arcade/gl/types.py
@@ -1,3 +1,5 @@
+from __future__ import annotations
+
import re
from typing import Dict, Optional, Iterable, List, Sequence, Tuple, Union
diff --git a/arcade/gl/uniform.py b/arcade/gl/uniform.py
index cc51df995b..088fe75ea4 100644
--- a/arcade/gl/uniform.py
+++ b/arcade/gl/uniform.py
@@ -1,3 +1,5 @@
+from __future__ import annotations
+
from ctypes import cast, POINTER
from pyglet import gl
diff --git a/arcade/gl/utils.py b/arcade/gl/utils.py
index 4d4a93082c..e7632210ab 100644
--- a/arcade/gl/utils.py
+++ b/arcade/gl/utils.py
@@ -1,3 +1,5 @@
+from __future__ import annotations
+
from array import array
from typing import Any, Tuple
from ctypes import c_byte
diff --git a/arcade/gl/vertex_array.py b/arcade/gl/vertex_array.py
index e1e538b4e1..c468bc1505 100644
--- a/arcade/gl/vertex_array.py
+++ b/arcade/gl/vertex_array.py
@@ -1,3 +1,5 @@
+from __future__ import annotations
+
from ctypes import c_void_p, byref
from typing import Dict, List, Optional, Sequence, TYPE_CHECKING, Union
import weakref
diff --git a/arcade/gui/__init__.py b/arcade/gui/__init__.py
index e6a9e2d023..2af5943c24 100644
--- a/arcade/gui/__init__.py
+++ b/arcade/gui/__init__.py
@@ -1,3 +1,5 @@
+from __future__ import annotations
+
from arcade.gui.constructs import UIMessageBox, UIButtonRow
from arcade.gui.events import UIEvent
from arcade.gui.events import UIKeyEvent
diff --git a/arcade/gui/constructs.py b/arcade/gui/constructs.py
index 4b8ec90251..3e24def5b7 100644
--- a/arcade/gui/constructs.py
+++ b/arcade/gui/constructs.py
@@ -1,6 +1,8 @@
"""
Constructs, are prepared widget combinations, you can use for common use-cases
"""
+from __future__ import annotations
+
from typing import Any, Optional
import arcade
diff --git a/arcade/gui/events.py b/arcade/gui/events.py
index 2fa73fc9fc..3b134e4d47 100644
--- a/arcade/gui/events.py
+++ b/arcade/gui/events.py
@@ -1,3 +1,5 @@
+from __future__ import annotations
+
from dataclasses import dataclass
from typing import Any
diff --git a/arcade/gui/examples/anchor_layout.py b/arcade/gui/examples/anchor_layout.py
index a7bddfce70..3a621f8723 100644
--- a/arcade/gui/examples/anchor_layout.py
+++ b/arcade/gui/examples/anchor_layout.py
@@ -9,6 +9,8 @@
python -m arcade.gui.examples.anchor_layout
"""
+from __future__ import annotations
+
import arcade
from arcade.gui import UIManager
from arcade.gui.widgets import UIDummy
diff --git a/arcade/gui/examples/box_layout.py b/arcade/gui/examples/box_layout.py
index 6af8ecaac7..7db36665dc 100644
--- a/arcade/gui/examples/box_layout.py
+++ b/arcade/gui/examples/box_layout.py
@@ -8,6 +8,8 @@
If arcade and Python are properly installed, you can run this example with:
python -m arcade.gui.examples.box_layout
"""
+from __future__ import annotations
+
import arcade
from arcade.gui import UIManager, UIBoxLayout
from arcade.gui.widgets import UIDummy, UISpace
diff --git a/arcade/gui/examples/button_with_text.py b/arcade/gui/examples/button_with_text.py
index 953a5d7716..3c0371a549 100644
--- a/arcade/gui/examples/button_with_text.py
+++ b/arcade/gui/examples/button_with_text.py
@@ -8,6 +8,8 @@
If arcade and Python are properly installed, you can run this example with:
python -m arcade.gui.examples.button_with_text
"""
+from __future__ import annotations
+
import arcade
from arcade import load_texture
from arcade.gui import UIManager, UIImage
diff --git a/arcade/gui/examples/dropdown.py b/arcade/gui/examples/dropdown.py
index f5c53bb4bb..6f00c3d99f 100644
--- a/arcade/gui/examples/dropdown.py
+++ b/arcade/gui/examples/dropdown.py
@@ -7,6 +7,8 @@
If arcade and Python are properly installed, you can run this example with:
python -m arcade.gui.examples.dropdown
"""
+from __future__ import annotations
+
import arcade
from arcade.gui import UIManager, UILabel, UIOnChangeEvent
from arcade.gui.widgets.dropdown import UIDropdown
diff --git a/arcade/gui/examples/grid_layout.py b/arcade/gui/examples/grid_layout.py
index 6766cc365a..780d46e70c 100644
--- a/arcade/gui/examples/grid_layout.py
+++ b/arcade/gui/examples/grid_layout.py
@@ -8,6 +8,8 @@
If arcade and Python are properly installed, you can run this example with:
python -m arcade.gui.examples.grid_layout
"""
+from __future__ import annotations
+
import arcade
from arcade.gui import UIManager
from arcade.gui.widgets import UIDummy
diff --git a/arcade/gui/examples/hidden_password.py b/arcade/gui/examples/hidden_password.py
index f92710281d..f2de77ce4f 100644
--- a/arcade/gui/examples/hidden_password.py
+++ b/arcade/gui/examples/hidden_password.py
@@ -8,6 +8,8 @@
If arcade and Python are properly installed, you can run this example with:
python -m arcade.gui.examples.hidden_password
"""
+from __future__ import annotations
+
from typing import Optional
import arcade
diff --git a/arcade/gui/examples/ninepatch.py b/arcade/gui/examples/ninepatch.py
index 2e96c70f36..e8b691bf44 100644
--- a/arcade/gui/examples/ninepatch.py
+++ b/arcade/gui/examples/ninepatch.py
@@ -9,6 +9,8 @@
If arcade and Python are properly installed, you can run this example with:
python -m arcade.gui.examples.ninepatch
"""
+from __future__ import annotations
+
import arcade
from arcade import load_texture
from arcade.gui import UIManager, UIAnchorLayout, UIWidget, NinePatchTexture
diff --git a/arcade/gui/examples/scroll_area.py b/arcade/gui/examples/scroll_area.py
index 24936d6343..a8e204dbcd 100644
--- a/arcade/gui/examples/scroll_area.py
+++ b/arcade/gui/examples/scroll_area.py
@@ -14,6 +14,8 @@
If arcade and Python are properly installed, you can run this example with:
python -m arcade.gui.examples.scroll_area
"""
+from __future__ import annotations
+
from typing import Iterable, Optional
from pyglet.event import EVENT_UNHANDLED
diff --git a/arcade/gui/examples/side_bars_with_box_layout.py b/arcade/gui/examples/side_bars_with_box_layout.py
index ed648304d8..bc265757c7 100644
--- a/arcade/gui/examples/side_bars_with_box_layout.py
+++ b/arcade/gui/examples/side_bars_with_box_layout.py
@@ -12,6 +12,8 @@
If arcade and Python are properly installed, you can run this example with:
python -m arcade.gui.examples.side_bars_with_box_layout
"""
+from __future__ import annotations
+
import arcade
from arcade.gui import UIManager, UIDummy, UIBoxLayout
diff --git a/arcade/gui/examples/size_hints.py b/arcade/gui/examples/size_hints.py
index 16a4952086..42fbdbb959 100644
--- a/arcade/gui/examples/size_hints.py
+++ b/arcade/gui/examples/size_hints.py
@@ -17,6 +17,8 @@
If arcade and Python are properly installed, you can run this example with:
python -m arcade.gui.examples.size_hints
"""
+from __future__ import annotations
+
import arcade
from arcade.gui import UIManager, UIBoxLayout
from arcade.gui.widgets import UIDummy
diff --git a/arcade/gui/examples/stats_topleft.py b/arcade/gui/examples/stats_topleft.py
index 7631da4c59..7ec58762ad 100644
--- a/arcade/gui/examples/stats_topleft.py
+++ b/arcade/gui/examples/stats_topleft.py
@@ -9,6 +9,8 @@
If arcade and Python are properly installed, you can run this example with:
python -m arcade.gui.examples.stats_topleft
"""
+from __future__ import annotations
+
import arcade
from arcade.gui import UIManager, UILabel, UIBoxLayout
from arcade.gui.widgets.layout import UIAnchorLayout
diff --git a/arcade/gui/examples/style_v2.py b/arcade/gui/examples/style_v2.py
index 125d5821b0..6d3b0a7a07 100644
--- a/arcade/gui/examples/style_v2.py
+++ b/arcade/gui/examples/style_v2.py
@@ -8,6 +8,8 @@
If arcade and Python are properly installed, you can run this example with:
python -m arcade.gui.examples.style_v2
"""
+from __future__ import annotations
+
from itertools import cycle
import arcade
diff --git a/arcade/gui/examples/textured_slider.py b/arcade/gui/examples/textured_slider.py
index b2246d956f..7f32144863 100644
--- a/arcade/gui/examples/textured_slider.py
+++ b/arcade/gui/examples/textured_slider.py
@@ -7,6 +7,8 @@
If arcade and Python are properly installed, you can run this example with:
python -m arcade.gui.examples.textured_slider
"""
+from __future__ import annotations
+
from typing import Union
import arcade
diff --git a/arcade/gui/examples/toggle.py b/arcade/gui/examples/toggle.py
index fbfaebe019..a0a451dc04 100644
--- a/arcade/gui/examples/toggle.py
+++ b/arcade/gui/examples/toggle.py
@@ -7,6 +7,8 @@
If arcade and Python are properly installed, you can run this example with:
python -m arcade.gui.examples.toggle
"""
+from __future__ import annotations
+
import arcade
from arcade import View, load_texture
from arcade.gui import UIManager, UIAnchorLayout
diff --git a/arcade/gui/examples/widget_gallery.py b/arcade/gui/examples/widget_gallery.py
index 2a9bccb687..58bc4680d2 100644
--- a/arcade/gui/examples/widget_gallery.py
+++ b/arcade/gui/examples/widget_gallery.py
@@ -6,6 +6,8 @@
If arcade and Python are properly installed, you can run this example with:
python -m arcade.gui.examples.widget_gallery
"""
+from __future__ import annotations
+
from textwrap import dedent
import arcade
diff --git a/arcade/gui/mixins.py b/arcade/gui/mixins.py
index e4c4cb5d27..68102e1fe2 100644
--- a/arcade/gui/mixins.py
+++ b/arcade/gui/mixins.py
@@ -1,3 +1,5 @@
+from __future__ import annotations
+
from typing import Optional
from pyglet.event import EVENT_HANDLED, EVENT_UNHANDLED
diff --git a/arcade/gui/nine_patch.py b/arcade/gui/nine_patch.py
index c6911aaab6..bd2328e90a 100644
--- a/arcade/gui/nine_patch.py
+++ b/arcade/gui/nine_patch.py
@@ -1,3 +1,5 @@
+from __future__ import annotations
+
from typing import Optional, Tuple
import arcade
diff --git a/arcade/gui/property.py b/arcade/gui/property.py
index bc4a84bfc5..ed04d4b8c1 100644
--- a/arcade/gui/property.py
+++ b/arcade/gui/property.py
@@ -1,3 +1,5 @@
+from __future__ import annotations
+
import sys
import traceback
from typing import Any, Callable, Generic, Optional, Set, TypeVar, cast
diff --git a/arcade/gui/style.py b/arcade/gui/style.py
index b2e6e554ca..67238103c1 100644
--- a/arcade/gui/style.py
+++ b/arcade/gui/style.py
@@ -1,3 +1,5 @@
+from __future__ import annotations
+
from abc import abstractmethod
from dataclasses import dataclass
from typing import Mapping, TypeVar, Generic
diff --git a/arcade/gui/surface.py b/arcade/gui/surface.py
index 52834a8bd7..19f69608f2 100644
--- a/arcade/gui/surface.py
+++ b/arcade/gui/surface.py
@@ -1,3 +1,5 @@
+from __future__ import annotations
+
from contextlib import contextmanager
from typing import Tuple, Union, Optional
diff --git a/arcade/gui/ui_manager.py b/arcade/gui/ui_manager.py
index 87bb8c5b38..1e210d5220 100644
--- a/arcade/gui/ui_manager.py
+++ b/arcade/gui/ui_manager.py
@@ -8,6 +8,8 @@
- Texts are now rendered with pyglet, open easier support for text areas with scrolling
- TextArea with scroll support
"""
+from __future__ import annotations
+
from collections import defaultdict
from typing import List, Dict, TypeVar, Iterable, Optional, Type, Union
from typing_extensions import TypeGuard
diff --git a/arcade/gui/widgets/__init__.py b/arcade/gui/widgets/__init__.py
index ebfde7ef43..af821900bc 100644
--- a/arcade/gui/widgets/__init__.py
+++ b/arcade/gui/widgets/__init__.py
@@ -1,3 +1,5 @@
+from __future__ import annotations
+
from abc import ABC
from random import randint
from typing import (
diff --git a/arcade/gui/widgets/buttons.py b/arcade/gui/widgets/buttons.py
index db4ef6b349..a0d790df17 100644
--- a/arcade/gui/widgets/buttons.py
+++ b/arcade/gui/widgets/buttons.py
@@ -1,3 +1,5 @@
+from __future__ import annotations
+
from dataclasses import dataclass
from typing import Optional, Dict, Union
diff --git a/arcade/gui/widgets/dropdown.py b/arcade/gui/widgets/dropdown.py
index c919064820..a4ad4b885a 100644
--- a/arcade/gui/widgets/dropdown.py
+++ b/arcade/gui/widgets/dropdown.py
@@ -1,3 +1,5 @@
+from __future__ import annotations
+
from copy import deepcopy
from typing import Optional, List, Union
diff --git a/arcade/gui/widgets/image.py b/arcade/gui/widgets/image.py
index fc26df7221..cb2a8b2978 100644
--- a/arcade/gui/widgets/image.py
+++ b/arcade/gui/widgets/image.py
@@ -1,3 +1,5 @@
+from __future__ import annotations
+
from typing import Union
from arcade import Texture
diff --git a/arcade/gui/widgets/layout.py b/arcade/gui/widgets/layout.py
index 135106901a..df32a91053 100644
--- a/arcade/gui/widgets/layout.py
+++ b/arcade/gui/widgets/layout.py
@@ -1,3 +1,5 @@
+from __future__ import annotations
+
from typing import Iterable, List, TypeVar, Tuple, Optional, cast
from arcade.gui.property import bind
diff --git a/arcade/gui/widgets/slider.py b/arcade/gui/widgets/slider.py
index ff3b0f8e6b..e2acdb972d 100644
--- a/arcade/gui/widgets/slider.py
+++ b/arcade/gui/widgets/slider.py
@@ -1,3 +1,5 @@
+from __future__ import annotations
+
from dataclasses import dataclass
from typing import Optional, Tuple, Union, Mapping
diff --git a/arcade/gui/widgets/text.py b/arcade/gui/widgets/text.py
index 90077bd291..41315248b7 100644
--- a/arcade/gui/widgets/text.py
+++ b/arcade/gui/widgets/text.py
@@ -1,3 +1,5 @@
+from __future__ import annotations
+
from typing import Optional
import pyglet
diff --git a/arcade/gui/widgets/toggle.py b/arcade/gui/widgets/toggle.py
index 331351da34..b8ac6aee7e 100644
--- a/arcade/gui/widgets/toggle.py
+++ b/arcade/gui/widgets/toggle.py
@@ -1,3 +1,5 @@
+from __future__ import annotations
+
from typing import Optional
from PIL import ImageEnhance
diff --git a/arcade/hitbox/__init__.py b/arcade/hitbox/__init__.py
index 5bc884d1f8..fb34a27fda 100644
--- a/arcade/hitbox/__init__.py
+++ b/arcade/hitbox/__init__.py
@@ -1,3 +1,5 @@
+from __future__ import annotations
+
from PIL.Image import Image
from arcade.types import PointList
diff --git a/arcade/hitbox/base.py b/arcade/hitbox/base.py
index c0543aba69..5a9c9f0cc1 100644
--- a/arcade/hitbox/base.py
+++ b/arcade/hitbox/base.py
@@ -1,5 +1,7 @@
from __future__ import annotations
+from __future__ import annotations
+
from math import cos, radians, sin
from typing import Any, Sequence, Tuple
from typing_extensions import Self
diff --git a/arcade/hitbox/bounding_box.py b/arcade/hitbox/bounding_box.py
index c6eb79e1f0..923f8ab4a3 100644
--- a/arcade/hitbox/bounding_box.py
+++ b/arcade/hitbox/bounding_box.py
@@ -1,3 +1,5 @@
+from __future__ import annotations
+
from PIL.Image import Image
from arcade.types import PointList
from .base import HitBoxAlgorithm
diff --git a/arcade/hitbox/pymunk.py b/arcade/hitbox/pymunk.py
index 7cac1c1b8c..2a5a4cc8e1 100644
--- a/arcade/hitbox/pymunk.py
+++ b/arcade/hitbox/pymunk.py
@@ -1,3 +1,5 @@
+from __future__ import annotations
+
from typing import List, Optional
from PIL.Image import Image
import pymunk
diff --git a/arcade/hitbox/simple.py b/arcade/hitbox/simple.py
index fb4886e0be..5eff90e84a 100644
--- a/arcade/hitbox/simple.py
+++ b/arcade/hitbox/simple.py
@@ -1,3 +1,5 @@
+from __future__ import annotations
+
from typing import Tuple
from PIL.Image import Image
from arcade.types import Point, PointList
diff --git a/arcade/isometric.py b/arcade/isometric.py
index 2b7c889d26..a321421763 100644
--- a/arcade/isometric.py
+++ b/arcade/isometric.py
@@ -1,3 +1,5 @@
+from __future__ import annotations
+
from arcade.shape_list import ShapeElementList, create_line
from typing import Tuple
from arcade.types import RGBA255
diff --git a/arcade/joysticks.py b/arcade/joysticks.py
index 9e3878a500..c6adafbe59 100644
--- a/arcade/joysticks.py
+++ b/arcade/joysticks.py
@@ -1,3 +1,5 @@
+from __future__ import annotations
+
import pyglet.input
from typing import List
from pyglet.input import Joystick
diff --git a/arcade/key/__init__.py b/arcade/key/__init__.py
index fe0cb2f8f4..44b202dd90 100644
--- a/arcade/key/__init__.py
+++ b/arcade/key/__init__.py
@@ -3,6 +3,8 @@
Constants used to signify what keys on the keyboard were pressed.
"""
+from __future__ import annotations
+
# Key modifiers
# Done in powers of two, so you can do a bit-wise 'and' to detect
# multiple modifiers.
diff --git a/arcade/management/__init__.py b/arcade/management/__init__.py
index e5c35be65e..2619ece850 100644
--- a/arcade/management/__init__.py
+++ b/arcade/management/__init__.py
@@ -1,3 +1,5 @@
+from __future__ import annotations
+
from pathlib import Path
import shutil
import sys
diff --git a/arcade/math.py b/arcade/math.py
index cd9d7cd903..42f727b96c 100644
--- a/arcade/math.py
+++ b/arcade/math.py
@@ -1,3 +1,5 @@
+from __future__ import annotations
+
import math
import random
from arcade.types import Point, Vector
diff --git a/arcade/particles/__init__.py b/arcade/particles/__init__.py
index 609ab39535..d1121372c5 100644
--- a/arcade/particles/__init__.py
+++ b/arcade/particles/__init__.py
@@ -1,3 +1,5 @@
+from __future__ import annotations
+
from .particle import (
Particle,
EternalParticle,
diff --git a/arcade/particles/emitter.py b/arcade/particles/emitter.py
index 6ee62304bb..d98501854d 100644
--- a/arcade/particles/emitter.py
+++ b/arcade/particles/emitter.py
@@ -2,6 +2,8 @@
Emitter - Invisible object that determines when Particles are emitted, actually emits them, and manages them
over their lifetime
"""
+from __future__ import annotations
+
import arcade
from .particle import Particle
from typing import Optional, Callable, cast
diff --git a/arcade/particles/emitter_simple.py b/arcade/particles/emitter_simple.py
index c9e0d91618..79e8515478 100644
--- a/arcade/particles/emitter_simple.py
+++ b/arcade/particles/emitter_simple.py
@@ -3,6 +3,8 @@
These trade away some flexibility in favor of simplicity to allow beginners to start using particle systems.
"""
+from __future__ import annotations
+
import random
from typing import Sequence, Type
diff --git a/arcade/particles/particle.py b/arcade/particles/particle.py
index 921cebde73..9d352f0830 100644
--- a/arcade/particles/particle.py
+++ b/arcade/particles/particle.py
@@ -1,6 +1,8 @@
"""
Particle - Object produced by an Emitter. Often used in large quantity to produce visual effects effects
"""
+from __future__ import annotations
+
from arcade.sprite import Sprite
from arcade.math import lerp, clamp
from arcade.types import Point, Vector
diff --git a/arcade/paths.py b/arcade/paths.py
index 6acd349878..64ba1829bb 100644
--- a/arcade/paths.py
+++ b/arcade/paths.py
@@ -1,6 +1,8 @@
"""
Classic A-star algorithm for path finding.
"""
+from __future__ import annotations
+
import math
from typing import (
cast,
diff --git a/arcade/perf_graph.py b/arcade/perf_graph.py
index b64cb1a4e0..440ac5c010 100644
--- a/arcade/perf_graph.py
+++ b/arcade/perf_graph.py
@@ -1,3 +1,5 @@
+from __future__ import annotations
+
import random
from typing import List
diff --git a/arcade/perf_info.py b/arcade/perf_info.py
index 27b8d95630..d9dc1372a7 100644
--- a/arcade/perf_info.py
+++ b/arcade/perf_info.py
@@ -1,6 +1,8 @@
"""
Utility functions to keep performance information
"""
+from __future__ import annotations
+
import collections
from typing import Dict
diff --git a/arcade/physics_engines.py b/arcade/physics_engines.py
index fa300fa006..13ad84fb6a 100644
--- a/arcade/physics_engines.py
+++ b/arcade/physics_engines.py
@@ -1,8 +1,9 @@
"""
Physics engines for top-down or platformers.
"""
-# pylint: disable=too-many-arguments, too-many-locals, too-few-public-methods
+from __future__ import annotations
+# pylint: disable=too-many-arguments, too-many-locals, too-few-public-methods
import math
from typing import Iterable, List, Optional, Union, cast
diff --git a/arcade/pymunk_physics_engine.py b/arcade/pymunk_physics_engine.py
index 8fad7433d5..dc12796278 100644
--- a/arcade/pymunk_physics_engine.py
+++ b/arcade/pymunk_physics_engine.py
@@ -1,6 +1,8 @@
"""
Pymunk Physics Engine
"""
+from __future__ import annotations
+
import logging
import math
from typing import Callable, Dict, List, Optional, Tuple, Union
diff --git a/arcade/resources/__init__.py b/arcade/resources/__init__.py
index 26a748af86..9c3e659467 100644
--- a/arcade/resources/__init__.py
+++ b/arcade/resources/__init__.py
@@ -1,3 +1,5 @@
+from __future__ import annotations
+
from pathlib import Path
from typing import Dict, List, Union
from arcade.utils import warning, ReplacementWarning
diff --git a/arcade/scene.py b/arcade/scene.py
index d84140da89..d36eb60ddc 100644
--- a/arcade/scene.py
+++ b/arcade/scene.py
@@ -10,6 +10,8 @@
* Control sprite list draw order within the group
"""
+from __future__ import annotations
+
from typing import Dict, List, Optional, Union, Iterable, Tuple
from arcade import Sprite, SpriteList
diff --git a/arcade/sections.py b/arcade/sections.py
index 3745736882..d3515f6db9 100644
--- a/arcade/sections.py
+++ b/arcade/sections.py
@@ -1,3 +1,5 @@
+from __future__ import annotations
+
from typing import TYPE_CHECKING, Optional, List, Iterable, Union, Set, Generator
import math
diff --git a/arcade/shape_list.py b/arcade/shape_list.py
index 8d0fcc1f45..2fab7f2373 100644
--- a/arcade/shape_list.py
+++ b/arcade/shape_list.py
@@ -5,6 +5,8 @@
but uses Vertex Buffer Objects. This keeps the vertices loaded on
the graphics card for much faster render times.
"""
+from __future__ import annotations
+
from array import array
from collections import OrderedDict
import itertools
diff --git a/arcade/sound.py b/arcade/sound.py
index 3cc2548c8e..03d2cf6fbf 100644
--- a/arcade/sound.py
+++ b/arcade/sound.py
@@ -2,6 +2,8 @@
Sound Library.
"""
+from __future__ import annotations
+
import math
import os
from pathlib import Path
diff --git a/arcade/sprite/__init__.py b/arcade/sprite/__init__.py
index ddbc7aa964..5a18af8045 100644
--- a/arcade/sprite/__init__.py
+++ b/arcade/sprite/__init__.py
@@ -1,3 +1,5 @@
+from __future__ import annotations
+
import PIL.Image
from arcade.texture import Texture
diff --git a/arcade/sprite/animated.py b/arcade/sprite/animated.py
index 5eec30df24..40ba2b2a92 100644
--- a/arcade/sprite/animated.py
+++ b/arcade/sprite/animated.py
@@ -1,3 +1,5 @@
+from __future__ import annotations
+
import dataclasses
import math
from typing import List
diff --git a/arcade/sprite/base.py b/arcade/sprite/base.py
index ecbda85f53..df3856de7b 100644
--- a/arcade/sprite/base.py
+++ b/arcade/sprite/base.py
@@ -1,3 +1,5 @@
+from __future__ import annotations
+
from typing import TYPE_CHECKING, Iterable, List, TypeVar
import arcade
diff --git a/arcade/sprite/colored.py b/arcade/sprite/colored.py
index c829e23cd9..25ff50fa3d 100644
--- a/arcade/sprite/colored.py
+++ b/arcade/sprite/colored.py
@@ -1,3 +1,5 @@
+from __future__ import annotations
+
import PIL
import PIL.Image
diff --git a/arcade/sprite/enums.py b/arcade/sprite/enums.py
index 3239c9af73..15c5bbb91d 100644
--- a/arcade/sprite/enums.py
+++ b/arcade/sprite/enums.py
@@ -1,3 +1,5 @@
+from __future__ import annotations
+
FACE_RIGHT = 1
FACE_LEFT = 2
FACE_UP = 3
diff --git a/arcade/sprite/mixins.py b/arcade/sprite/mixins.py
index 7277afbe66..a6366ba2dd 100644
--- a/arcade/sprite/mixins.py
+++ b/arcade/sprite/mixins.py
@@ -1,5 +1,8 @@
+from __future__ import annotations
+
+
class PyMunk:
"""Object used to hold pymunk info for a sprite."""
__slots__ = (
diff --git a/arcade/sprite/simple.py b/arcade/sprite/simple.py
index 984b8fd1de..0d21a60979 100644
--- a/arcade/sprite/simple.py
+++ b/arcade/sprite/simple.py
@@ -1,5 +1,7 @@
# from .base import BasicSprite
+from __future__ import annotations
+
# class SimpleSprite(BasicSprite):
# pass
diff --git a/arcade/sprite/sprite.py b/arcade/sprite/sprite.py
index 7a62d7f3d2..3089fcecae 100644
--- a/arcade/sprite/sprite.py
+++ b/arcade/sprite/sprite.py
@@ -1,3 +1,5 @@
+from __future__ import annotations
+
import math
from pathlib import Path
from typing import TYPE_CHECKING, Any, Dict, List, Optional, Union
diff --git a/arcade/sprite_list/__init__.py b/arcade/sprite_list/__init__.py
index 465fe90ddf..fa5857699f 100644
--- a/arcade/sprite_list/__init__.py
+++ b/arcade/sprite_list/__init__.py
@@ -1,3 +1,5 @@
+from __future__ import annotations
+
from .sprite_list import SpriteList
from .spatial_hash import SpatialHash
from .collision import (
diff --git a/arcade/sprite_list/collision.py b/arcade/sprite_list/collision.py
index 322e0ca540..585ee70b94 100644
--- a/arcade/sprite_list/collision.py
+++ b/arcade/sprite_list/collision.py
@@ -1,3 +1,5 @@
+from __future__ import annotations
+
import struct
from typing import (
Iterable,
diff --git a/arcade/sprite_list/spatial_hash.py b/arcade/sprite_list/spatial_hash.py
index 14ce082a6f..55e30b4dd9 100644
--- a/arcade/sprite_list/spatial_hash.py
+++ b/arcade/sprite_list/spatial_hash.py
@@ -1,3 +1,5 @@
+from __future__ import annotations
+
from math import trunc
from typing import (
List,
diff --git a/arcade/sprite_list/sprite_list.py b/arcade/sprite_list/sprite_list.py
index af33e53c4a..cb1b15d38a 100644
--- a/arcade/sprite_list/sprite_list.py
+++ b/arcade/sprite_list/sprite_list.py
@@ -5,6 +5,8 @@
individual sprites.
"""
+from __future__ import annotations
+
import logging
import random
from array import array
diff --git a/arcade/text.py b/arcade/text.py
index 0e2acfd38b..8a5ef12bd0 100644
--- a/arcade/text.py
+++ b/arcade/text.py
@@ -1,6 +1,8 @@
"""
Drawing text with pyglet label
"""
+from __future__ import annotations
+
from pathlib import Path
from typing import Any, Optional, Tuple, Union
diff --git a/arcade/texture/__init__.py b/arcade/texture/__init__.py
index 8e5b40e4d0..1dd6eebb7b 100644
--- a/arcade/texture/__init__.py
+++ b/arcade/texture/__init__.py
@@ -1,3 +1,5 @@
+from __future__ import annotations
+
from .texture import Texture, ImageData
from .loading import (
load_texture,
diff --git a/arcade/texture/generate.py b/arcade/texture/generate.py
index 15fb969559..61a273d8d2 100644
--- a/arcade/texture/generate.py
+++ b/arcade/texture/generate.py
@@ -1,3 +1,5 @@
+from __future__ import annotations
+
import logging
from typing import Optional
diff --git a/arcade/texture/loading.py b/arcade/texture/loading.py
index ab9df3e064..f6e6eb6aa7 100644
--- a/arcade/texture/loading.py
+++ b/arcade/texture/loading.py
@@ -1,3 +1,5 @@
+from __future__ import annotations
+
import logging
from typing import Optional, List, Union, Tuple
from pathlib import Path
diff --git a/arcade/texture/texture.py b/arcade/texture/texture.py
index 970effdc7f..40a69373f9 100644
--- a/arcade/texture/texture.py
+++ b/arcade/texture/texture.py
@@ -1,3 +1,5 @@
+from __future__ import annotations
+
import hashlib
import logging
from pathlib import Path
diff --git a/arcade/texture/tools.py b/arcade/texture/tools.py
index 1ad7ca67a8..572e6b7302 100644
--- a/arcade/texture/tools.py
+++ b/arcade/texture/tools.py
@@ -1,3 +1,5 @@
+from __future__ import annotations
+
from PIL import Image, ImageDraw
import arcade
import arcade.cache
diff --git a/arcade/texture/transforms.py b/arcade/texture/transforms.py
index d5c28675e9..bca27aa92a 100644
--- a/arcade/texture/transforms.py
+++ b/arcade/texture/transforms.py
@@ -5,6 +5,8 @@
We don't actually transform pixel data, we simply
transform the texture coordinates and hit box points.
"""
+from __future__ import annotations
+
from typing import Dict, Tuple
from enum import Enum
from arcade.math import rotate_point
diff --git a/arcade/texture_atlas/__init__.py b/arcade/texture_atlas/__init__.py
index 7fc1c07dcb..a87b593970 100644
--- a/arcade/texture_atlas/__init__.py
+++ b/arcade/texture_atlas/__init__.py
@@ -1,3 +1,5 @@
+from __future__ import annotations
+
from .base import TextureAtlas
from .helpers import save_atlas, load_atlas
diff --git a/arcade/texture_atlas/base.py b/arcade/texture_atlas/base.py
index 683219b459..b763553125 100644
--- a/arcade/texture_atlas/base.py
+++ b/arcade/texture_atlas/base.py
@@ -11,6 +11,8 @@
https://github.com/einarf/pyglet/blob/master/pyglet/image/atlas.py
"""
+from __future__ import annotations
+
import copy
import math
import time
@@ -45,8 +47,8 @@
if TYPE_CHECKING:
from arcade import ArcadeContext, Texture
- from arcade.texture import ImageData
from arcade.gl import Texture2D
+ from arcade.texture import ImageData
# The amount of pixels we increase the atlas when scanning for a reasonable size.
# It must divide. Must be a power of two number like 64, 256, 512 etx
diff --git a/arcade/texture_atlas/helpers.py b/arcade/texture_atlas/helpers.py
index 26fd5e9455..ecc51324f0 100644
--- a/arcade/texture_atlas/helpers.py
+++ b/arcade/texture_atlas/helpers.py
@@ -1,3 +1,5 @@
+from __future__ import annotations
+
import json
from pathlib import Path
from time import perf_counter
diff --git a/arcade/tilemap/__init__.py b/arcade/tilemap/__init__.py
index 069fe1a2bc..e11e648819 100644
--- a/arcade/tilemap/__init__.py
+++ b/arcade/tilemap/__init__.py
@@ -1,2 +1,4 @@
+from __future__ import annotations
+
from .tilemap import TileMap, load_tilemap, read_tmx # noqa
__all__ = ["TileMap", "load_tilemap", "read_tmx"]
diff --git a/arcade/tilemap/tilemap.py b/arcade/tilemap/tilemap.py
index d4762a243a..23955b59f4 100644
--- a/arcade/tilemap/tilemap.py
+++ b/arcade/tilemap/tilemap.py
@@ -7,6 +7,8 @@
For more info on pytiled-parser see: https://github.com/Beefy-Swain/pytiled_parser
"""
+from __future__ import annotations
+
import copy
import math
import os
diff --git a/arcade/types.py b/arcade/types.py
index e6be602db8..28f312d96b 100644
--- a/arcade/types.py
+++ b/arcade/types.py
@@ -3,6 +3,8 @@
"""
from __future__ import annotations
+from __future__ import annotations
+
from array import array
import ctypes
import random
diff --git a/arcade/utils.py b/arcade/utils.py
index a989eccb85..c1968ee534 100644
--- a/arcade/utils.py
+++ b/arcade/utils.py
@@ -4,6 +4,8 @@
IMPORTANT:
These should be standalone and not rely on any arcade imports
"""
+from __future__ import annotations
+
import functools
import platform
import sys
diff --git a/arcade/version.py b/arcade/version.py
index fa12b97d71..38253c84a4 100644
--- a/arcade/version.py
+++ b/arcade/version.py
@@ -17,6 +17,8 @@
ALSO note that this bumps the version AFTER the deploy.
So if we are at version 2.7.3.dev5 that's the version deploy. Bump will bump it to dev6.
"""
+from __future__ import annotations
+
import os
diff --git a/arcade/window_commands.py b/arcade/window_commands.py
index 55a399d49f..dfacc931c2 100644
--- a/arcade/window_commands.py
+++ b/arcade/window_commands.py
@@ -3,6 +3,8 @@
It also has commands for scheduling pauses and scheduling interval functions.
"""
+from __future__ import annotations
+
import gc
import time
import os
@@ -194,6 +196,7 @@ def run():
elif window.headless:
# We are entering headless more an will emulate an event loop
import time
+
# Ensure the initial delta time is not 0 to be
# more in line with how a normal window works.
delta_time = window._draw_rate
diff --git a/doc/_static/css/custom.css b/doc/_static/css/custom.css
index 01bb9816c4..38ea33d70c 100644
--- a/doc/_static/css/custom.css
+++ b/doc/_static/css/custom.css
@@ -115,6 +115,11 @@ img.right-image {
width:100%;
height:100%;
}
+/* Make signatures look nice */
+.sig:not(.sig-inline) {
+ /* Highlight even when not hovering */
+ background: var(--color-api-background-hover);
+}
/* Make Function API look nice */
.sig-param .n:first-of-type {
margin-left: 10px;
diff --git a/doc/api_docs/arcade.rst b/doc/api_docs/arcade.rst
index 85a8c119d3..3ce4a8567f 100644
--- a/doc/api_docs/arcade.rst
+++ b/doc/api_docs/arcade.rst
@@ -1,7 +1,7 @@
.. _arcade-api:
-Arcade Package API
-==================
+API Reference
+=============
This page documents the Application Programming Interface (API)
for the Python Arcade library. See also:
@@ -35,7 +35,6 @@ for the Python Arcade library. See also:
api/window
api/sound
api/path_finding
- api/version
api/isometric
api/earclip
api/easing
@@ -47,7 +46,7 @@ for the Python Arcade library. See also:
.. toctree::
:maxdepth: 1
- :caption: Arcade GUI
+ :caption: GUI
api/gui
api/gui_widgets
@@ -57,16 +56,8 @@ for the Python Arcade library. See also:
.. toctree::
:maxdepth: 1
- :caption: Arcade Sub Modules
+ :caption: Constants
arcade.key
arcade.csscolor
arcade.color
-
-.. toctree::
- :maxdepth: 1
- :caption: Other Information
-
- resources
- keyboard
-
diff --git a/doc/api_docs/gl/index.rst b/doc/api_docs/gl/index.rst
index 59d73c5379..b4e95113ea 100644
--- a/doc/api_docs/gl/index.rst
+++ b/doc/api_docs/gl/index.rst
@@ -1,7 +1,7 @@
.. _arcade-api-gl:
-Arcade OpenGL API
-=================
+OpenGL
+======
This is the low level rendering API in Arcade and is used
internally for all drawing/rendering. It's a higher level
diff --git a/doc/conf.py b/doc/conf.py
index 39b6512dba..a2f981ef16 100644
--- a/doc/conf.py
+++ b/doc/conf.py
@@ -6,6 +6,9 @@
import runpy
import sys
import os
+import sphinx.ext.autodoc
+import sphinx.transforms
+import docutils.nodes
# --- Pre-processing Tasks
@@ -26,6 +29,13 @@
# }
autodoc_inherit_docstrings = False
+autodoc_default_options = {
+ 'members': True,
+ 'member-order': 'groupwise',
+ 'undoc-members': True,
+ 'show-inheritance': True
+}
+toc_object_entries_show_parents = 'hide'
sys.path.insert(0, os.path.abspath('..'))
sys.path.insert(0, os.path.abspath('../arcade'))
@@ -246,8 +256,37 @@ def post_process(_app, _exception):
# traceback.print_exc()
# raise
+def on_autodoc_process_bases(app, name, obj, options, bases):
+ # Strip `object` from bases, it's just noise
+ bases[:] = [base for base in bases if base is not object]
+
+class ClassDocumenter(sphinx.ext.autodoc.ClassDocumenter):
+ def add_directive_header(self, sig: str) -> None:
+ r = super().add_directive_header(sig)
+ # Strip empty `Bases: `, will be empty when only superclass is `object`
+ # cuz we remove it earlier
+ strings = self.directive.result
+ if strings[-1] == ' Bases: ':
+ strings.pop()
+ return r
+
+class Transform(sphinx.transforms.SphinxTransform):
+ default_priority = 800
+ def apply(self):
+ self.document.walk(Visitor(self.document))
+class Visitor(docutils.nodes.SparseNodeVisitor):
+ def visit_desc_annotation(self, node):
+ # Remove `property` prefix from properties so they look the same as
+ # attributes
+ if 'property' in node.astext():
+ node.parent.remove(node)
+
+
def setup(app):
app.add_css_file("css/custom.css")
+ app.add_autodocumenter(ClassDocumenter)
app.connect('source-read', source_read)
app.connect('build-finished', post_process)
app.connect("autodoc-process-docstring", warn_undocumented_members)
+ app.connect('autodoc-process-bases', on_autodoc_process_bases)
+ app.add_transform(Transform)
diff --git a/doc/contributing_guide/how_to_contribute.rst b/doc/contributing_guide/how_to_contribute.rst
index a76501b65e..59ede58b81 100644
--- a/doc/contributing_guide/how_to_contribute.rst
+++ b/doc/contributing_guide/how_to_contribute.rst
@@ -1,7 +1,7 @@
.. _how-to-contribute:
-How to Contribute
-=================
+Ways to Contribute
+==================
We would love to have you contribute to the project! There are several
ways that you can do so.
diff --git a/doc/contributing_guide/index.rst b/doc/contributing_guide/index.rst
index e9b76d5e4f..5c9a941bf4 100644
--- a/doc/contributing_guide/index.rst
+++ b/doc/contributing_guide/index.rst
@@ -2,20 +2,3 @@
.. _cg_index_quickstart:
.. include:: ../../CONTRIBUTING.rst
-
-.. _cg_index_contents:
-
-Contributing Guide Contents
----------------------------
-
-The sections linked below provide more in-depth coverage of various topics
-contributing to arcade, including links to outside resources on development tools
-and practices.
-
-.. toctree::
- :maxdepth: 1
-
- directory_structure
- how_to_contribute
- how_to_submit_changes
- release_checklist
diff --git a/doc/programming_guide/get_started.rst b/doc/get_started/get_started.rst
similarity index 98%
rename from doc/programming_guide/get_started.rst
rename to doc/get_started/get_started.rst
index 034d4daefa..ba05588765 100644
--- a/doc/programming_guide/get_started.rst
+++ b/doc/get_started/get_started.rst
@@ -1,7 +1,7 @@
.. _get-started-here:
-Get Started Here
-================
+Start Here
+==========
.. image:: images/treasure-map.svg
:width: 40%
@@ -21,8 +21,8 @@ Getting Help
If you get stuck, you can always ask for help! See the page on
:ref:`how-to-get-help` for more information.
-Starting Tutorials
-------------------
+Tutorials
+---------
If you are already familiar with basic Python programming, follow the
:ref:`platformer_tutorial` as a quick way to get up and running.
diff --git a/doc/programming_guide/how_to_get_help.rst b/doc/get_started/how_to_get_help.rst
similarity index 100%
rename from doc/programming_guide/how_to_get_help.rst
rename to doc/get_started/how_to_get_help.rst
diff --git a/doc/programming_guide/images/discord_code_entry_desktop.png b/doc/get_started/images/discord_code_entry_desktop.png
similarity index 100%
rename from doc/programming_guide/images/discord_code_entry_desktop.png
rename to doc/get_started/images/discord_code_entry_desktop.png
diff --git a/doc/programming_guide/images/discord_help_channels.png b/doc/get_started/images/discord_help_channels.png
similarity index 100%
rename from doc/programming_guide/images/discord_help_channels.png
rename to doc/get_started/images/discord_help_channels.png
diff --git a/doc/programming_guide/images/discord_help_example.png b/doc/get_started/images/discord_help_example.png
similarity index 100%
rename from doc/programming_guide/images/discord_help_example.png
rename to doc/get_started/images/discord_help_example.png
diff --git a/doc/programming_guide/images/treasure-map.svg b/doc/get_started/images/treasure-map.svg
similarity index 100%
rename from doc/programming_guide/images/treasure-map.svg
rename to doc/get_started/images/treasure-map.svg
diff --git a/doc/programming_guide/images/tree.svg b/doc/get_started/images/tree.svg
similarity index 100%
rename from doc/programming_guide/images/tree.svg
rename to doc/get_started/images/tree.svg
diff --git a/doc/programming_guide/install/images/click_gear.png b/doc/get_started/install/images/click_gear.png
similarity index 100%
rename from doc/programming_guide/install/images/click_gear.png
rename to doc/get_started/install/images/click_gear.png
diff --git a/doc/programming_guide/install/images/file_settings.png b/doc/get_started/install/images/file_settings.png
similarity index 100%
rename from doc/programming_guide/install/images/file_settings.png
rename to doc/get_started/install/images/file_settings.png
diff --git a/doc/programming_guide/install/images/mac1.png b/doc/get_started/install/images/mac1.png
similarity index 100%
rename from doc/programming_guide/install/images/mac1.png
rename to doc/get_started/install/images/mac1.png
diff --git a/doc/programming_guide/install/images/mac2.png b/doc/get_started/install/images/mac2.png
similarity index 100%
rename from doc/programming_guide/install/images/mac2.png
rename to doc/get_started/install/images/mac2.png
diff --git a/doc/programming_guide/install/images/mac3.png b/doc/get_started/install/images/mac3.png
similarity index 100%
rename from doc/programming_guide/install/images/mac3.png
rename to doc/get_started/install/images/mac3.png
diff --git a/doc/programming_guide/install/images/mac4.png b/doc/get_started/install/images/mac4.png
similarity index 100%
rename from doc/programming_guide/install/images/mac4.png
rename to doc/get_started/install/images/mac4.png
diff --git a/doc/programming_guide/install/images/mac5.png b/doc/get_started/install/images/mac5.png
similarity index 100%
rename from doc/programming_guide/install/images/mac5.png
rename to doc/get_started/install/images/mac5.png
diff --git a/doc/programming_guide/install/images/mac6.png b/doc/get_started/install/images/mac6.png
similarity index 100%
rename from doc/programming_guide/install/images/mac6.png
rename to doc/get_started/install/images/mac6.png
diff --git a/doc/programming_guide/install/images/name_venv.png b/doc/get_started/install/images/name_venv.png
similarity index 100%
rename from doc/programming_guide/install/images/name_venv.png
rename to doc/get_started/install/images/name_venv.png
diff --git a/doc/programming_guide/install/images/pip_install_arcade_windows.png b/doc/get_started/install/images/pip_install_arcade_windows.png
similarity index 100%
rename from doc/programming_guide/install/images/pip_install_arcade_windows.png
rename to doc/get_started/install/images/pip_install_arcade_windows.png
diff --git a/doc/programming_guide/install/images/pycharm_mac_select_python.png b/doc/get_started/install/images/pycharm_mac_select_python.png
similarity index 100%
rename from doc/programming_guide/install/images/pycharm_mac_select_python.png
rename to doc/get_started/install/images/pycharm_mac_select_python.png
diff --git a/doc/programming_guide/install/images/requirements.png b/doc/get_started/install/images/requirements.png
similarity index 100%
rename from doc/programming_guide/install/images/requirements.png
rename to doc/get_started/install/images/requirements.png
diff --git a/doc/programming_guide/install/images/setup_windows_1.png b/doc/get_started/install/images/setup_windows_1.png
similarity index 100%
rename from doc/programming_guide/install/images/setup_windows_1.png
rename to doc/get_started/install/images/setup_windows_1.png
diff --git a/doc/programming_guide/install/images/setup_windows_2.png b/doc/get_started/install/images/setup_windows_2.png
similarity index 100%
rename from doc/programming_guide/install/images/setup_windows_2.png
rename to doc/get_started/install/images/setup_windows_2.png
diff --git a/doc/programming_guide/install/images/setup_windows_3.png b/doc/get_started/install/images/setup_windows_3.png
similarity index 100%
rename from doc/programming_guide/install/images/setup_windows_3.png
rename to doc/get_started/install/images/setup_windows_3.png
diff --git a/doc/programming_guide/install/images/setup_windows_4.png b/doc/get_started/install/images/setup_windows_4.png
similarity index 100%
rename from doc/programming_guide/install/images/setup_windows_4.png
rename to doc/get_started/install/images/setup_windows_4.png
diff --git a/doc/programming_guide/install/images/setup_windows_5.png b/doc/get_started/install/images/setup_windows_5.png
similarity index 100%
rename from doc/programming_guide/install/images/setup_windows_5.png
rename to doc/get_started/install/images/setup_windows_5.png
diff --git a/doc/programming_guide/install/images/venv_setup_1.png b/doc/get_started/install/images/venv_setup_1.png
similarity index 100%
rename from doc/programming_guide/install/images/venv_setup_1.png
rename to doc/get_started/install/images/venv_setup_1.png
diff --git a/doc/programming_guide/install/images/venv_setup_2.png b/doc/get_started/install/images/venv_setup_2.png
similarity index 100%
rename from doc/programming_guide/install/images/venv_setup_2.png
rename to doc/get_started/install/images/venv_setup_2.png
diff --git a/doc/programming_guide/install/images/venv_setup_3.png b/doc/get_started/install/images/venv_setup_3.png
similarity index 100%
rename from doc/programming_guide/install/images/venv_setup_3.png
rename to doc/get_started/install/images/venv_setup_3.png
diff --git a/doc/programming_guide/install/images/venv_setup_4.png b/doc/get_started/install/images/venv_setup_4.png
similarity index 100%
rename from doc/programming_guide/install/images/venv_setup_4.png
rename to doc/get_started/install/images/venv_setup_4.png
diff --git a/doc/programming_guide/install/index.rst b/doc/get_started/install/index.rst
similarity index 84%
rename from doc/programming_guide/install/index.rst
rename to doc/get_started/install/index.rst
index 4e489ffb79..0f62152c4b 100644
--- a/doc/programming_guide/install/index.rst
+++ b/doc/get_started/install/index.rst
@@ -1,7 +1,7 @@
.. _installation-instructions:
-Installation Instructions
-=========================
+Installation
+============
Arcade runs on Windows, Mac OS X, and Linux.
@@ -12,10 +12,10 @@ Select the instructions for your platform:
.. toctree::
:maxdepth: 1
- pycharm
windows
mac
linux
source
+ pycharm
obsolete
diff --git a/doc/programming_guide/install/linux.rst b/doc/get_started/install/linux.rst
similarity index 100%
rename from doc/programming_guide/install/linux.rst
rename to doc/get_started/install/linux.rst
diff --git a/doc/programming_guide/install/mac.rst b/doc/get_started/install/mac.rst
similarity index 96%
rename from doc/programming_guide/install/mac.rst
rename to doc/get_started/install/mac.rst
index 83951ea1cb..f6e964c6e8 100644
--- a/doc/programming_guide/install/mac.rst
+++ b/doc/get_started/install/mac.rst
@@ -1,5 +1,5 @@
-Installation on the Mac
-=======================
+Installation on Mac
+===================
Go to the `Python website
Quick Arcade Library Introduction Video
\ No newline at end of file diff --git a/doc/index.rst b/doc/index.rst index 5ddf32ab15..b6280d0d3a 100644 --- a/doc/index.rst +++ b/doc/index.rst @@ -9,9 +9,20 @@ The Python Arcade Library ========================= +.. + Wrapped in raw html to avoid repeating twice in the PDF, since this blurb is + repeated in `get_started/introduction.rst` +.. raw:: html + ++ Arcade is an easy-to-learn Python library for creating 2D video games. It is + ideal for people learning to program, or developers that want to code a 2D + game without learning a complex framework. +
+ .. |Go| image:: images/woman_sprinter.svg :width: 48 - :alt: Get started here + :alt: Start Here :target: get_started.html .. raw:: html @@ -21,8 +32,8 @@ The Python Arcade Library