mirror of
https://github.com/RGBCube/GitHubWrapper
synced 2025-07-25 15:37:45 +00:00
Please pyright and type ignore some stuff
This commit is contained in:
parent
6f41bc8238
commit
404a589e87
8 changed files with 18 additions and 18 deletions
|
@ -79,7 +79,7 @@ copyright = '2022 - Present, VarMonke & sudosnok'
|
|||
|
||||
version = ''
|
||||
with open('../github/__init__.py') as f:
|
||||
version = re.search(r'^__version__\s*=\s*[\'"]([^\'"]*)[\'"]', f.read(), re.MULTILINE).group(1)
|
||||
version = re.search(r'^__version__\s*=\s*[\'"]([^\'"]*)[\'"]', f.read(), re.MULTILINE).group(1) #type: ignore
|
||||
|
||||
# The full version, including alpha/beta/rc tags.
|
||||
release = version
|
||||
|
|
|
@ -148,11 +148,11 @@ class PyAttributeTable(SphinxDirective):
|
|||
return [node]
|
||||
|
||||
|
||||
def build_lookup_table(env: BuildEnvironment) -> Dict[str, List[str]]:
|
||||
def build_lookup_table(env: Optional[BuildEnvironment]) -> Dict[str, List[str]]:
|
||||
# Given an environment, load up a lookup table of
|
||||
# full-class-name: objects
|
||||
result = {}
|
||||
domain = env.domains['py']
|
||||
domain = env.domains['py'] #type: ignore
|
||||
|
||||
ignored = {
|
||||
'data',
|
||||
|
@ -181,7 +181,7 @@ class TableElement(NamedTuple):
|
|||
|
||||
|
||||
def process_attributetable(app: Sphinx, doctree: nodes.Node, fromdocname: str) -> None:
|
||||
env = app.builder.env
|
||||
env = app.builder.env #type: ignore
|
||||
|
||||
lookup = build_lookup_table(env)
|
||||
for node in doctree.traverse(attributetableplaceholder):
|
||||
|
|
|
@ -25,7 +25,7 @@ class DPYStandaloneHTMLBuilder(StandaloneHTMLBuilder):
|
|||
def write_genindex(self) -> None:
|
||||
# the total count of lines for each index letter, used to distribute
|
||||
# the entries into two columns
|
||||
genindex = IndexEntries(self.env).create_index(self, group_entries=False)
|
||||
genindex = IndexEntries(self.env).create_index(self, group_entries=False) #type: ignore
|
||||
indexcounts = []
|
||||
for _k, entries in genindex:
|
||||
indexcounts.append(sum(1 + len(subitems)
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
from docutils.parsers.rst import Directive
|
||||
from docutils.parsers.rst import states, directives
|
||||
from docutils.parsers.rst import states, directives #type: ignore
|
||||
from docutils.parsers.rst.roles import set_classes
|
||||
from docutils import nodes
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
from docutils.parsers.rst import Directive
|
||||
from docutils.parsers.rst import states, directives
|
||||
from docutils.parsers.rst import states, directives #type: ignore
|
||||
from docutils.parsers.rst.roles import set_classes
|
||||
from docutils import nodes
|
||||
from sphinx.locale import _
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue