fix black formatting for new version

Signed-off-by: Philip May <philip@may.la>
This commit is contained in:
Philip May
2022-02-03 09:49:08 +01:00
committed by Vijayan Balasubramanian
parent 8b5a1caf61
commit 4056fa0176
4 changed files with 9 additions and 13 deletions
@@ -260,7 +260,7 @@ class TestAIOHttpConnection:
buf = b"\xe4\xbd\xa0\xe5\xa5\xbd\xed\xa9\xaa"
con = await self._get_mock_connection(response_body=buf)
status, headers, data = await con.perform_request("GET", "/")
assert u"你好\uda6a" == data
assert u"你好\uda6a" == data # fmt: skip
@pytest.mark.parametrize("exception_cls", reraise_exceptions)
async def test_recursion_error_reraised(self, exception_cls):
+2 -2
View File
@@ -351,7 +351,7 @@ class TestUrllib3Connection(TestCase):
buf = b"\xe4\xbd\xa0\xe5\xa5\xbd\xed\xa9\xaa"
con = self._get_mock_connection(response_body=buf)
status, headers, data = con.perform_request("GET", "/")
self.assertEqual(u"你好\uda6a", data)
self.assertEqual(u"你好\uda6a", data) # fmt: skip
@pytest.mark.skipif(
not reraise_exceptions, reason="RecursionError isn't defined in Python <3.5"
@@ -696,7 +696,7 @@ class TestRequestsConnection(TestCase):
buf = b"\xe4\xbd\xa0\xe5\xa5\xbd\xed\xa9\xaa"
con = self._get_mock_connection(response_body=buf)
status, headers, data = con.perform_request("GET", "/")
self.assertEqual(u"你好\uda6a", data)
self.assertEqual(u"你好\uda6a", data) # fmt: skip
@pytest.mark.skipif(
not reraise_exceptions, reason="RecursionError isn't defined in Python <3.5"
+2 -2
View File
@@ -83,7 +83,7 @@ class TestParallelBulk(TestCase):
class TestChunkActions(TestCase):
def setup_method(self, _):
self.actions = [({"index": {}}, {"some": u"datá", "i": i}) for i in range(100)]
self.actions = [({"index": {}}, {"some": u"datá", "i": i}) for i in range(100)] # fmt: skip
def test_expand_action(self):
self.assertEqual(helpers.expand_action({}), ({"index": {}}, {}))
@@ -209,7 +209,7 @@ class TestChunkActions(TestCase):
)
self.assertEqual(25, len(chunks))
for chunk_data, chunk_actions in chunks:
chunk = u"".join(chunk_actions)
chunk = u"".join(chunk_actions) # fmt: skip
chunk = chunk if isinstance(chunk, str) else chunk.encode("utf-8")
self.assertLessEqual(len(chunk), max_byte_size)
+4 -8
View File
@@ -420,14 +420,10 @@ def dump_modules(modules):
filepaths = []
for root, _, filenames in os.walk(CODE_ROOT / "opensearchpy/_async"):
for filename in filenames:
if (
filename.rpartition(".")[-1]
in (
"py",
"pyi",
)
and not filename.startswith("utils.py")
):
if filename.rpartition(".")[-1] in (
"py",
"pyi",
) and not filename.startswith("utils.py"):
filepaths.append(os.path.join(root, filename))
unasync.unasync_files(filepaths, rules)