Skip to content

Commit b53dd61

Browse files
committed
lint some more
1 parent 5af8e74 commit b53dd61

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

PathPlanning/TimeBasedPathPlanning/GridWithDynamicObstacles.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
import numpy as np
22
import matplotlib.pyplot as plt
33
from enum import Enum
4-
from typing import Tuple, TypeAlias
54

6-
Numpy3DArray: TypeAlias = np.ndarray[Tuple[int, int, int], np.dtype[np.int_]]
5+
type Numpy3DArray = np.ndarray[tuple[int, int, int], np.dtype[np.int_]]
76

87
class Position:
98
x: int

PathPlanning/TimeBasedPathPlanning/SpaceTimeAStar.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
from collections.abc import Generator
1717
import random
1818
from functools import total_ordering
19-
from typing import Optional
2019

2120
# Seed randomness for reproducibility
2221
RANDOM_SEED = 50
@@ -46,7 +45,7 @@ def __lt__(self, other: object):
4645
if not isinstance(other, Node):
4746
return NotImplementedError(f"Cannot compare Node with object of type: {type(other)}")
4847
return (self.time + self.heuristic) < (other.time + other.heuristic)
49-
48+
5049
def __eq__(self, other: object):
5150
if not isinstance(other, Node):
5251
return NotImplementedError(f"Cannot compare Node with object of type: {type(other)}")
@@ -68,7 +67,7 @@ def __init__(self, path: list[Node]):
6867
"""
6968
Get the position of the path at a given time
7069
"""
71-
def get_position(self, time: int) -> Optional[Position]:
70+
def get_position(self, time: int) -> Position | None:
7271
return self.positions_at_time.get(time)
7372

7473
"""

0 commit comments

Comments
 (0)