19
19
source_suffix = '.rst'
20
20
master_doc = 'index'
21
21
22
- project = u 'python-xmlsec'
23
- copyright = u '2020, Oleg Hoefling <[email protected] >' # noqa: A001
24
- author = u 'Bulat Gaifullin <[email protected] >'
22
+ project = 'python-xmlsec'
23
+ copyright = '2020, Oleg Hoefling <[email protected] >'
24
+ author = 'Bulat Gaifullin <[email protected] >'
25
25
release = importlib .metadata .version ('xmlsec' )
26
26
parsed : Version = parse (release )
27
- version = '{}.{}' . format ( parsed .major , parsed . minor )
27
+ version = f' { parsed . major } . { parsed .minor } '
28
28
29
29
exclude_patterns : list [str ] = []
30
30
pygments_style = 'sphinx'
39
39
(
40
40
master_doc ,
41
41
'python-xmlsec.tex' ,
42
- u 'python-xmlsec Documentation' ,
43
- u 'Bulat Gaifullin \\ textless{}[email protected] \\ textgreater{}',
42
+ 'python-xmlsec Documentation' ,
43
+ 'Bulat Gaifullin \\ textless{}[email protected] \\ textgreater{}' ,
44
44
'manual' ,
45
45
)
46
46
]
47
47
48
- man_pages = [(master_doc , 'python-xmlsec' , u 'python-xmlsec Documentation' , [author ], 1 )]
48
+ man_pages = [(master_doc , 'python-xmlsec' , 'python-xmlsec Documentation' , [author ], 1 )]
49
49
50
50
texinfo_documents = [
51
51
(
52
52
master_doc ,
53
53
'python-xmlsec' ,
54
- u 'python-xmlsec Documentation' ,
54
+ 'python-xmlsec Documentation' ,
55
55
author ,
56
56
'python-xmlsec' ,
57
57
'One line description of project.' ,
63
63
autodoc_docstring_signature = True
64
64
65
65
66
- rst_prolog = '''
66
+ rst_prolog = """
67
67
.. role:: xml(code)
68
68
:language: xml
69
- '''
69
+ """
70
70
71
71
# LXML crossref'ing stuff:
72
72
# LXML doesn't have an intersphinx docs,
75
75
76
76
77
77
def lxml_element_doc_reference (app : Sphinx , env : BuildEnvironment , node : pending_xref , contnode : Text ) -> reference :
78
- """
79
- Handle a missing reference only if it is a ``lxml.etree._Element`` ref.
78
+ """Handle a missing reference only if it is a ``lxml.etree._Element`` ref.
80
79
81
80
We handle only :class:`lxml.etree._Element` and :class:`~lxml.etree._Element` nodes.
82
81
"""
@@ -85,7 +84,7 @@ def lxml_element_doc_reference(app: Sphinx, env: BuildEnvironment, node: pending
85
84
and node .get ('reftarget' , None ) == 'lxml.etree._Element'
86
85
and contnode .astext () in ('lxml.etree._Element' , '_Element' )
87
86
):
88
- reftitle = '(in lxml v{})' . format ( lxml .__version__ ) # type: ignore[attr-defined]
87
+ reftitle = f '(in lxml v{ lxml .__version__ } )' # type: ignore[attr-defined]
89
88
newnode = reference ('' , '' , internal = False , refuri = lxml_element_cls_doc_uri , reftitle = reftitle )
90
89
newnode .append (contnode )
91
90
return newnode
0 commit comments