Skip to content
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