Skip to content

Commit 590eb33

Browse files
committed
0.4.0 update
Sort alphabetically variable and function names in quick access section
1 parent 7050692 commit 590eb33

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = 'sphinxfortran_ng'
3-
version = '0.3.9'
3+
version = '0.4.0'
44
authors = [{name = "Lorenzo Crippa", email="[email protected]"}]
55
description = "An improved version of the sphinx-fortran python module"
66
readme = "README.md"

src/sphinxfortran_ng/fortran_autodoc.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1586,7 +1586,7 @@ def format_quickaccess(self, block, indent=indent):
15861586
# Variables
15871587
if block['vars']:
15881588
decs_vars=[]
1589-
varnames = block['sortvars']
1589+
varnames = sorted(block['sortvars'])
15901590
decs_vars.append(':Variables: ' +
15911591
', '.join([':f:var:`%s`' %
15921592
vv for vv in varnames if 'name' in block['vars'][vv] and self.is_member(block['vars'][vv])]))
@@ -1600,6 +1600,7 @@ def format_quickaccess(self, block, indent=indent):
16001600
for subblock in blocks: # block['body']:
16011601
if subblock['block'] in ['function', 'subroutine', 'interface'] and self.is_member(subblock):
16021602
fdecs.append(subblock['name'])
1603+
fdecs.sort()
16031604
if fdecs:
16041605
fdecs = ', '.join([':f:func:`%s`' % ff for ff in fdecs])
16051606
decs_subr.append(':Routines: ' + fdecs)

0 commit comments

Comments
 (0)