Skip to content

Remove "coding: utf-8" (PEP 3120) and add the verify_header checker#5096

Merged
mergify[bot] merged 5 commits into
Qiskit:masterfrom
1ucian0:pep3120
Sep 22, 2020
Merged

Remove "coding: utf-8" (PEP 3120) and add the verify_header checker#5096
mergify[bot] merged 5 commits into
Qiskit:masterfrom
1ucian0:pep3120

Conversation

@1ucian0
Copy link
Copy Markdown
Member

@1ucian0 1ucian0 commented Sep 21, 2020

Some sort of follow up to #4914 . I extended tools/verify_headers.py so the header does not added anymore accidentally.

@1ucian0 1ucian0 requested review from a team, maddy-tod and nonhermitian as code owners September 21, 2020 02:15
Copy link
Copy Markdown
Member

@mtreinish mtreinish left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Personally I don't think this is such a big deal, but I agree if we're going to standardize on not having an encoding string in the file then machine enforcing that makes sense. Just one comment about using a regex inline. Otherwise looks fine to me.

Comment thread tools/verify_headers.py Outdated
Comment thread tools/verify_headers.py
sys.stderr.write("%s failed header check because:\n\n" % i[0])
sys.stderr.write("%s\n\n" % i[2])
for failed_file in failed_files:
sys.stderr.write("%s failed header check because:\n" % failed_file[0])
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You didn't like the blank line?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I do not.. specially when you have more than 5 of them :)

Comment thread tools/verify_headers.py Outdated
Comment thread tools/verify_headers.py Outdated
1ucian0 and others added 2 commits September 21, 2020 17:01
Co-authored-by: Matthew Treinish <mtreinish@kortar.org>
Co-authored-by: Matthew Treinish <mtreinish@kortar.org>
@1ucian0
Copy link
Copy Markdown
Member Author

1ucian0 commented Sep 21, 2020

Personally I don't think this is such a big deal, but I agree if we're going to standardize on not having an encoding string in the file then machine enforcing that makes sense.

I feel the same way.

@mergify mergify Bot merged commit bbbccac into Qiskit:master Sep 22, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants