Skip to content

Commit 7130ca3

Browse files
authored
chore: run flake8-lazy (#769)
Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
1 parent 0949791 commit 7130ca3

13 files changed

Lines changed: 40 additions & 2 deletions

File tree

src/sp_repo_review/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66

77
from __future__ import annotations
88

9+
__lazy_modules__ = [f"{__spec__.parent}._version"]
10+
911
from ._version import version as __version__
1012

1113
__all__ = ["__version__"]

src/sp_repo_review/_compat/importlib/resources/abc.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
from __future__ import annotations
22

3+
__lazy_modules__ = ["importlib", "importlib.resources", "importlib.resources.abc"]
4+
35
import sys
46

57
if sys.version_info < (3, 11):

src/sp_repo_review/_compat/tomllib.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
from __future__ import annotations
22

3+
__lazy_modules__ = ["tomllib"]
4+
35
import sys
46

57
if sys.version_info < (3, 11):

src/sp_repo_review/checks/github.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33

44
from __future__ import annotations
55

6+
__lazy_modules__ = ["pathlib", "yaml"]
7+
68
from pathlib import Path
79
from typing import TYPE_CHECKING, Any
810

src/sp_repo_review/checks/mypy.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
from __future__ import annotations
22

3+
__lazy_modules__ = ["typing"]
4+
35
from typing import Any
46

57
from . import mk_url

src/sp_repo_review/checks/noxfile.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44

55
from __future__ import annotations
66

7+
__lazy_modules__ = ["ast", f"{__spec__.parent.rsplit('.', 1)[0]}._compat"] # type: ignore[union-attr]
8+
79
import ast
810
import dataclasses
911
import re

src/sp_repo_review/checks/precommit.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33

44
from __future__ import annotations
55

6+
__lazy_modules__ = ["yaml"]
7+
68
from typing import TYPE_CHECKING, Any, ClassVar
79

810
import yaml

src/sp_repo_review/checks/pyproject.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
from __future__ import annotations
22

3+
__lazy_modules__ = [f"{__spec__.parent.rsplit('.', 1)[0]}._compat"] # type: ignore[union-attr]
4+
35
import enum
46
from typing import TYPE_CHECKING, Any
57

src/sp_repo_review/checks/readthedocs.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
from __future__ import annotations
22

3+
__lazy_modules__ = ["yaml"]
4+
35
from typing import TYPE_CHECKING, Any
46

57
import yaml

src/sp_repo_review/checks/ruff.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
from __future__ import annotations
22

3+
__lazy_modules__ = [f"{__spec__.parent.rsplit('.', 1)[0]}._compat"] # type: ignore[union-attr]
4+
35
from typing import TYPE_CHECKING, Any, ClassVar, Literal, Protocol
46

57
from .._compat import tomllib

0 commit comments

Comments
 (0)