Skip to content

Commit 19e4a85

Browse files
committed
Apply yapf formatting
Fix Python formatter precommit check by applying yapf v0.43.0 formatting rules to modified files.
1 parent 0f691b1 commit 19e4a85

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

sdks/python/apache_beam/transforms/ptransform.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -891,8 +891,7 @@ def __init__(self, fn, *args, **kwargs):
891891
'non-serializable objects like file handles, database connections, '
892892
'or thread locks. Try: (1) using module-level functions instead of '
893893
'lambdas, (2) initializing resources in setup() methods, '
894-
'(3) checking what your closure captures.' %
895-
(self.fn, e)) from e
894+
'(3) checking what your closure captures.' % (self.fn, e)) from e
896895

897896
self.args = pickler.roundtrip(self.args)
898897
self.kwargs = pickler.roundtrip(self.kwargs)

sdks/python/apache_beam/transforms/ptransform_test.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -179,8 +179,8 @@ def __getstate__(self):
179179
'User code must be serializable (picklable) for distributed execution.',
180180
message)
181181
self.assertIn('non-serializable objects like file handles', message)
182-
self.assertIn('Try: (1) using module-level functions instead of lambdas',
183-
message)
182+
self.assertIn(
183+
'Try: (1) using module-level functions instead of lambdas', message)
184184

185185
def test_do_with_do_fn_returning_string_raises_warning(self):
186186
ex_details = r'.*Returning a str from a ParDo or FlatMap is discouraged.'

0 commit comments

Comments
 (0)