test/lint/lint-python-utf8-encoding.sh
to a Python-script as part of the request of #24783. Checked for output-consistency.
lint: Convert lint-python-utf8-encoding.sh to Python #24916
pull Kvaciral wants to merge 1 commits into bitcoin:master from Kvaciral:lint-python-utf8-encoding-port changing 2 files +73 −28-
Kvaciral commented at 0:13 am on April 19, 2022: contributorA port of
-
Kvaciral force-pushed on Apr 19, 2022
-
DrahtBot added the label Tests on Apr 19, 2022
-
Kvaciral force-pushed on Apr 19, 2022
-
in test/lint/lint-python-utf8-encoding.py:20 in 1d5222411a outdated
15+ 16+def check_fileopens(): 17+ fileopens = list() 18+ 19+ try: 20+ fileopens = check_output(["git", "grep", r" open(", "--", "*.py", ":(exclude)src/crc32c/"], universal_newlines=True, encoding="utf8").splitlines()
anibilthare commented at 8:11 am on April 19, 2022:0 fileopens = check_output(["git", "grep", r" open(", "*.py", ":(exclude)src/crc32c/"], universal_newlines=True, encoding="utf8").splitlines()
I’m wondering if we can do this because they give the same output (locally tested).
laanwj commented at 11:08 am on April 19, 2022:It’s not strictly necessary here but adding the--
is “safe”. It’s good to add just in case file arguments are added later that might conflict with option arguments.
anibilthare commented at 2:21 pm on April 19, 2022:Sounds reasonable.
laanwj commented at 3:57 pm on April 21, 2022:Please unify the excludes in one place at the top, like you did for the other PRs.anibilthare commented at 10:25 am on April 19, 2022: noneTested ACK! To test I set the
encoding
parameter to something other than(ascii|utf8|utf-8)
with the python files that usedopen
andcheck_output
withuniversal_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 likeencoding=" utf8"
)Kvaciral force-pushed on Apr 21, 2022lint: Convert lint-python-utf8-encoding.sh to Python 035eef4be6Kvaciral force-pushed on Apr 21, 2022laanwj commented at 3:58 pm on April 25, 2022: memberThanks for addressing my comment. Code review ACK 035eef4be6071a060260907001363a0d12f1f2d2laanwj merged this on Apr 25, 2022laanwj closed this on Apr 25, 2022
sidhujag referenced this in commit 03867261ad on Apr 26, 2022DrahtBot locked this on Apr 25, 2023Labels
Tests
github-metadata-mirror
This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2024-12-18 21:12 UTC
This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2024-12-18 21:12 UTC
This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me
More mirrored repositories can be found on mirror.b10c.me