Remove broken Sphinx type annotation
sphinx.directives.T has been removed upstream. This commit removes the type annotation to avoid breaking the extension with Sphinx >= 6
This commit is contained in:
		
							parent
							
								
									9d94b308ae
								
							
						
					
					
						commit
						04985650e7
					
				
					 1 changed files with 3 additions and 3 deletions
				
			
		|  | @ -20,7 +20,7 @@ from sphinx import addnodes | ||||||
| from sphinx.addnodes import desc_signature, pending_xref | from sphinx.addnodes import desc_signature, pending_xref | ||||||
| from sphinx.application import Sphinx | from sphinx.application import Sphinx | ||||||
| from sphinx.builders import Builder | from sphinx.builders import Builder | ||||||
| from sphinx.directives import ObjectDescription, T | from sphinx.directives import ObjectDescription | ||||||
| from sphinx.domains import Domain, ObjType | from sphinx.domains import Domain, ObjType | ||||||
| from sphinx.environment import BuildEnvironment | from sphinx.environment import BuildEnvironment | ||||||
| from sphinx.errors import NoUri | from sphinx.errors import NoUri | ||||||
|  | @ -63,7 +63,7 @@ class IPRangeDirective(ObjectDescription): | ||||||
| class IPV4RangeDirective(IPRangeDirective): | class IPV4RangeDirective(IPRangeDirective): | ||||||
|     title_prefix = _("IPv4 range") |     title_prefix = _("IPv4 range") | ||||||
| 
 | 
 | ||||||
|     def add_target_and_index(self, name: T, sig: str, sig_node: desc_signature) -> None: |     def add_target_and_index(self, name, sig: str, sig_node: desc_signature) -> None: | ||||||
|         anchor = "ip-ipv4range-{0}".format(sig) |         anchor = "ip-ipv4range-{0}".format(sig) | ||||||
|         sig_node["ids"].append(anchor) |         sig_node["ids"].append(anchor) | ||||||
|         ips = cast(IPDomain, self.env.get_domain("ip")) |         ips = cast(IPDomain, self.env.get_domain("ip")) | ||||||
|  | @ -77,7 +77,7 @@ class IPV4RangeDirective(IPRangeDirective): | ||||||
| class IPV6RangeDirective(IPRangeDirective): | class IPV6RangeDirective(IPRangeDirective): | ||||||
|     title_prefix = _("IPv6 range") |     title_prefix = _("IPv6 range") | ||||||
| 
 | 
 | ||||||
|     def add_target_and_index(self, name: T, sig: str, signode: desc_signature) -> None: |     def add_target_and_index(self, name, sig: str, signode: desc_signature) -> None: | ||||||
|         anchor = "ip-ipv6range-{0}".format(sig) |         anchor = "ip-ipv6range-{0}".format(sig) | ||||||
|         signode["ids"].append(anchor) |         signode["ids"].append(anchor) | ||||||
|         ips = cast(IPDomain, self.env.get_domain("ip")) |         ips = cast(IPDomain, self.env.get_domain("ip")) | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue