Skip to content

lint: Convert lint-python-utf8-encoding.sh to Python #24916

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

Merged
merged 1 commit into from
Apr 25, 2022

Conversation

Kvaciral
Copy link
Contributor

A port of test/lint/lint-python-utf8-encoding.sh to a Python-script as part of the request of #24783. Checked for output-consistency.

@Kvaciral Kvaciral force-pushed the lint-python-utf8-encoding-port branch from 38564e4 to 9365b68 Compare April 19, 2022 00:38
@DrahtBot DrahtBot added the Tests label Apr 19, 2022
@Kvaciral Kvaciral force-pushed the lint-python-utf8-encoding-port branch from 9365b68 to 1d52224 Compare April 19, 2022 01:57
@anibilthare
Copy link

Tested ACK!
To test I set the encoding parameter to something other than (ascii|utf8|utf-8) with the python files that used open and check_output with universal_newlines=True.

(One thing to note is that, with bad styling, CI will fail even with encoding set to (ascii|utf8|utf-8). E.G. more than one leading or trailing spaces like encoding=" utf8")

@laanwj laanwj mentioned this pull request Apr 19, 2022
25 tasks
fileopens = list()

try:
fileopens = check_output(["git", "grep", r" open(", "--", "*.py", ":(exclude)src/crc32c/"], universal_newlines=True, encoding="utf8").splitlines()
Copy link
Member

Choose a reason for hiding this comment

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

Please unify the excludes in one place at the top, like you did for the other PRs.

@Kvaciral Kvaciral force-pushed the lint-python-utf8-encoding-port branch from 1d52224 to 171e106 Compare April 21, 2022 21:12
@Kvaciral Kvaciral force-pushed the lint-python-utf8-encoding-port branch from 171e106 to 035eef4 Compare April 21, 2022 21:27
@laanwj
Copy link
Member

laanwj commented Apr 25, 2022

Thanks for addressing my comment.
Code review ACK 035eef4

@laanwj laanwj merged commit c90b42b into bitcoin:master Apr 25, 2022
sidhujag pushed a commit to syscoin/syscoin that referenced this pull request Apr 26, 2022
…thon

035eef4 lint: Convert lint-python-utf8-encoding.sh to Python (Dimitri)

Pull request description:

  A port of `test/lint/lint-python-utf8-encoding.sh` to a Python-script as part of the request of bitcoin#24783. Checked for output-consistency.

ACKs for top commit:
  laanwj:
    Code review ACK 035eef4

Tree-SHA512: a8a2f505bf7953d318837182101346c44e73cfd1bf3b5342ff1400fb1c67c5292519fa99db1035da87cf27fb5f5ac5d28871bf55a1c085b5f8a3bb33ff0fa3fb
@bitcoin bitcoin locked and limited conversation to collaborators Apr 25, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants