File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -73,3 +73,25 @@ def commit_profiling(prof_dir: str | Path):
7373 """
7474 porcelain .add (paths = prof_dir )
7575 porcelain .commit (message = "Updating profiling results." )
76+
77+
78+ def strip_patch_version (version : str ) -> str :
79+ parts = version .split ("." )
80+ match len (parts ):
81+ case 1 :
82+ return parts [0 ] + ".0.0"
83+ case 2 | 3 :
84+ return "." .join (parts [:2 ]) + ".0"
85+ case _:
86+ raise ValueError ("Invalid version semantic provided!" )
87+
88+
89+ def strip_minor_version (version : str ) -> str :
90+ parts = version .split ("." )
91+ match len (parts ):
92+ case 1 :
93+ return parts [0 ] + ".0.0"
94+ case 2 | 3 :
95+ return "." .join (parts [:1 ]) + ".0.0"
96+ case _:
97+ raise ValueError ("Invalid version semantic provided!" )
Original file line number Diff line number Diff line change 11[project ]
22name = " github_rest_api"
3- version = " 0.27 .0"
3+ version = " 0.28 .0"
44description = " Simple wrapper of GitHub REST APIs."
55authors = [{ name = " Ben Du" , email = " longendu@yahoo.com" }]
66requires-python = " >=3.11,<4"
You can’t perform that action at this time.
0 commit comments