Skip to content

Commit 0921353

Browse files
committed
Complete variable name refactoring for improved code readability
1 parent 5db5b81 commit 0921353

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

scripts/1-fetch/arxiv_fetch.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -414,12 +414,12 @@ def extract_metadata_from_xml(record_xml):
414414
}
415415

416416

417-
def bucket_author_count(n):
417+
def bucket_author_count(author_count):
418418
"""Convert author count to predefined buckets: "1", "2", "3", "4", "5+"."""
419-
if n <= 0:
419+
if author_count <= 0:
420420
return "0"
421-
if n <= 4:
422-
return str(n)
421+
if author_count <= 4:
422+
return str(author_count)
423423
return "5+"
424424

425425

@@ -656,8 +656,8 @@ def query_arxiv(args):
656656

657657
# Write provenance YAML for auditing
658658
try:
659-
with open(FILE_PROVENANCE, "w", encoding="utf-8", newline="\n") as fh:
660-
yaml.dump(provenance_data, fh, default_flow_style=False, indent=2)
659+
with open(FILE_PROVENANCE, "w", encoding="utf-8", newline="\n") as file_handle:
660+
yaml.dump(provenance_data, file_handle, default_flow_style=False, indent=2)
661661
except Exception as e:
662662
LOGGER.error(f"Failed to write provenance file: {e}")
663663
raise shared.QuantifyingException(

0 commit comments

Comments
 (0)