From 4c1955ace4a6f0693e642aef057decac15a2dc28 Mon Sep 17 00:00:00 2001 From: maoake Date: Wed, 1 Apr 2026 23:00:08 +0200 Subject: [PATCH] changing the import for mypy test --- Makefile | 8 ++++++-- a_maze_ing.py | 4 ++-- src/AMazeIng.py | 2 +- src/mazegen/MazeGenerator.py | 2 +- src/parsing/Parsing.py | 4 ++-- 5 files changed, 12 insertions(+), 8 deletions(-) diff --git a/Makefile b/Makefile index 7e50735..95a292f 100644 --- a/Makefile +++ b/Makefile @@ -23,13 +23,17 @@ fclean: clean lint: uv run flake8 . --exclude=.venv - uv run env PYTHONPATH=src python3 -m mypy --warn-return-any --warn-unused-ignores --ignore-missing-imports --disallow-untyped-defs --check-untyped-defs src + uv run env PYTHONPATH=src python3 -m mypy --warn-return-any --warn-unused-ignores --ignore-missing-imports --disallow-untyped-defs --check-untyped-defs -p mazegen + uv run env PYTHONPATH=src python3 -m mypy --warn-return-any --warn-unused-ignores --ignore-missing-imports --disallow-untyped-defs --check-untyped-defs -p parsing + uv run env PYTHONPATH=src python3 -m mypy --warn-return-any --warn-unused-ignores --ignore-missing-imports --disallow-untyped-defs --check-untyped-defs src/AMazeIng.py uv run env PYTHONPATH=src python3 -m mypy --warn-return-any --warn-unused-ignores --ignore-missing-imports --disallow-untyped-defs --check-untyped-defs tests uv run env PYTHONPATH=src python3 -m mypy --warn-return-any --warn-unused-ignores --ignore-missing-imports --disallow-untyped-defs --check-untyped-defs a_maze_ing.py lint-strict: uv run flake8 . --exclude=.venv - uv run env PYTHONPATH=src python3 -m mypy --strict src + uv run env PYTHONPATH=src python3 -m mypy --strict -p mazegen + uv run env PYTHONPATH=src python3 -m mypy --strict src/AMazeIng.py + uv run env PYTHONPATH=src python3 -m mypy --strict -p parsing uv run env PYTHONPATH=src python3 -m mypy --strict tests uv run env PYTHONPATH=src python3 -m mypy --strict a_maze_ing.py diff --git a/a_maze_ing.py b/a_maze_ing.py index a819a90..1a92bea 100644 --- a/a_maze_ing.py +++ b/a_maze_ing.py @@ -1,7 +1,7 @@ from typing import Any from numpy.typing import NDArray -from src.AMazeIng import AMazeIng -from src.parsing.Parsing import DataMaze as Parsing +from AMazeIng import AMazeIng +from parsing.Parsing import DataMaze as Parsing from mlx import Mlx import time diff --git a/src/AMazeIng.py b/src/AMazeIng.py index 9828e81..44d252d 100644 --- a/src/AMazeIng.py +++ b/src/AMazeIng.py @@ -2,7 +2,7 @@ from typing import Generator from typing_extensions import Self from pydantic import BaseModel, Field, model_validator, ConfigDict -from .mazegen import Maze, MazeGenerator, MazeSolver +from mazegen import Maze, MazeGenerator, MazeSolver class AMazeIng(BaseModel): diff --git a/src/mazegen/MazeGenerator.py b/src/mazegen/MazeGenerator.py index a04c568..f7ff2f1 100644 --- a/src/mazegen/MazeGenerator.py +++ b/src/mazegen/MazeGenerator.py @@ -2,7 +2,7 @@ from abc import ABC, abstractmethod from typing import Generator, Any import numpy as np from numpy.typing import NDArray -from mazegen import Cell +from mazegen.Cell import Cell import math import random diff --git a/src/parsing/Parsing.py b/src/parsing/Parsing.py index 713b32f..6b4314a 100644 --- a/src/parsing/Parsing.py +++ b/src/parsing/Parsing.py @@ -1,5 +1,5 @@ -from ..mazegen import DepthFirstSearch, Kruskal -from ..mazegen import AStar, DepthFirstSearchSolver +from mazegen import DepthFirstSearch, Kruskal +from mazegen import AStar, DepthFirstSearchSolver from typing import Any