Skip to content

Commit a9b15e4

Browse files
chore(deps): update dependency mypy to v1.12.1 (#901)
* chore(deps): update dependency mypy to v1.12.1 * refactor(violation): don't override `issue` --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Mathieu Kniewallner <[email protected]>
1 parent 1837f6f commit a9b15e4

File tree

7 files changed

+36
-51
lines changed

7 files changed

+36
-51
lines changed

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ dependencies = [
3333
dev-dependencies = [
3434
"mkdocs==1.6.1",
3535
"mkdocs-material==9.5.41",
36-
"mypy==1.11.2",
36+
"mypy==1.12.1",
3737
"pytest==8.3.3",
3838
"pytest-cov==5.0.0",
3939
"pytest-xdist[psutil]==3.6.1",
Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,15 @@
11
from __future__ import annotations
22

33
from dataclasses import dataclass
4-
from typing import TYPE_CHECKING, ClassVar
4+
from typing import ClassVar
55

66
from deptry.violations.base import Violation
77

8-
if TYPE_CHECKING:
9-
from deptry.module import Module
10-
118

129
@dataclass
1310
class DEP001MissingDependencyViolation(Violation):
1411
error_code: ClassVar[str] = "DEP001"
1512
error_template: ClassVar[str] = "'{name}' imported but missing from the dependency definitions"
16-
issue: Module
1713

1814
def get_error_message(self) -> str:
1915
return self.error_template.format(name=self.issue.name)
Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,15 @@
11
from __future__ import annotations
22

33
from dataclasses import dataclass
4-
from typing import TYPE_CHECKING, ClassVar
4+
from typing import ClassVar
55

66
from deptry.violations.base import Violation
77

8-
if TYPE_CHECKING:
9-
from deptry.dependency import Dependency
10-
118

129
@dataclass
1310
class DEP002UnusedDependencyViolation(Violation):
1411
error_code: ClassVar[str] = "DEP002"
1512
error_template: ClassVar[str] = "'{name}' defined as a dependency but not used in the codebase"
16-
issue: Dependency
1713

1814
def get_error_message(self) -> str:
1915
return self.error_template.format(name=self.issue.name)
Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,15 @@
11
from __future__ import annotations
22

33
from dataclasses import dataclass
4-
from typing import TYPE_CHECKING, ClassVar
4+
from typing import ClassVar
55

66
from deptry.violations.base import Violation
77

8-
if TYPE_CHECKING:
9-
from deptry.module import Module
10-
118

129
@dataclass
1310
class DEP003TransitiveDependencyViolation(Violation):
1411
error_code: ClassVar[str] = "DEP003"
1512
error_template: ClassVar[str] = "'{name}' imported but it is a transitive dependency"
16-
issue: Module
1713

1814
def get_error_message(self) -> str:
1915
return self.error_template.format(name=self.issue.name)
Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,15 @@
11
from __future__ import annotations
22

33
from dataclasses import dataclass
4-
from typing import TYPE_CHECKING, ClassVar
4+
from typing import ClassVar
55

66
from deptry.violations.base import Violation
77

8-
if TYPE_CHECKING:
9-
from deptry.module import Module
10-
118

129
@dataclass
1310
class DEP004MisplacedDevDependencyViolation(Violation):
1411
error_code: ClassVar[str] = "DEP004"
1512
error_template: ClassVar[str] = "'{name}' imported but declared as a dev dependency"
16-
issue: Module
1713

1814
def get_error_message(self) -> str:
1915
return self.error_template.format(name=self.issue.name)
Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,17 @@
11
from __future__ import annotations
22

33
from dataclasses import dataclass
4-
from typing import TYPE_CHECKING, ClassVar
4+
from typing import ClassVar
55

66
from deptry.violations.base import Violation
77

8-
if TYPE_CHECKING:
9-
from deptry.dependency import Dependency
10-
118

129
@dataclass
1310
class DEP005StandardLibraryDependencyViolation(Violation):
1411
error_code: ClassVar[str] = "DEP005"
1512
error_template: ClassVar[str] = (
1613
"'{name}' is defined as a dependency but it is included in the Python standard library."
1714
)
18-
issue: Dependency
1915

2016
def get_error_message(self) -> str:
2117
return self.error_template.format(name=self.issue.name)

uv.lock

Lines changed: 30 additions & 25 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)