File tree Expand file tree Collapse file tree 1 file changed +7
-8
lines changed
src/mkdocstrings_handlers/python/_internal Expand file tree Collapse file tree 1 file changed +7
-8
lines changed Original file line number Diff line number Diff line change 4343_logger = get_logger (__name__ )
4444
4545
46- def _sort_key_alphabetical (item : CollectorItem ) -> Any :
47- # chr(sys.maxunicode) is a string that contains the final unicode
48- # character, so if 'name' isn't found on the object, the item will go to
49- # the end of the list.
46+ def _sort_key_alphabetical (item : CollectorItem ) -> str :
47+ # `chr(sys.maxunicode)` is a string that contains the final unicode character,
48+ # so if `name` isn't found on the object, the item will go to the end of the list.
5049 return item .name or chr (sys .maxunicode )
5150
5251
53- def _sort_key_source (item : CollectorItem ) -> Any :
54- # if ' lineno' is none, the item will go to the start of the list.
52+ def _sort_key_source (item : CollectorItem ) -> float :
53+ # If ` lineno` is none, the item will go to the end of the list.
5554 if item .is_alias :
56- return item .alias_lineno if item .alias_lineno is not None else - 1
57- return item .lineno if item .lineno is not None else - 1
55+ return item .alias_lineno if item .alias_lineno is not None else float ( "inf" )
56+ return item .lineno if item .lineno is not None else float ( "inf" )
5857
5958
6059Order = Literal ["alphabetical" , "source" ]
You can’t perform that action at this time.
0 commit comments