fix black formatting for new version

Signed-off-by: Philip May <[email protected]>
This commit is contained in:
Philip May
2022-02-05 00:13:37 -08: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" buf = b"\xe4\xbd\xa0\xe5\xa5\xbd\xed\xa9\xaa"
con = await self._get_mock_connection(response_body=buf) con = await self._get_mock_connection(response_body=buf)
status, headers, data = await con.perform_request("GET", "/") 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) @pytest.mark.parametrize("exception_cls", reraise_exceptions)
async def test_recursion_error_reraised(self, exception_cls): 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" buf = b"\xe4\xbd\xa0\xe5\xa5\xbd\xed\xa9\xaa"
con = self._get_mock_connection(response_body=buf) con = self._get_mock_connection(response_body=buf)
status, headers, data = con.perform_request("GET", "/") status, headers, data = con.perform_request("GET", "/")
self.assertEqual(u"你好\uda6a", data) self.assertEqual(u"你好\uda6a", data) # fmt: skip
@pytest.mark.skipif( @pytest.mark.skipif(
not reraise_exceptions, reason="RecursionError isn't defined in Python <3.5" 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" buf = b"\xe4\xbd\xa0\xe5\xa5\xbd\xed\xa9\xaa"
con = self._get_mock_connection(response_body=buf) con = self._get_mock_connection(response_body=buf)
status, headers, data = con.perform_request("GET", "/") status, headers, data = con.perform_request("GET", "/")
self.assertEqual(u"你好\uda6a", data) self.assertEqual(u"你好\uda6a", data) # fmt: skip
@pytest.mark.skipif( @pytest.mark.skipif(
not reraise_exceptions, reason="RecursionError isn't defined in Python <3.5" 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): class TestChunkActions(TestCase):
def setup_method(self, _): 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): def test_expand_action(self):
self.assertEqual(helpers.expand_action({}), ({"index": {}}, {})) self.assertEqual(helpers.expand_action({}), ({"index": {}}, {}))
@@ -209,7 +209,7 @@ class TestChunkActions(TestCase):
) )
self.assertEqual(25, len(chunks)) self.assertEqual(25, len(chunks))
for chunk_data, chunk_actions in 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") chunk = chunk if isinstance(chunk, str) else chunk.encode("utf-8")
self.assertLessEqual(len(chunk), max_byte_size) self.assertLessEqual(len(chunk), max_byte_size)
+4 -8
View File
@@ -420,14 +420,10 @@ def dump_modules(modules):
filepaths = [] filepaths = []
for root, _, filenames in os.walk(CODE_ROOT / "opensearchpy/_async"): for root, _, filenames in os.walk(CODE_ROOT / "opensearchpy/_async"):
for filename in filenames: for filename in filenames:
if ( if filename.rpartition(".")[-1] in (
filename.rpartition(".")[-1] "py",
in ( "pyi",
"py", ) and not filename.startswith("utils.py"):
"pyi",
)
and not filename.startswith("utils.py")
):
filepaths.append(os.path.join(root, filename)) filepaths.append(os.path.join(root, filename))
unasync.unasync_files(filepaths, rules) unasync.unasync_files(filepaths, rules)