1919source_suffix = '.rst'
2020master_doc = 'index'
2121
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] >' 2525release = importlib .metadata .version ('xmlsec' )
2626parsed : Version = parse (release )
27- version = '{}.{}' . format ( parsed .major , parsed . minor )
27+ version = f' { parsed . major } . { parsed .minor } '
2828
2929exclude_patterns : list [str ] = []
3030pygments_style = 'sphinx'
3939 (
4040 master_doc ,
4141 '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{}' ,
4444 'manual' ,
4545 )
4646]
4747
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 )]
4949
5050texinfo_documents = [
5151 (
5252 master_doc ,
5353 'python-xmlsec' ,
54- u 'python-xmlsec Documentation' ,
54+ 'python-xmlsec Documentation' ,
5555 author ,
5656 'python-xmlsec' ,
5757 'One line description of project.' ,
6363autodoc_docstring_signature = True
6464
6565
66- rst_prolog = '''
66+ rst_prolog = """
6767.. role:: xml(code)
6868 :language: xml
69- '''
69+ """
7070
7171# LXML crossref'ing stuff:
7272# LXML doesn't have an intersphinx docs,
7575
7676
7777def 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.
8079
8180 We handle only :class:`lxml.etree._Element` and :class:`~lxml.etree._Element` nodes.
8281 """
@@ -85,7 +84,7 @@ def lxml_element_doc_reference(app: Sphinx, env: BuildEnvironment, node: pending
8584 and node .get ('reftarget' , None ) == 'lxml.etree._Element'
8685 and contnode .astext () in ('lxml.etree._Element' , '_Element' )
8786 ):
88- reftitle = '(in lxml v{})' . format ( lxml .__version__ ) # type: ignore[attr-defined]
87+ reftitle = f '(in lxml v{ lxml .__version__ } )' # type: ignore[attr-defined]
8988 newnode = reference ('' , '' , internal = False , refuri = lxml_element_cls_doc_uri , reftitle = reftitle )
9089 newnode .append (contnode )
9190 return newnode
0 commit comments