Skip to content

Commit e424a8d

Browse files
committed
fix: lint issues fixed
1 parent 3f3777c commit e424a8d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

cli/__version__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,10 @@ def _discover_package_version() -> str:
2424
try:
2525
with open(setup_path, "r", encoding="utf-8") as f:
2626
content = f.read()
27-
match = re.search(r"version=\"([^\"]+)\"", content)
27+
match = re.search(r"version\s*=\s*[\"'](.*?)[\"']", content)
2828
if match:
2929
return match.group(1)
30-
except Exception:
30+
except (OSError, IOError, UnicodeDecodeError):
3131
pass
3232

3333
return "0.0.0"

0 commit comments

Comments
 (0)