Commit abe6ac63 authored by Laurent Peuch's avatar Laurent Peuch
Browse files

chore(format-source): black the code

parent bad260cf0c62
Pipeline #71897 failed with stages
in 1 minute and 44 seconds
......@@ -49,3 +49,20 @@
{"pattern": "test/test_engine.py", "tool": "pyupgrade"}
{"pattern": "test/test_transforms.py", "tool": "pyupgrade"}
{"pattern": "test/test_utils.py", "tool": "pyupgrade"}
{"pattern": "__pkginfo__.py", "tool": "black"}
{"pattern": "logilab/__init__.py", "tool": "black"}
{"pattern": "logilab/mtconverter/__init__.py", "tool": "black"}
{"pattern": "logilab/mtconverter/engine.py", "tool": "black"}
{"pattern": "logilab/mtconverter/transform.py", "tool": "black"}
{"pattern": "logilab/mtconverter/transforms/__init__.py", "tool": "black"}
{"pattern": "logilab/mtconverter/transforms/cmdtransforms.py", "tool": "black"}
{"pattern": "logilab/mtconverter/transforms/htmltransform.py", "tool": "black"}
{"pattern": "logilab/mtconverter/transforms/odt2text.py", "tool": "black"}
{"pattern": "logilab/mtconverter/transforms/pgpsignature.py", "tool": "black"}
{"pattern": "logilab/mtconverter/transforms/piltransforms.py", "tool": "black"}
{"pattern": "logilab/mtconverter/transforms/pygmentstransforms.py", "tool": "black"}
{"pattern": "logilab/mtconverter/transforms/python.py", "tool": "black"}
{"pattern": "setup.py", "tool": "black"}
{"pattern": "test/test_engine.py", "tool": "black"}
{"pattern": "test/test_transforms.py", "tool": "black"}
{"pattern": "test/test_utils.py", "tool": "black"}
......@@ -146,9 +146,7 @@ for c in ("\n", "\r", "\t"):
_TR_CONTROL_CHARS[ord("\f")] = "\n"
_TR_CONTROL_CHARS[ord("\v")] = "\n"
TR_CONTROL_CHARS = [c.encode("ascii") for c in _TR_CONTROL_CHARS]
ESC_CAR_TABLE = maketrans(
b"".join(CONTROL_CHARS), b"".join(TR_CONTROL_CHARS)
)
ESC_CAR_TABLE = maketrans(b"".join(CONTROL_CHARS), b"".join(TR_CONTROL_CHARS))
ESC_UCAR_TABLE = ESC_CAR_TABLE.decode("latin1")
......
......@@ -64,7 +64,7 @@ class POpenTransform(Transform):
binary: str = None,
cmdargs: str = None,
use_stdin: bool = None,
**kwargs: Any
**kwargs: Any,
) -> None:
if name is not None:
self.name = name
......
......@@ -51,15 +51,11 @@ class MiscTransformsTC(TestCase):
self.assertEqual(converted, "yo \nzogzog")
def test_binary_html_to_text(self):
data = TransformData(
"<b>yo (zou éà ;)</b>".encode(), "text/html", "utf8"
)
data = TransformData("<b>yo (zou éà ;)</b>".encode(), "text/html", "utf8")
converted = ENGINE.convert(data, "text/plain").decode().strip()
self.assertEqual(converted, "**yo (zou éà ;)**")
data = TransformData(
b"<p>yo <br/>zogzog </p>", "text/html", "utf8"
)
data = TransformData(b"<p>yo <br/>zogzog </p>", "text/html", "utf8")
converted = ENGINE.convert(data, "text/plain").decode().strip()
self.assertEqual(converted, "yo \nzogzog")
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment