Skip to content

Commit

Permalink
Fix formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
Ricardo Amador committed Jan 21, 2023
1 parent 0d759b0 commit b611661
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 6 deletions.
7 changes: 4 additions & 3 deletions ci/firebase_testlab.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,8 @@ def check_timeline(results_dir):
'%s/%s/*/game_loop_results/results_scenario_0.json' %
(BUCKET, results_dir)
])
gsutil_du = gsutil_du if isinstance(gsutil_du, str) else gsutil_du.decode(ENCODING)
gsutil_du = gsutil_du if isinstance(gsutil_du,
str) else gsutil_du.decode(ENCODING)
gsutil_du = gsutil_du.strip()
if gsutil_du == '0':
print('Failed to produce a timeline.')
Expand Down Expand Up @@ -120,8 +121,8 @@ def main():
git_revision = subprocess.check_output(['git', 'rev-parse', 'HEAD'],
cwd=script_dir)

git_revision = git_revision if isinstance(
git_revision, str) else git_revision.decode(ENCODING)
git_revision = git_revision if isinstance(git_revision, str
) else git_revision.decode(ENCODING)
git_revision = git_revision.strip()
results = []
apk = None
Expand Down
6 changes: 4 additions & 2 deletions ci/scan_flattened_deps.py
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,8 @@ def get_common_ancestor_commit(dep, deps_list):
shell=True
)
default_branch = default_branch if isinstance(
default_branch, str) else default_branch.decode(ENCODING)
default_branch, str
) else default_branch.decode(ENCODING)
default_branch = default_branch.strip()
print(
'default_branch found: {default_branch}'.format(
Expand Down Expand Up @@ -237,7 +238,8 @@ def get_common_ancestor_commit(dep, deps_list):
shell=True
)
ancestor_commit = ancestor_commit if isinstance(
ancestor_commit, str) else ancestor_commit.decode(ENCODING)
ancestor_commit, str
) else ancestor_commit.decode(ENCODING)
ancestor_commit = ancestor_commit.strip()
print('Ancestor commit: ' + ancestor_commit)
return ancestor_commit
Expand Down
3 changes: 2 additions & 1 deletion testing/run_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -599,7 +599,8 @@ def assert_expected_xcode_version():
"""Checks that the user has a version of Xcode installed"""
version_output = subprocess.check_output(['xcodebuild', '-version'])
version_output = version_output if isinstance(
version_output, str) else version_output.decode('UTF-8')
version_output, str
) else version_output.decode('UTF-8')
match = re.match(r'Xcode (\d+)', version_output)
message = 'Xcode must be installed to run the iOS embedding unit tests'
assert match, message
Expand Down

0 comments on commit b611661

Please sign in to comment.