You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Some mypy label references are used between repos (main and rules_mypy) so it is important that they are declared relative to the original bzl file correctly. Use `Label()` at the construction site to do this.
(This is the "correct" fix for needing the full canonical name in string form, so update the advice to use "@@//name")
Copy file name to clipboardExpand all lines: readme.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -70,13 +70,13 @@ mypy's behavior may be customized using a [mypy config file](https://mypy.readth
70
70
71
71
```starlark
72
72
mypy_aspect = mypy(
73
-
mypy_ini="@@//:mypy.ini",
73
+
mypy_ini=Label("//:mypy.ini"),
74
74
types= types,
75
75
)
76
76
```
77
77
78
78
> [!NOTE]
79
-
> The label passed to `mypy_ini`needs to be absolute (a prefix of `@@` means the root repo).
79
+
> The label passed to `mypy_ini`is used across modules, so ensure you pass a `Label` (will be qualified relative to construction location) and not a regular string.
80
80
81
81
> [!NOTE]
82
82
> mypy.ini files should likely contain the following lines to suppress type-checking 3rd party modules.
@@ -107,7 +107,7 @@ And in your `aspects.bzl` (or similar) file:
0 commit comments