Skip to content
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

fix builtins module #276

Merged
merged 1 commit into from
Aug 29, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions src/viser/_gui_api.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
from __future__ import annotations

import builtins
import colorsys
import dataclasses
import functools
Expand Down Expand Up @@ -1242,7 +1243,7 @@ def add_slider(
"""
value: IntOrFloat = initial_value
assert max >= min
step = __builtins__.min(step, max - min)
step = builtins.min(step, max - min)
assert max >= value >= min

# GUI callbacks cast incoming values to match the type of the initial value. If
Expand Down Expand Up @@ -1325,7 +1326,7 @@ def add_multi_slider(
A handle that can be used to interact with the GUI element.
"""
assert max >= min
step = __builtins__.min(step, max - min)
step = builtins.min(step, max - min)
assert all(max >= x >= min for x in initial_value)

# GUI callbacks cast incoming values to match the type of the initial value. If
Expand Down
Loading