8000 Docs: Add classes to C API return value annotations by hugovk · Pull Request #117926 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

Docs: Add classes to C API return value annotations #117926

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 5 commits into from
Apr 16, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Explicitly specify encoding='utf8'
Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
  • Loading branch information
hugovk and sobolevn authored Apr 16, 2024
commit f923cc3f1c1daf25d410fb543b2a8938584d88c7
4 changes: 2 additions & 2 deletions Doc/tools/extensions/c_annotations.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ def __init__(self, name):
class Annotations:
def __init__(self, refcount_filename, stable_abi_file):
self.refcount_data = {}
with open(refcount_filename) as fp:
with open(refcount_filename, encoding='utf8') as fp:
for line in fp:
line = line.strip()
if line[:1] in ("", "#"):
Expand Down Expand Up @@ -89,7 +89,7 @@ def __init__(self, refcount_filename, stable_abi_file):
entry.result_refs = refcount

self.stable_abi_data = {}
with open(stable_abi_file) as fp:
with open(stable_abi_file, encoding='utf8') as fp:
for record in csv.DictReader(fp):
name = record['name']
self.stable_abi_data[name] = record
Expand Down
0