-
-
Notifications
You must be signed in to change notification settings - Fork 166
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[IMP] Add pylint check missing newline in extra extension files. #22
[IMP] Add pylint check missing newline in extra extension files. #22
Conversation
@moylop260 @pedrobaeza @max3903 |
I see correct this trailing line (it helps in the diff if you add a new line at the end). Even more, in .po files, Odoo or Poedit adds at least 2 trailing lines at the end. |
b2861b0
to
872e7bb
Compare
@lescobarvx We need change this check for cases where don't exists a newline at final file. |
@lescobarvx |
872e7bb
to
df28ec3
Compare
if os.stat(ext_file).st_size > 0: | ||
fp.seek(-2, os.SEEK_END) | ||
last_line = fp.readline() | ||
if last_line[-1:] not in ['\n', '\r']: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use last_line.endswith('\n') or last_line.endswith('\r')
df28ec3
to
7c45287
Compare
7c45287
to
11f9cfe
Compare
4171029
to
47c25e8
Compare
👍 |
47c25e8
to
c49705e
Compare
Rebased |
👍 |
Please rebase |
c49705e
to
0af845b
Compare
rebased |
👍 |
Thanks @pedrobaeza |
[IMP] Add pylint check trailing newlines in other extension files.