diff options
author | danieleades <33452915+danieleades@users.noreply.github.com> | 2023-01-02 18:32:44 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-01-02 18:32:44 +0000 |
commit | 94e6e3917fc41862d662fbed0155673781c426d3 (patch) | |
tree | f72459c865afd8dba661a4a21c9d482120e552a1 /sphinx/registry.py | |
parent | 256e52180759e7205178a8aa087ee1e362b7669d (diff) | |
download | sphinx-git-94e6e3917fc41862d662fbed0155673781c426d3.tar.gz |
De-glob mypy whitelist for 'sphinx.domains.*' (#11064)
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Diffstat (limited to 'sphinx/registry.py')
-rw-r--r-- | sphinx/registry.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sphinx/registry.py b/sphinx/registry.py index fd09544be..5a39c3546 100644 --- a/sphinx/registry.py +++ b/sphinx/registry.py @@ -68,7 +68,7 @@ class SphinxComponentRegistry: #: additional directives for domains #: a dict of domain name -> dict of directive name -> directive - self.domain_directives: dict[str, dict[str, Any]] = {} + self.domain_directives: dict[str, dict[str, type[Directive]]] = {} #: additional indices for domains #: a dict of domain name -> list of index class @@ -196,7 +196,7 @@ class SphinxComponentRegistry: if domain not in self.domains: raise ExtensionError(__('domain %s not yet registered') % domain) - directives = self.domain_directives.setdefault(domain, {}) + directives: dict[str, type[Directive]] = self.domain_directives.setdefault(domain, {}) if name in directives and not override: raise ExtensionError(__('The %r directive is already registered to domain %s') % (name, domain)) |