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
Next Next commit
Cleanup: remove redundant encoding and default open mode
  • Loading branch information
hugovk committed Apr 16, 2024
commit 1aa606c131fbcdebbc8dad26a07eedc4d49f51bc
5 changes: 2 additions & 3 deletions Doc/tools/extensions/c_annotations.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
"""
c_annotations.py
~~~~~~~~~~~~~~~~
Expand Down Expand Up @@ -62,7 +61,7 @@ def __init__(self, name):
class Annotations:
def __init__(self, refcount_filename, stable_abi_file):
self.refcount_data = {}
with open(refcount_filename, 'r') as fp:
with open(refcount_filename) as fp:
for line in fp:
line = line.strip()
if line[:1] in ("", "#"):
Expand Down Expand Up @@ -90,7 +89,7 @@ def __init__(self, refcount_filename, stable_abi_file):
entry.result_refs = refcount

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