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:
		| @@ -187,7 +187,9 @@ strict_optional = false | |||||||
| [[tool.mypy.overrides]] | [[tool.mypy.overrides]] | ||||||
| module = [ | module = [ | ||||||
|     "sphinx.application", |     "sphinx.application", | ||||||
|     "sphinx.builders.*", |     "sphinx.builders._epub_base", | ||||||
|  |     "sphinx.builders.html", | ||||||
|  |     "sphinx.builders.linkcheck", | ||||||
|     "sphinx.cmd.quickstart", |     "sphinx.cmd.quickstart", | ||||||
|     "sphinx.config", |     "sphinx.config", | ||||||
|     "sphinx.deprecation", |     "sphinx.deprecation", | ||||||
|   | |||||||
| @@ -201,7 +201,7 @@ class HyperlinkAvailabilityChecker: | |||||||
|         self.config = config |         self.config = config | ||||||
|         self.env = env |         self.env = env | ||||||
|         self.rate_limits: Dict[str, RateLimit] = {} |         self.rate_limits: Dict[str, RateLimit] = {} | ||||||
|         self.rqueue: Queue = Queue() |         self.rqueue: Queue[CheckResult] = Queue() | ||||||
|         self.workers: List[Thread] = [] |         self.workers: List[Thread] = [] | ||||||
|         self.wqueue: PriorityQueue[CheckRequest] = PriorityQueue() |         self.wqueue: PriorityQueue[CheckRequest] = PriorityQueue() | ||||||
|  |  | ||||||
| @@ -246,8 +246,8 @@ class HyperlinkAvailabilityChecker: | |||||||
| class HyperlinkAvailabilityCheckWorker(Thread): | class HyperlinkAvailabilityCheckWorker(Thread): | ||||||
|     """A worker class for checking the availability of hyperlinks.""" |     """A worker class for checking the availability of hyperlinks.""" | ||||||
|  |  | ||||||
|     def __init__(self, env: BuildEnvironment, config: Config, rqueue: Queue, |     def __init__(self, env: BuildEnvironment, config: Config, rqueue: 'Queue[CheckResult]', | ||||||
|                  wqueue: Queue, rate_limits: Dict[str, RateLimit]) -> None: |                  wqueue: 'Queue[CheckRequest]', rate_limits: Dict[str, RateLimit]) -> None: | ||||||
|         self.config = config |         self.config = config | ||||||
|         self.env = env |         self.env = env | ||||||
|         self.rate_limits = rate_limits |         self.rate_limits = rate_limits | ||||||
| @@ -428,7 +428,7 @@ class HyperlinkAvailabilityCheckWorker(Thread): | |||||||
|                 uri, docname, lineno = hyperlink |                 uri, docname, lineno = hyperlink | ||||||
|             except ValueError: |             except ValueError: | ||||||
|                 # old styled check_request (will be deprecated in Sphinx-5.0) |                 # 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: |             if uri is None: | ||||||
|                 break |                 break | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user