Skip to content

Commit

Permalink
address flake8 format check
Browse files Browse the repository at this point in the history
  • Loading branch information
yianchenhpe committed Apr 9, 2024
1 parent c3b72b2 commit e853fdd
Show file tree
Hide file tree
Showing 11 changed files with 16 additions and 24 deletions.
6 changes: 3 additions & 3 deletions benchmark/addressbook_pb2.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 5 additions & 5 deletions benchmark/carsales_pb2.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions benchmark/catrank_pb2.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions benchmark/eval_pb2.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions capnp/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 *
Expand Down
1 change: 1 addition & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Docs configuration
"""

# -*- coding: utf-8 -*-
#
# capnp documentation build configuration file, created by
Expand Down
1 change: 0 additions & 1 deletion examples/async_calculator_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -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."""
Expand Down
2 changes: 0 additions & 2 deletions examples/async_calculator_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -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."""

Expand All @@ -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."""

Expand Down
1 change: 0 additions & 1 deletion examples/async_ssl_calculator_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -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."""
Expand Down
2 changes: 0 additions & 2 deletions examples/async_ssl_calculator_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -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."""

Expand All @@ -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."""

Expand Down
8 changes: 2 additions & 6 deletions test/test_serialization.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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

0 comments on commit e853fdd

Please sign in to comment.