6b24f153d7
All of those patches are picked from upstream. xbps-src check python3-docutils works fine now!
49 lines
2.1 KiB
Diff
49 lines
2.1 KiB
Diff
From 792080ad1d8ac28483c9c147b0cb79f108b40571 Mon Sep 17 00:00:00 2001
|
|
From: Stephen Finucane <stephen@that.guru>
|
|
Date: Mon, 26 Aug 2019 16:45:09 +0000
|
|
Subject: [PATCH 11/26] Cleanup/simplify code following recent changes.
|
|
|
|
git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk@8358 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
|
Signed-off-by: Doan Tran Cong Danh <congdanhqx@gmail.com>
|
|
---
|
|
docutils/transforms/__init__.py | 4 ++--
|
|
docutils/writers/odf_odt/__init__.py | 8 ++------
|
|
2 files changed, 4 insertions(+), 8 deletions(-)
|
|
|
|
diff --git a/docutils/transforms/__init__.py b/docutils/transforms/__init__.py
|
|
index d444fce..12bf6f9 100644
|
|
--- a/docutils/transforms/__init__.py
|
|
+++ b/docutils/transforms/__init__.py
|
|
@@ -153,8 +153,8 @@ class Transformer(TransformSpec):
|
|
unknown_reference_resolvers = []
|
|
for i in components:
|
|
unknown_reference_resolvers.extend(i.unknown_reference_resolvers)
|
|
- decorated_list = sorted([(f.priority, f) for f in unknown_reference_resolvers])
|
|
- self.unknown_reference_resolvers.extend([f[1] for f in decorated_list])
|
|
+ decorated_list = sorted((f.priority, f) for f in unknown_reference_resolvers)
|
|
+ self.unknown_reference_resolvers.extend(f[1] for f in decorated_list)
|
|
|
|
def apply_transforms(self):
|
|
"""Apply all of the stored transforms, in priority order."""
|
|
diff --git a/docutils/writers/odf_odt/__init__.py b/docutils/writers/odf_odt/__init__.py
|
|
index c0f43a5..417dc34 100644
|
|
--- a/docutils/writers/odf_odt/__init__.py
|
|
+++ b/docutils/writers/odf_odt/__init__.py
|
|
@@ -68,12 +68,8 @@ except ImportError:
|
|
try:
|
|
import pygments
|
|
import pygments.lexers
|
|
- if sys.version_info.major >= 3:
|
|
- from .pygmentsformatter import OdtPygmentsProgFormatter, \
|
|
- OdtPygmentsLaTeXFormatter
|
|
- else:
|
|
- from .pygmentsformatter import OdtPygmentsProgFormatter, \
|
|
- OdtPygmentsLaTeXFormatter
|
|
+ from .pygmentsformatter import (OdtPygmentsProgFormatter,
|
|
+ OdtPygmentsLaTeXFormatter)
|
|
except (ImportError, SyntaxError):
|
|
pygments = None
|
|
|
|
--
|
|
2.24.0.375.geb5ae68d41
|
|
|