Skip to content

Commit 152ea6e

Browse files
committed
refactor(validate.py): remove Optional[X] for use of X | None
ruff UP007, UP045
1 parent 2627fb4 commit 152ea6e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

numpydoc/validate.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
import textwrap
1818
import tokenize
1919
from copy import deepcopy
20-
from typing import Any, Dict, List, Optional, Set
20+
from typing import Any, Dict, List, Set
2121

2222
from .docscrape import get_doc_object
2323

@@ -124,7 +124,7 @@ def _unwrap(obj):
124124
# and pandas, and they had between ~500 and ~1300 .py files as of 2023-08-16.
125125
@functools.lru_cache(maxsize=2000)
126126
def extract_ignore_validation_comments(
127-
filepath: Optional[os.PathLike],
127+
filepath: os.PathLike | None,
128128
encoding: str = "utf-8",
129129
) -> Dict[int, List[str]]:
130130
"""

0 commit comments

Comments
 (0)