Skip to content

Commit 7141b43

Browse files
new: display version arg
1 parent be84ad8 commit 7141b43

2 files changed

Lines changed: 7 additions & 0 deletions

File tree

WDoc/WDoc.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,10 +131,14 @@ def __init__(
131131
DIY_rolling_window_embedding: Union[bool, int] = False,
132132
import_mode: Union[bool, int] = False,
133133
disable_md_printing: bool = False,
134+
version: bool = False,
134135

135136
**cli_kwargs,
136137
) -> None:
137138
"This docstring is dynamically replaced by the content of WDoc/docs/USAGE.md"
139+
if version:
140+
print(self.VERSION)
141+
return
138142
if notification_callback is not None:
139143
@optional_typecheck
140144
def ntfy(text: str) -> str:

WDoc/docs/USAGE.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -227,6 +227,9 @@
227227
* `--disable_md_printing`: bool, default `True`
228228
* if True, instead of using rich to display some information, default to simpler colored prints.
229229

230+
* `--version`: bool
231+
display the version and exit
232+
230233
* `--cli_kwargs`: dict, optional
231234
* Any remaining keyword argument will be parsed as a loader
232235
specific argument ((see below)[#loader-specific-arguments]).

0 commit comments

Comments
 (0)