File tree Expand file tree Collapse file tree 2 files changed +8
-4
lines changed Expand file tree Collapse file tree 2 files changed +8
-4
lines changed Original file line number Diff line number Diff line change 40
40
- fix #501 : add py.typed
41
41
- fix #804 : git - use fallback version instead of 0.0 when no version is found at all
42
42
- fix #1139 : use logging.lastResort instead of a own replica to avoid polluting logging._ handlerList
43
+ - fix #873 : don't infer version in cli if --no-version is given
43
44
44
45
## v8.3.1
45
46
Original file line number Diff line number Diff line change @@ -33,10 +33,13 @@ def main(args: list[str] | None = None) -> int:
33
33
file = sys .stderr ,
34
34
)
35
35
config = Configuration (root = inferred_root )
36
-
37
- version = _get_version (
38
- config , force_write_version_files = opts .force_write_version_files
39
- )
36
+ version : str | None
37
+ if opts .no_version :
38
+ version = "0.0.0+no-version-was-requested.fake-version"
39
+ else :
40
+ version = _get_version (
41
+ config , force_write_version_files = opts .force_write_version_files
42
+ )
40
43
if version is None :
41
44
raise SystemExit ("ERROR: no version found for" , opts )
42
45
if opts .strip_dev :
You can’t perform that action at this time.
0 commit comments