|
1 | 1 | from __future__ import annotations |
2 | 2 |
|
| 3 | +from collections.abc import Generator |
3 | 4 | from contextlib import contextmanager |
4 | 5 | from math import atan2, cos, degrees, radians, sin |
5 | | -from typing import TYPE_CHECKING, Generator |
| 6 | +from typing import TYPE_CHECKING |
6 | 7 |
|
7 | 8 | from pyglet.math import Vec2, Vec3 |
8 | 9 | from typing_extensions import Self |
@@ -223,12 +224,12 @@ def from_camera_data( |
223 | 224 | left, right = projection_data.left, projection_data.right |
224 | 225 | if projection_data.left == projection_data.right: |
225 | 226 | raise ZeroProjectionDimension( |
226 | | - (f"projection width is 0 due to equal {left=}and {right=} values") |
| 227 | + f"projection width is 0 due to equal {left=}and {right=} values" |
227 | 228 | ) |
228 | 229 | bottom, top = projection_data.bottom, projection_data.top |
229 | 230 | if bottom == top: |
230 | 231 | raise ZeroProjectionDimension( |
231 | | - (f"projection height is 0 due to equal {bottom=}and {top=}") |
| 232 | + f"projection height is 0 due to equal {bottom=}and {top=}" |
232 | 233 | ) |
233 | 234 | near, far = projection_data.near, projection_data.far |
234 | 235 | if near == far: |
@@ -583,7 +584,7 @@ def projection(self) -> Rect: |
583 | 584 | def projection(self, value: Rect) -> None: |
584 | 585 | # Unpack and validate |
585 | 586 | if not value: |
586 | | - raise ZeroProjectionDimension((f"Projection area is 0, {value.lrbt}")) |
| 587 | + raise ZeroProjectionDimension(f"Projection area is 0, {value.lrbt}") |
587 | 588 |
|
588 | 589 | _z = self._camera_data.zoom |
589 | 590 |
|
|
0 commit comments