1
Fork 0
mirror of https://github.com/RGBCube/GitHubWrapper synced 2025-07-25 15:37:45 +00:00

'Refactored by Sourcery'

This commit is contained in:
Sourcery AI 2022-06-25 10:51:16 +00:00
parent 72df282684
commit e0032900a6
5 changed files with 24 additions and 26 deletions

View file

@ -79,7 +79,10 @@ 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) # type: ignore
version = re.search(
r'^__version__\s*=\s*[\'"]([^\'"]*)[\'"]', f.read(), re.MULTILINE
)[1]
# The full version, including alpha/beta/rc tags.
release = version
@ -165,9 +168,10 @@ resource_links = {
'discord': 'https://discord.gg/W2SDTtMrZA',
'issues': 'https://github.com/VarMonke/Github-Api-Wrapper/issues',
'discussions': 'https://github.com/VarMonke/Github-Api-Wrapper/discussions',
'examples': f'https://github.com/VarMonke/Github-Api-Wrapper/examples',
'examples': 'https://github.com/VarMonke/Github-Api-Wrapper/examples',
}
# Theme options are theme-specific and customize the look and feel of a theme
# further. For a list of options available for each theme, see the
# documentation.

View file

@ -27,9 +27,10 @@ class DPYStandaloneHTMLBuilder(StandaloneHTMLBuilder):
# 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) # type: ignore
indexcounts = []
for _k, entries in genindex:
indexcounts.append(sum(1 + len(subitems) for _, (_, subitems, _) in entries))
indexcounts = [
sum(1 + len(subitems) for _, (_, subitems, _) in entries)
for _k, entries in genindex
]
genindexcontext = {
'genindexentries': genindex,