Skip to content

Commit f5ff4fa

Browse files
authored
Merge pull request #13182 from notatallshaw/enable-linting-rule-FA102
Enable linting rule FA102 (future-required-type-annotation)
2 parents 3e99c7c + 2d42f9a commit f5ff4fa

File tree

3 files changed

+4
-1
lines changed

3 files changed

+4
-1
lines changed

build-project.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,14 @@
77
from os import PathLike
88
from pathlib import Path
99
from types import SimpleNamespace
10+
from typing import Union
1011

1112

1213
class EnvBuilder(venv.EnvBuilder):
1314
"""A subclass of venv.EnvBuilder that exposes the python executable command."""
1415

1516
def ensure_directories(
16-
self, env_dir: str | bytes | PathLike[str] | PathLike[bytes]
17+
self, env_dir: Union[str, bytes, "PathLike[str]", "PathLike[bytes]"]
1718
) -> SimpleNamespace:
1819
context = super().ensure_directories(env_dir)
1920
self.env_exec_cmd = context.env_exec_cmd

news/13182.trivial.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Enabling linting rule FA102.

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -184,6 +184,7 @@ select = [
184184
"W",
185185
"RUF100",
186186
"UP",
187+
"FA102", # future-required-type-annotation
187188
]
188189

189190
[tool.ruff.lint.isort]

0 commit comments

Comments
 (0)