mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Fix mypy violations (with mypy-0.780)
This commit is contained in:
parent
068b9b5738
commit
24cdbd43d4
@ -950,7 +950,7 @@ class ModuleDocumenter(Documenter):
|
||||
# Sort by __all__
|
||||
def keyfunc(entry: Tuple[Documenter, bool]) -> int:
|
||||
name = entry[0].name.split('::')[1]
|
||||
if name in self.__all__:
|
||||
if self.__all__ and name in self.__all__:
|
||||
return self.__all__.index(name)
|
||||
else:
|
||||
return len(self.__all__)
|
||||
|
Loading…
Reference in New Issue
Block a user