Open imphil opened 5 years ago
Interesting. It of course shouldn't make a difference. I'll see what's up.
I have the same problem, for yapf in python 3 and python 2, both with google style.
15:56:14 find . -name '*.py' -print0 | xargs -0 yapf --diff
15:56:40 --- ./aws/emr/s3/steps/download-artifact-new.py (original)
15:56:40 +++ ./aws/emr/s3/steps/download-artifact-new.py (reformatted)
15:56:40 @@ -33,8 +33,8 @@
15:56:40 # the path is allowed to contain variables like:
15:56:40 # {artifact_name}, {artifact_version}, etc.
15:56:40 # e.g. /{artifact_name}/{artifact_version}
15:56:40 - self.artifact_path = args.artifact_path.format(
15:56:40 - **args.__dict__).strip('/')
15:56:40 + self.artifact_path = args.artifact_path.format(**args.__dict__).strip(
15:56:40 + '/')
15:56:40 self.artifact_name = args.artifact_name
15:56:40 self.package_type = args.package_type
15:56:40 self.artifact_version = args.artifact_version
15:56:40 --- ./aws/emr/s3/steps/download-artifact.py (original)
15:56:40 +++ ./aws/emr/s3/steps/download-artifact.py (reformatted)
15:56:40 @@ -32,8 +32,8 @@
15:56:40 # the path is allowed to contain variables like:
15:56:40 # {artifact_name}, {artifact_version}, etc.
15:56:40 # e.g. /{artifact_name}/{artifact_version}
15:56:40 - self.artifact_path = args.artifact_path.format(
15:56:40 - **args.__dict__).strip('/')
15:56:40 + self.artifact_path = args.artifact_path.format(**args.__dict__).strip(
15:56:40 + '/')
15:56:40 self.artifact_name = args.artifact_name
15:56:40 self.package_type = args.package_type
15:56:40 self.artifact_version = args.artifact_version
I have the following code:
Running yapf master e43ad9d/0.26.0/0.25.0 on Python 3.7.2 gives the following output:
Running yapf master e43ad9d/0.26.0/0.25.0 on Python 3.5.2 (Ubuntu 16.04 default) gives the following output:
We expect users to run yapf locally and we run it in CI. Having different formatting requirements between a local runs and CI is very unfortunate for us.
Notes:
google
instead of thepep8
style.