From e853fdde9a5f7f3b82d056c35935ee2ab15b218d Mon Sep 17 00:00:00 2001
From: Yian Chen <yian.chen@hpe.com>
Date: Tue, 9 Apr 2024 15:31:05 -0700
Subject: [PATCH] address flake8 format check

---
 benchmark/addressbook_pb2.py            |  6 +++---
 benchmark/carsales_pb2.py               | 10 +++++-----
 benchmark/catrank_pb2.py                |  4 ++--
 benchmark/eval_pb2.py                   |  4 ++--
 capnp/__init__.py                       |  1 +
 docs/conf.py                            |  1 +
 examples/async_calculator_client.py     |  1 -
 examples/async_calculator_server.py     |  2 --
 examples/async_ssl_calculator_client.py |  1 -
 examples/async_ssl_calculator_server.py |  2 --
 test/test_serialization.py              |  8 ++------
 11 files changed, 16 insertions(+), 24 deletions(-)

diff --git a/benchmark/addressbook_pb2.py b/benchmark/addressbook_pb2.py
index 1c792381..b4108418 100644
--- a/benchmark/addressbook_pb2.py
+++ b/benchmark/addressbook_pb2.py
@@ -251,12 +251,12 @@
             (_message.Message,),
             dict(
                 DESCRIPTOR=_PERSON_PHONENUMBER,
-                __module__="addressbook_pb2"
+                __module__="addressbook_pb2",
                 # @@protoc_insertion_point(class_scope:tutorial.Person.PhoneNumber)
             ),
         ),
         DESCRIPTOR=_PERSON,
-        __module__="addressbook_pb2"
+        __module__="addressbook_pb2",
         # @@protoc_insertion_point(class_scope:tutorial.Person)
     ),
 )
@@ -268,7 +268,7 @@
     (_message.Message,),
     dict(
         DESCRIPTOR=_ADDRESSBOOK,
-        __module__="addressbook_pb2"
+        __module__="addressbook_pb2",
         # @@protoc_insertion_point(class_scope:tutorial.AddressBook)
     ),
 )
diff --git a/benchmark/carsales_pb2.py b/benchmark/carsales_pb2.py
index 9e1f5eeb..3e9dd5de 100644
--- a/benchmark/carsales_pb2.py
+++ b/benchmark/carsales_pb2.py
@@ -675,7 +675,7 @@
     (_message.Message,),
     dict(
         DESCRIPTOR=_PARKINGLOT,
-        __module__="carsales_pb2"
+        __module__="carsales_pb2",
         # @@protoc_insertion_point(class_scope:capnp.benchmark.protobuf.ParkingLot)
     ),
 )
@@ -686,7 +686,7 @@
     (_message.Message,),
     dict(
         DESCRIPTOR=_TOTALVALUE,
-        __module__="carsales_pb2"
+        __module__="carsales_pb2",
         # @@protoc_insertion_point(class_scope:capnp.benchmark.protobuf.TotalValue)
     ),
 )
@@ -697,7 +697,7 @@
     (_message.Message,),
     dict(
         DESCRIPTOR=_CAR,
-        __module__="carsales_pb2"
+        __module__="carsales_pb2",
         # @@protoc_insertion_point(class_scope:capnp.benchmark.protobuf.Car)
     ),
 )
@@ -708,7 +708,7 @@
     (_message.Message,),
     dict(
         DESCRIPTOR=_WHEEL,
-        __module__="carsales_pb2"
+        __module__="carsales_pb2",
         # @@protoc_insertion_point(class_scope:capnp.benchmark.protobuf.Wheel)
     ),
 )
@@ -719,7 +719,7 @@
     (_message.Message,),
     dict(
         DESCRIPTOR=_ENGINE,
-        __module__="carsales_pb2"
+        __module__="carsales_pb2",
         # @@protoc_insertion_point(class_scope:capnp.benchmark.protobuf.Engine)
     ),
 )
diff --git a/benchmark/catrank_pb2.py b/benchmark/catrank_pb2.py
index 19203d9b..86d1b055 100644
--- a/benchmark/catrank_pb2.py
+++ b/benchmark/catrank_pb2.py
@@ -144,7 +144,7 @@
     (_message.Message,),
     dict(
         DESCRIPTOR=_SEARCHRESULTLIST,
-        __module__="catrank_pb2"
+        __module__="catrank_pb2",
         # @@protoc_insertion_point(class_scope:capnp.benchmark.protobuf.SearchResultList)
     ),
 )
@@ -155,7 +155,7 @@
     (_message.Message,),
     dict(
         DESCRIPTOR=_SEARCHRESULT,
-        __module__="catrank_pb2"
+        __module__="catrank_pb2",
         # @@protoc_insertion_point(class_scope:capnp.benchmark.protobuf.SearchResult)
     ),
 )
diff --git a/benchmark/eval_pb2.py b/benchmark/eval_pb2.py
index c3568e90..d1f31d34 100644
--- a/benchmark/eval_pb2.py
+++ b/benchmark/eval_pb2.py
@@ -218,7 +218,7 @@
     (_message.Message,),
     dict(
         DESCRIPTOR=_EXPRESSION,
-        __module__="eval_pb2"
+        __module__="eval_pb2",
         # @@protoc_insertion_point(class_scope:capnp.benchmark.protobuf.Expression)
     ),
 )
