mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
shrink 'Any generics' mypy whitelist for builders module (#10846)
This commit is contained in:
parent
8267dc4fde
commit
3c73efadab
@ -187,7 +187,9 @@ strict_optional = false
|
||||
[[tool.mypy.overrides]]
|
||||
module = [
|
||||
"sphinx.application",
|
||||
"sphinx.builders.*",
|
||||
"sphinx.builders._epub_base",
|
||||
"sphinx.builders.html",
|
||||
"sphinx.builders.linkcheck",
|
||||
"sphinx.cmd.quickstart",
|
||||
"sphinx.config",
|
||||
"sphinx.deprecation",
|
||||
|
@ -201,7 +201,7 @@ class HyperlinkAvailabilityChecker:
|
||||
self.config = config
|
||||
self.env = env
|
||||
self.rate_limits: Dict[str, RateLimit] = {}
|
||||
self.rqueue: Queue = Queue()
|
||||
self.rqueue: Queue[CheckResult] = Queue()
|
||||
self.workers: List[Thread] = []
|
||||
self.wqueue: PriorityQueue[CheckRequest] = PriorityQueue()
|
||||
|
||||
@ -246,8 +246,8 @@ class HyperlinkAvailabilityChecker:
|
||||
class HyperlinkAvailabilityCheckWorker(Thread):
|
||||
"""A worker class for checking the availability of hyperlinks."""
|
||||
|
||||
def __init__(self, env: BuildEnvironment, config: Config, rqueue: Queue,
|
||||
wqueue: Queue, rate_limits: Dict[str, RateLimit]) -> None:
|
||||
def __init__(self, env: BuildEnvironment, config: Config, rqueue: 'Queue[CheckResult]',
|
||||
wqueue: 'Queue[CheckRequest]', rate_limits: Dict[str, RateLimit]) -> None:
|
||||
self.config = config
|
||||
self.env = env
|
||||
self.rate_limits = rate_limits
|
||||
@ -428,7 +428,7 @@ class HyperlinkAvailabilityCheckWorker(Thread):
|
||||
uri, docname, lineno = hyperlink
|
||||
except ValueError:
|
||||
# old styled check_request (will be deprecated in Sphinx-5.0)
|
||||
next_check, uri, docname, lineno = check_request
|
||||
next_check, uri, docname, lineno = check_request # type: ignore[misc]
|
||||
|
||||
if uri is None:
|
||||
break
|
||||
|
Loading…
Reference in New Issue
Block a user