Skip to content

Add docstrings and improve code quality in pg_arch, pg_meta, dsarch#43

Merged
zaihuaji merged 2 commits intoHua-work-dsarchfrom
claude/wonderful-gould
Mar 21, 2026
Merged

Add docstrings and improve code quality in pg_arch, pg_meta, dsarch#43
zaihuaji merged 2 commits intoHua-work-dsarchfrom
claude/wonderful-gould

Conversation

@zaihuaji
Copy link
Copy Markdown
Collaborator

Summary

  • Add module, class, and method docstrings to pg_arch.py, pg_meta.py, and dsarch.py — all public methods now have Args/Returns descriptions
  • Add class-level docstrings documenting instance attributes and inherited classes
  • Document the 13-slot counts array layout in PgMeta class docstring

Bug fixes

  • Fix typo hi.realine()hi.readline() in pg_arch.set_localfile_list (would raise AttributeError at runtime)
  • Fix unused s pluralisation variables in pg_meta.reset_top_gindex so log messages correctly say "file" vs "files"

Code quality

  • Convert redundant inline # comments above def statements into proper docstrings
  • Normalise default-argument spacing (PEP 8: no spaces around = in keyword defaults) across all three files

Test plan

  • Verify python3 -c "import ast; ast.parse(open('src/rda_python_dsarch/pg_arch.py').read())" passes
  • Verify python3 -c "import ast; ast.parse(open('src/rda_python_dsarch/pg_meta.py').read())" passes
  • Verify python3 -c "import ast; ast.parse(open('src/rda_python_dsarch/dsarch.py').read())" passes
  • Run existing test suite

🤖 Generated with Claude Code

zaihuaji and others added 2 commits March 21, 2026 12:36
- Add module, class, and method docstrings to pg_arch.py, pg_meta.py,
  and dsarch.py covering all public methods with Args/Returns descriptions
- Fix typo: hi.realine() -> hi.readline() in pg_arch.set_localfile_list
- Fix unused `s` pluralisation variables in pg_meta.reset_top_gindex
  so log messages correctly say "file" vs "files"
- Normalise default-argument spacing (PEP 8) across all three files
- Convert redundant inline # comments above defs into proper docstrings

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Fix seven categories of syntax errors and consistency issues throughout
the usage document while preserving the original format and structure:

- Fix mismatched brackets: [-(DO|DisplayOrder] -> [-(DO|DisplayOrder)
  and [-(DE|Description] -> [-(DE|Description) in all archive and set
  action option lists
- Fix reversed option delimiters: [(-OF|-OutputFile) -> [-(OF|OutputFile)
  in GetGroup, GetSavedFile, and GetQuasarFile sections
- Fix unclosed parenthesis: [-(DS|Dataset] -> [-(DS|Dataset)] in GetGroup
- Fix mismatched quote: -(WU|WebURL' -> -(WU|WebURL) in GetHelpFile table
- Fix stray alias: [-(OF|OutputFile|>) -> [-(OF|OutputFile) in GetAll
- Fix action name inconsistency: -TV or -Terminate -> -TV or -TerminateVersion
  to match the usage syntax and section 3.2 action listing
- Fix typo and inline comment: "New-record, Tarred, or Achived" ->
  "New, Tarred, or Archived" in SetQuasarFile option list

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@zaihuaji zaihuaji merged commit 8b2281f into Hua-work-dsarch Mar 21, 2026
1 check was pending
@zaihuaji zaihuaji deleted the claude/wonderful-gould branch March 24, 2026 20:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant