Skip to content

Commit 0937b76

Browse files
committed
collect CLI arguments into a dataclass
Using library "clickdc", collect CLI arguments into a "cli_args" dataclass. A small amount of reordering was done, which affects the output of the helpdoc, but the intention is for this to introduce no other functional changes. The properties in "cli_args" are sometimes mutated, for example when reading comparable values from a DSN. But mutating the properties is debatable. New tests are introduced for the crucial user/host/port/socket coordinates, but we stop short of adding new tests for every single CLI argument. Motivations * clarity * click_entrypoint() had too many positional arguments * adding an CLI argument required adding both a decorator and a matching positional argument to click_entrypoint() * this work can be a step toward breaking up massive main.py and test_main.py Another related step would be gathering disparate runtime settings into a self.settings property.
1 parent e714436 commit 0937b76

5 files changed

Lines changed: 893 additions & 310 deletions

File tree

changelog.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,17 @@ Features
66
* Respond to `-h` alone with the helpdoc.
77

88

9+
Bug Fixes
10+
---------
11+
* Correct how password help is rendered in the helpdoc.
12+
13+
14+
Internal
15+
---------
16+
* Collect CLI arguments into a dataclass.
17+
18+
19+
920
1.66.0 (2026/03/21)
1021
==============
1122

0 commit comments

Comments
 (0)