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

Add segment props #176

Merged
merged 8 commits into from
Apr 8, 2024
Merged
Changes from 1 commit
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
Prev Previous commit
Next Next commit
fix: non-kwarg error for nglstate feature
fcollman committed Apr 7, 2024
commit b69d04a9ba89f86a8401e62f07081d90dede620b
22 changes: 11 additions & 11 deletions caveclient/base.py
Original file line number Diff line number Diff line change
@@ -407,17 +407,17 @@ def wrapper(*args, **kwargs):
)

raise ServerIncompatibilityError(msg)

for kwarg, kwarg_constraint in kwarg_use_constraints.items():
if _version_fails_constraint(self.server_version, kwarg_constraint):
msg = (
f"Use of keyword argument `{kwarg}` in `{method.__name__}` "
"is only permitted "
f"for server version {kwarg_constraint}, your server "
f"version is {self.server_version}. Contact your system "
"administrator to update the server version."
)
raise ServerIncompatibilityError(msg)
if kwarg_use_constraints is not None:
for kwarg, kwarg_constraint in kwarg_use_constraints.items():
if _version_fails_constraint(self.server_version, kwarg_constraint):
msg = (
f"Use of keyword argument `{kwarg}` in `{method.__name__}` "
"is only permitted "
f"for server version {kwarg_constraint}, your server "
f"version is {self.server_version}. Contact your system "
"administrator to update the server version."
)
raise ServerIncompatibilityError(msg)

out = method(*args, **kwargs)
return out
1 change: 1 addition & 0 deletions caveclient/endpoints.py
Original file line number Diff line number Diff line change
@@ -223,6 +223,7 @@
"upload_properties": json_v1 + "/property/post",
"get_properties_raw": json_v1 + "/property/raw/{state_id}",
"upload_properties_w_id": json_v1 + "/property/post/{state_id}",
"get_version": json_v1 + "/version",
}

json_legacy = "{json_server_address}/nglstate"