Add docstrings and improve code quality in pg_arch, pg_meta, dsarch#43
Merged
zaihuaji merged 2 commits intoHua-work-dsarchfrom Mar 21, 2026
Merged
Add docstrings and improve code quality in pg_arch, pg_meta, dsarch#43zaihuaji merged 2 commits intoHua-work-dsarchfrom
zaihuaji merged 2 commits intoHua-work-dsarchfrom
Conversation
- 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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
pg_arch.py,pg_meta.py, anddsarch.py— all public methods now have Args/Returns descriptionsPgMetaclass docstringBug fixes
hi.realine()→hi.readline()inpg_arch.set_localfile_list(would raiseAttributeErrorat runtime)spluralisation variables inpg_meta.reset_top_gindexso log messages correctly say "file" vs "files"Code quality
# commentsabovedefstatements into proper docstrings=in keyword defaults) across all three filesTest plan
python3 -c "import ast; ast.parse(open('src/rda_python_dsarch/pg_arch.py').read())"passespython3 -c "import ast; ast.parse(open('src/rda_python_dsarch/pg_meta.py').read())"passespython3 -c "import ast; ast.parse(open('src/rda_python_dsarch/dsarch.py').read())"passes🤖 Generated with Claude Code