-
Notifications
You must be signed in to change notification settings - Fork 536
v1: Migrated poetry
to uv
#5253
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
b8372a7
d2e2deb
ad62486
786ae48
282c0b7
c15a25a
18c35bd
2f6189f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
@@ -21,15 +21,16 @@ | |||||||||||||||||||||||||||||||||||||||||||||||||
t["project"]["version"] = ver | ||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||
# patch dependencies | ||||||||||||||||||||||||||||||||||||||||||||||||||
deps = t["tool"]["poetry"]["dependencies"] | ||||||||||||||||||||||||||||||||||||||||||||||||||
deps: list[str] = t["project"]["dependencies"] | ||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||
def patch_dep(dep_name): | ||||||||||||||||||||||||||||||||||||||||||||||||||
if deps.get(dep_name): | ||||||||||||||||||||||||||||||||||||||||||||||||||
if isinstance(deps[dep_name], dict): | ||||||||||||||||||||||||||||||||||||||||||||||||||
deps[dep_name]["version"] = ver | ||||||||||||||||||||||||||||||||||||||||||||||||||
else: | ||||||||||||||||||||||||||||||||||||||||||||||||||
deps[dep_name] = ver | ||||||||||||||||||||||||||||||||||||||||||||||||||
for i in range(0, len(deps)): | ||||||||||||||||||||||||||||||||||||||||||||||||||
dep = deps[i] | ||||||||||||||||||||||||||||||||||||||||||||||||||
if dep == dep_name: | ||||||||||||||||||||||||||||||||||||||||||||||||||
deps[i] = f"{dep_name}=={ver}" | ||||||||||||||||||||||||||||||||||||||||||||||||||
elif dep.startswith(f"{dep_name};"): | ||||||||||||||||||||||||||||||||||||||||||||||||||
deps[i] = dep.replace(f"{dep_name};", f"{dep_name}=={ver};") | ||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||
Comment on lines
+28
to
35
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The dependency version update logic in patch_dep relies on simple string matching, which might not correctly handle cases where dependencies already contain version constraints or extras. Consider using a more robust parser or regex to accurately update dependency strings.
Suggested change
Copilot uses AI. Check for mistakes. Positive FeedbackNegative Feedback |
||||||||||||||||||||||||||||||||||||||||||||||||||
patch_dep("flet-cli") | ||||||||||||||||||||||||||||||||||||||||||||||||||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[nitpick] Ensure that the sed substitution for replacing 'flet-desktop' with 'flet-desktop-light' in pyproject.toml is idempotent and targets only the intended configuration lines. Consider refining the match pattern to avoid inadvertent changes to unrelated parts of the file.
Copilot uses AI. Check for mistakes.