Skip to content

Commit

Permalink
Fix typing in test_doctests.py
Browse files Browse the repository at this point in the history
  • Loading branch information
rudolfbyker committed Aug 22, 2023
1 parent a3edb3e commit 7415e21
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions test/test_doctests.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
import doctest
import unittest
from typing import Any, List
from unittest import BaseTestSuite

from locate import this_dir

repo_dir = this_dir().parent


def load_tests(loader, tests, ignore):
# noinspection PyUnusedLocal
def load_tests(loader: Any, tests: BaseTestSuite, ignore: Any) -> BaseTestSuite:
"""
See https://docs.python.org/3/library/doctest.html#unittest-api
"""
Expand All @@ -16,7 +19,7 @@ def load_tests(loader, tests, ignore):
return tests


def find_modules_with_doctests():
def find_modules_with_doctests() -> List[str]:
modules = []
skip_n_parts = len(repo_dir.parts)
for path in repo_dir.joinpath("mkdocstrings_handlers").rglob("*.py"):
Expand Down

0 comments on commit 7415e21

Please sign in to comment.