Skip to content

doc_stack/docstring_misc #1859

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Aug 23, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
3 changes: 2 additions & 1 deletion arcade/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions arcade/__main__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
from __future__ import annotations

from arcade.management import show_info


Expand Down
2 changes: 2 additions & 0 deletions arcade/__pyinstaller/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
from __future__ import annotations

import os


Expand Down
2 changes: 2 additions & 0 deletions arcade/__pyinstaller/hook-arcade.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions arcade/application.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions arcade/background/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
from __future__ import annotations

from typing import Optional, Tuple

from PIL import Image
Expand Down
2 changes: 2 additions & 0 deletions arcade/background/background.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
from __future__ import annotations

from typing import Optional, Union, Tuple

from arcade.window_commands import get_window
Expand Down
2 changes: 2 additions & 0 deletions arcade/background/background_texture.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
from __future__ import annotations

from typing import Optional, List, Tuple

from PIL import Image
Expand Down
2 changes: 2 additions & 0 deletions arcade/background/groups.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
from __future__ import annotations

from typing import Optional, Union, List, Tuple

import arcade.gl as gl
Expand Down
2 changes: 2 additions & 0 deletions arcade/cache/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
from __future__ import annotations

from typing import Any, List
from .hit_box import HitBoxCache
from .texture import TextureCache
Expand Down
2 changes: 2 additions & 0 deletions arcade/cache/hit_box.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions arcade/cache/image_data.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
from __future__ import annotations

from typing import Dict, Optional, TYPE_CHECKING
from weakref import WeakValueDictionary

Expand Down
2 changes: 2 additions & 0 deletions arcade/cache/texture.py
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 2 additions & 0 deletions arcade/camera.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
"""
Camera class
"""
from __future__ import annotations

import math
from typing import TYPE_CHECKING, List, Optional, Tuple, Union

Expand Down
2 changes: 2 additions & 0 deletions arcade/color/__init__.py
Original file line number Diff line number Diff line change
@@ -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)
Expand Down
2 changes: 2 additions & 0 deletions arcade/context.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions arcade/controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -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__ = [
Expand Down
2 changes: 2 additions & 0 deletions arcade/csscolor/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 2 additions & 0 deletions arcade/draw_commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions arcade/drawing_support.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
Expand Down
2 changes: 2 additions & 0 deletions arcade/earclip.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 2 additions & 0 deletions arcade/easing.py
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 2 additions & 0 deletions arcade/examples/array_backed_grid.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions arcade/examples/array_backed_grid_buffered.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions arcade/examples/array_backed_grid_sprites_1.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions arcade/examples/array_backed_grid_sprites_2.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions arcade/examples/astar_pathfinding.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
python -m arcade.examples.astar_pathfinding
"""

from __future__ import annotations

import arcade
import random

Expand Down
2 changes: 2 additions & 0 deletions arcade/examples/asteroid_smasher.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
the command line with:
python -m arcade.examples.asteroid_smasher
"""
from __future__ import annotations

import random
import math
import arcade
Expand Down
2 changes: 2 additions & 0 deletions arcade/examples/background_blending.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
python -m arcade.examples.background_blending
"""

from __future__ import annotations

import arcade
import arcade.background as background

Expand Down
2 changes: 2 additions & 0 deletions arcade/examples/background_groups.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
python -m arcade.examples.background_groups
"""

from __future__ import annotations

import arcade
import arcade.background as background

Expand Down
2 changes: 2 additions & 0 deletions arcade/examples/background_parallax.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
python -m arcade.examples.background_parallax
"""

from __future__ import annotations

import arcade
import arcade.background as background

Expand Down
2 changes: 2 additions & 0 deletions arcade/examples/background_scrolling.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 2 additions & 0 deletions arcade/examples/background_stationary.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
python -m arcade.examples.background_stationary
"""

from __future__ import annotations

import arcade
import arcade.background as background

Expand Down
2 changes: 2 additions & 0 deletions arcade/examples/bloom_defender.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
python -m arcade.examples.bloom_defender
"""

from __future__ import annotations

import arcade
import random

Expand Down
2 changes: 2 additions & 0 deletions arcade/examples/bouncing_rectangle.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
python -m arcade.examples.bouncing_rectangle
"""

from __future__ import annotations

import arcade

# --- Set up the constants
Expand Down
2 changes: 2 additions & 0 deletions arcade/examples/camera_platform.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
python -m arcade.examples.camera_platform
"""

from __future__ import annotations

import time

import arcade
Expand Down
2 changes: 2 additions & 0 deletions arcade/examples/conway_alpha.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
typing:
python -m arcade.examples.conway_alpha
"""
from __future__ import annotations

import arcade
import random

Expand Down
2 changes: 2 additions & 0 deletions arcade/examples/drawing_primitives.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions arcade/examples/drawing_text.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions arcade/examples/drawing_text_objects.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions arcade/examples/drawing_text_objects_batch.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 2 additions & 0 deletions arcade/examples/dual_stick_shooter.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions arcade/examples/easing_example_1.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions arcade/examples/easing_example_2.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 2 additions & 0 deletions arcade/examples/follow_path.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
python -m arcade.examples.follow_path
"""

from __future__ import annotations

import arcade
import math

Expand Down
2 changes: 2 additions & 0 deletions arcade/examples/full_screen_example.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
python -m arcade.examples.full_screen_example
"""

from __future__ import annotations

import arcade

SPRITE_SCALING = 0.5
Expand Down
2 changes: 2 additions & 0 deletions arcade/examples/gl/3d_cube.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading