Skip to content

Commit ad09366

Browse files
committed
format with yapf
This was already formatted with yapf, but perhaps I didn't do this correctly. I copied the diff directly from kokoro build log this time.
1 parent c1451e8 commit ad09366

File tree

1 file changed

+11
-8
lines changed

1 file changed

+11
-8
lines changed

src/python/grpcio/commands.py

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -149,10 +149,11 @@ def check_and_update_cythonization(extensions):
149149
for source in extension.sources:
150150
base, file_ext = os.path.splitext(source)
151151
if file_ext == '.pyx':
152-
generated_pyx_source = next((base + gen_ext for gen_ext in (
153-
'.c',
154-
'.cpp',
155-
) if os.path.isfile(base + gen_ext)), None)
152+
generated_pyx_source = next(
153+
(base + gen_ext for gen_ext in (
154+
'.c',
155+
'.cpp',
156+
) if os.path.isfile(base + gen_ext)), None)
156157
if generated_pyx_source:
157158
generated_pyx_sources.append(generated_pyx_source)
158159
else:
@@ -194,7 +195,8 @@ def try_cythonize(extensions, linetracing=False, mandatory=True):
194195
return Cython.Build.cythonize(
195196
extensions,
196197
include_path=[
197-
include_dir for extension in extensions
198+
include_dir
199+
for extension in extensions
198200
for include_dir in extension.include_dirs
199201
] + [CYTHON_STEM],
200202
compiler_directives=cython_compiler_directives)
@@ -215,9 +217,10 @@ def compiler_ok_with_extra_std():
215217
"""Test if default compiler is okay with specifying c++ version
216218
when invokec in C mode. GCC is okay with this, while clang is not.
217219
"""
218-
cc_test = subprocess.Popen(['cc', '-x', 'c', '-std=c++11', '-'],
219-
stdout=subprocess.PIPE,
220-
stderr=subprocess.PIPE)
220+
cc_test = subprocess.Popen(
221+
['cc', '-x', 'c', '-std=c++11', '-'],
222+
stdout=subprocess.PIPE,
223+
stderr=subprocess.PIPE)
221224
_, cc_err = cc_test.communicate(input='int main(){return 0;}')
222225
return not 'invalid argument' in cc_err
223226

0 commit comments

Comments
 (0)