@@ -229,7 +229,7 @@
     (_message.Message,),
     dict(
         DESCRIPTOR=_EVALUATIONRESULT,
-        __module__="eval_pb2"
+        __module__="eval_pb2",
         # @@protoc_insertion_point(class_scope:capnp.benchmark.protobuf.EvaluationResult)
     ),
 )
diff --git a/capnp/__init__.py b/capnp/__init__.py
index aba313ff..84cfeb1b 100644
--- a/capnp/__init__.py
+++ b/capnp/__init__.py
@@ -31,6 +31,7 @@
         for phone in person.phones:
             print(phone.type, ':', phone.number)
 """
+
 # flake8: noqa F401 F403 F405
 from .version import version as __version__
 from .lib.capnp import *
diff --git a/docs/conf.py b/docs/conf.py
index e2c77116..f3499bdb 100644
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -1,6 +1,7 @@
 """
 Docs configuration
 """
+
 # -*- coding: utf-8 -*-
 #
 # capnp documentation build configuration file, created by
diff --git a/examples/async_calculator_client.py b/examples/async_calculator_client.py
index 7cc83775..f7bf00e7 100755
--- a/examples/async_calculator_client.py
+++ b/examples/async_calculator_client.py
@@ -8,7 +8,6 @@
 
 
 class PowerFunction(calculator_capnp.Calculator.Function.Server):
-
     """An implementation of the Function interface wrapping pow().  Note that
     we're implementing this on the client side and will pass a reference to
     the server.  The server will then be able to make calls back to the client."""
diff --git a/examples/async_calculator_server.py b/examples/async_calculator_server.py
index d9014b29..953c5d22 100755
--- a/examples/async_calculator_server.py
+++ b/examples/async_calculator_server.py
@@ -53,7 +53,6 @@ async def read(self, **kwargs):
 
 
 class FunctionImpl(calculator_capnp.Calculator.Function.Server):
-
     """Implementation of the Calculator.Function Cap'n Proto interface, where the
     function is defined by a Calculator.Expression."""
 
@@ -72,7 +71,6 @@ async def call(self, params, _context, **kwargs):
 
 
 class OperatorImpl(calculator_capnp.Calculator.Function.Server):
-
     """Implementation of the Calculator.Function Cap'n Proto interface, wrapping
     basic binary arithmetic operators."""
 
diff --git a/examples/async_ssl_calculator_client.py b/examples/async_ssl_calculator_client.py
index 118cd571..bb51da02 100755
--- a/examples/async_ssl_calculator_client.py
+++ b/examples/async_ssl_calculator_client.py
@@ -14,7 +14,6 @@
 
 
 class PowerFunction(calculator_capnp.Calculator.Function.Server):
-
     """An implementation of the Function interface wrapping pow().  Note that
     we're implementing this on the client side and will pass a reference to
     the server.  The server will then be able to make calls back to the client."""
diff --git a/examples/async_ssl_calculator_server.py b/examples/async_ssl_calculator_server.py
index 17cb7493..a2c39bd9 100755
--- a/examples/async_ssl_calculator_server.py
+++ b/examples/async_ssl_calculator_server.py
@@ -58,7 +58,6 @@ async def read(self, **kwargs):
 
 
 class FunctionImpl(calculator_capnp.Calculator.Function.Server):
-
     """Implementation of the Calculator.Function Cap'n Proto interface, where the
     function is defined by a Calculator.Expression."""
 
@@ -77,7 +76,6 @@ async def call(self, params, _context, **kwargs):
 
 
 class OperatorImpl(calculator_capnp.Calculator.Function.Server):
-
     """Implementation of the Calculator.Function Cap'n Proto interface, wrapping
     basic binary arithmetic operators."""
 
diff --git a/test/test_serialization.py b/test/test_serialization.py
index bcbb9109..9d7cb8cd 100644
--- a/test/test_serialization.py
+++ b/test/test_serialization.py
@@ -235,9 +235,7 @@ def test_from_bytes_traversal_limit(all_types):
             for i in range(0, size):
                 msg.structList[i].uInt8Field == 0
 
-    with all_types.TestAllTypes.from_bytes(
-        data, traversal_limit_in_words=2**62
-    ) as msg:
+    with all_types.TestAllTypes.from_bytes(data, traversal_limit_in_words=2**62) as msg:
         for i in range(0, size):
             assert msg.structList[i].uInt8Field == 0
 
@@ -253,8 +251,6 @@ def test_from_bytes_packed_traversal_limit(all_types):
         for i in range(0, size):
             msg.structList[i].uInt8Field == 0
 
-    msg = all_types.TestAllTypes.from_bytes_packed(
-        data, traversal_limit_in_words=2**62
-    )
+    msg = all_types.TestAllTypes.from_bytes_packed(data, traversal_limit_in_words=2**62)
     for i in range(0, size):
         assert msg.structList[i].uInt8Field == 0