SF.net SVN: docutils:[10042 ] trunk/docutils/docutils
aa-turner--- via Docutils-checkins <[email protected]> Sat, 08 Mar 2025 22:35:52 +0000
| Newsgroups | gmane.text.docutils.cvs |
|---|---|
| Message-ID | <[email protected]> |
Revision: 10042
http://sourceforge.net/p/docutils/code/10042
Author: aa-turner
Date: 2025-03-08 22:35:52 +0000 (Sat, 08 Mar 2025)
Log Message:
-----------
Remove redundant lambdas
Modified Paths:
--------------
trunk/docutils/docutils/utils/math/math2html.py
trunk/docutils/docutils/writers/odf_odt/__init__.py
Modified: trunk/docutils/docutils/utils/math/math2html.py
===================================================================
--- trunk/docutils/docutils/utils/math/math2html.py 2025-03-08 19:54:38 UTC (rev 10041)
+++ trunk/docutils/docutils/utils/math/math2html.py 2025-03-08 22:35:52 UTC (rev 10042)
@@ -842,7 +842,7 @@
def parse(self, reader):
"Parse the contents of the container"
- self.parseending(reader, lambda: reader.nextline())
+ self.parseending(reader, reader.nextline)
# skip last line
reader.nextline()
return []
@@ -1354,7 +1354,7 @@
def searchall(self, type):
"Search for all embedded containers of a given type"
lst = []
- self.searchprocess(type, lambda container: lst.append(container))
+ self.searchprocess(type, lst.append)
return lst
def searchremove(self, type):
Modified: trunk/docutils/docutils/writers/odf_odt/__init__.py
===================================================================
--- trunk/docutils/docutils/writers/odf_odt/__init__.py 2025-03-08 19:54:38 UTC (rev 10041)
+++ trunk/docutils/docutils/writers/odf_odt/__init__.py 2025-03-08 22:35:52 UTC (rev 10042)
@@ -2581,14 +2581,12 @@
lexer = pygments.lexers.get_lexer_by_name(language, stripall=True)
if language in ('latex', 'tex'):
fmtr = OdtPygmentsLaTeXFormatter(
- lambda name, parameters=():
- self.rststyle(name, parameters),
- escape_function=escape_cdata)
+ self.rststyle, escape_function=escape_cdata
+ )
else:
fmtr = OdtPygmentsProgFormatter(
- lambda name, parameters=():
- self.rststyle(name, parameters),
- escape_function=escape_cdata)
+ self.rststyle, escape_function=escape_cdata
+ )
return pygments.highlight(insource, lexer, fmtr)
def fill_line(self, line):
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.