|
5 | 5 | import os |
6 | 6 | import re |
7 | 7 | import sys |
| 8 | +import warnings |
8 | 9 | from contextlib import contextmanager |
9 | 10 | from functools import partial, wraps |
10 | 11 | from importlib.metadata import version as pkgversion |
11 | 12 | from pathlib import Path |
| 13 | +from random import sample |
| 14 | +from tempfile import gettempdir |
12 | 15 | from typing import TYPE_CHECKING, Any, Callable |
13 | 16 |
|
14 | 17 | from duty import duty, tools |
| 18 | +from pysource_codegen import generate |
| 19 | +from pysource_minimize import minimize |
| 20 | + |
| 21 | +from griffe import visit |
15 | 22 |
|
16 | 23 | if TYPE_CHECKING: |
17 | 24 | from collections.abc import Callable, Iterator |
@@ -471,7 +478,7 @@ def coverage(ctx: Context) -> None: |
471 | 478 |
|
472 | 479 |
|
473 | 480 | @duty |
474 | | -def test(ctx: Context, *cli_args: str, match: str = "") -> None: |
| 481 | +def test(ctx: Context, *cli_args: str, match: str = "") -> None: # noqa: PT028 |
475 | 482 | """Run the test suite. |
476 | 483 |
|
477 | 484 | ```bash |
@@ -523,15 +530,6 @@ def fuzz( |
523 | 530 | min_seed: Minimum value for the seeds range. |
524 | 531 | max_seed: Maximum value for the seeds range. |
525 | 532 | """ |
526 | | - import warnings |
527 | | - from random import sample |
528 | | - from tempfile import gettempdir |
529 | | - |
530 | | - from pysource_codegen import generate |
531 | | - from pysource_minimize import minimize |
532 | | - |
533 | | - from griffe import visit |
534 | | - |
535 | 533 | warnings.simplefilter("ignore", SyntaxWarning) |
536 | 534 |
|
537 | 535 | def fails(code: str, filepath: Path) -> bool: |
|
0 commit comments