aws / git-remote-codecommit

An implementation of Git Remote Helper that makes it easier to interact with AWS CodeCommit
Apache License 2.0
271 stars 38 forks source link

Indentation bug - Python #12

Open kevinsen opened 4 years ago

kevinsen commented 4 years ago

I pushed a python script to Code-commit and made a PR. Reviewers saw my code with an error in the last line, the indentation. So when I check my code it was fine, the problem was the indentation on the EOF they were watching on the PR. Let me explain this with an example:

# What you passed to code-commit
for i in table_:
  if i:
    a='hello'
  else:
    a='bye' # EOF
## What code-commit show you
for i in table_:
  if i:
    a='hello'
  else:
a='bye' # codecommit EOF

The short way solution was pushing code with this "uncomfortable" enter in eof:

## What code-commit show you
for i in table_:
  if i:
    a='hello'
  else:
    a='bye'
# new EOF