Conversation
PR SummaryMedium Risk Overview Adds safer request path interpolation via new Extends query/form serialization to support Written by Cursor Bugbot for commit 513697a. This will update automatically on new commits. Configure here. |
fca90df to
330c995
Compare
|
🧪 Testing To try out this version of the SDK: Expires at: Fri, 01 May 2026 07:53:30 GMT |
330c995 to
12a6c31
Compare
12a6c31 to
a714206
Compare
a714206 to
e93b413
Compare
e93b413 to
be5f4ef
Compare
be5f4ef to
5afa771
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix prepared a fix for the issue found in the latest run.
- ✅ Fixed: Local variable shadows its own function name
- Renamed the local
path_templatevariable topath_template_partto remove function-name shadowing without changing behavior.
- Renamed the local
Or push these changes by commenting:
@cursor push 084ff571f6
Preview (084ff571f6)
diff --git a/src/lumaai/_utils/_path.py b/src/lumaai/_utils/_path.py
--- a/src/lumaai/_utils/_path.py
+++ b/src/lumaai/_utils/_path.py
@@ -104,10 +104,10 @@
rest, fragment_template = rest.split("#", 1)
if "?" in rest:
rest, query_template = rest.split("?", 1)
- path_template = rest
+ path_template_part = rest
# Interpolate each portion with the appropriate quoting rules.
- path_result = _interpolate(path_template, kwargs, _quote_path_segment_part)
+ path_result = _interpolate(path_template_part, kwargs, _quote_path_segment_part)
# Reject dot-segments (. and ..) in the final assembled path. The check
# runs after interpolation so that adjacent placeholders or a mix of static| rest, fragment_template = rest.split("#", 1) | ||
| if "?" in rest: | ||
| rest, query_template = rest.split("?", 1) | ||
| path_template = rest |
There was a problem hiding this comment.
Local variable shadows its own function name
Low Severity
The local variable path_template on this line shadows the enclosing function also named path_template. While this doesn't cause a runtime bug today (no recursive call is made), it creates confusing code where the same identifier refers to different things depending on scope. It also prevents any future recursive usage and can confuse IDE navigation and static analysis tools. A name like path_part would avoid the ambiguity.
5afa771 to
1cf4061
Compare
1cf4061 to
d08007c
Compare
Note that we still want to run tests, as these depend on the metadata.
d08007c to
f23dc99
Compare
f23dc99 to
1e8ba61
Compare
1e8ba61 to
ac7b024
Compare
ac7b024 to
b312f59
Compare
b312f59 to
ce0b4c3
Compare
ce0b4c3 to
513697a
Compare
|
🤖 Release is at https://github.com/lumalabs/lumaai-python/releases/tag/v1.21.0 🌻 |



Automated Release PR
1.21.0 (2026-04-01)
Full Changelog: v1.20.1...v1.21.0
Features
Bug Fixes
by_aliasunless set (aea1d45)Chores
Refactors
This pull request is managed by Stainless's GitHub App.
The semver version number is based on included commit messages. Alternatively, you can manually set the version number in the title of this pull request.
For a better experience, it is recommended to use either rebase-merge or squash-merge when merging this pull request.
🔗 Stainless website
📚 Read the docs
🙋 Reach out for help or questions