canvas 0.60.0__py3-none-any.whl → 0.61.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of canvas might be problematic. Click here for more details.
- {canvas-0.60.0.dist-info → canvas-0.61.0.dist-info}/METADATA +1 -1
- {canvas-0.60.0.dist-info → canvas-0.61.0.dist-info}/RECORD +5 -5
- canvas_sdk/commands/base.py +9 -3
- {canvas-0.60.0.dist-info → canvas-0.61.0.dist-info}/WHEEL +0 -0
- {canvas-0.60.0.dist-info → canvas-0.61.0.dist-info}/entry_points.txt +0 -0
|
@@ -102,7 +102,7 @@ canvas_sdk/caching/exceptions.py,sha256=WIQIveMzmGm9WGhZqBhsGbbcydpS0AzMpkhzUmTa
|
|
|
102
102
|
canvas_sdk/caching/plugins.py,sha256=VWVj7iBQQDHJTMX8El4YHkUPRgSEWZef7aaS7Jls7RU,607
|
|
103
103
|
canvas_sdk/caching/utils.py,sha256=lg-2RVl7uujO0_KOvWKZ5c3q7RyrrmLG5JNaxCL2lOw,875
|
|
104
104
|
canvas_sdk/commands/__init__.py,sha256=qX7xkagyYk4W4JqczoTHv3W3Bk16BXQG4Ut7zQV8wX0,3337
|
|
105
|
-
canvas_sdk/commands/base.py,sha256=
|
|
105
|
+
canvas_sdk/commands/base.py,sha256=XHHS2mvTm0Do3y5xxUJJzj1JFMZ3Jp-E0Go7ZtnXkww,6763
|
|
106
106
|
canvas_sdk/commands/constants.py,sha256=0iuPRW1xC0O7i1KxxQbFhjbOA5VAnBkfyxELRJ3M86o,1652
|
|
107
107
|
canvas_sdk/commands/commands/__init__.py,sha256=YYXr5tEQlnwMgTXJbOG963tKSPiUOM4mUkX8wuiqp7U,17
|
|
108
108
|
canvas_sdk/commands/commands/adjust_prescription.py,sha256=LgA0x7YS6wK84kxI5r3ULSBSvxi4XFB6hdIMdfakPNQ,453
|
|
@@ -331,7 +331,7 @@ canvas_cli/templates/plugins/default/{{ cookiecutter.__project_slug }}/{{ cookie
|
|
|
331
331
|
canvas_cli/templates/plugins/default/{{ cookiecutter.__project_slug }}/{{ cookiecutter.__package_name }}/README.md,sha256=3QKoJQq3YmdplGnDOBMsLCJ3Ya1_aKjoz-QiWc4QfjA,291
|
|
332
332
|
canvas_cli/templates/plugins/default/{{ cookiecutter.__project_slug }}/{{ cookiecutter.__package_name }}/protocols/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
333
333
|
canvas_cli/templates/plugins/default/{{ cookiecutter.__project_slug }}/{{ cookiecutter.__package_name }}/protocols/my_protocol.py,sha256=fKLLcOIwvSWenW8-7tr8VqnF4Iox_5wU9V-Qw9UySsA,2381
|
|
334
|
-
canvas-0.
|
|
335
|
-
canvas-0.
|
|
336
|
-
canvas-0.
|
|
337
|
-
canvas-0.
|
|
334
|
+
canvas-0.61.0.dist-info/METADATA,sha256=wdSKy9Zu8AvBVwf_eIOzqSOTysRria1WdmZMXmaJ9mo,4758
|
|
335
|
+
canvas-0.61.0.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
336
|
+
canvas-0.61.0.dist-info/entry_points.txt,sha256=0Vs_9GmTVUNniH6eDBlRPgofmADMV4BES6Ao26M4AbM,47
|
|
337
|
+
canvas-0.61.0.dist-info/RECORD,,
|
canvas_sdk/commands/base.py
CHANGED
|
@@ -77,7 +77,8 @@ class _BaseCommand(TrackableFieldsModel):
|
|
|
77
77
|
annotation_args = get_args(annotation)
|
|
78
78
|
# Filter out NoneType and take the first valid type
|
|
79
79
|
annotation = next(
|
|
80
|
-
(arg for arg in annotation_args if arg is not NoneType),
|
|
80
|
+
(arg for arg in annotation_args if arg is not NoneType),
|
|
81
|
+
annotation_args[0],
|
|
81
82
|
)
|
|
82
83
|
|
|
83
84
|
if type(annotation) is EnumType:
|
|
@@ -158,8 +159,13 @@ class _BaseCommand(TrackableFieldsModel):
|
|
|
158
159
|
"""Returns a command recommendation to be inserted via Protocol Card."""
|
|
159
160
|
if button is None:
|
|
160
161
|
button = self.constantized_key().lower().replace("_", " ")
|
|
161
|
-
command = self.Meta.key
|
|
162
|
-
return Recommendation(
|
|
162
|
+
command = self.Meta.key
|
|
163
|
+
return Recommendation(
|
|
164
|
+
title=title,
|
|
165
|
+
button=button,
|
|
166
|
+
command=command,
|
|
167
|
+
context=self.values | {"effect_type": f"ORIGINATE_{self.constantized_key()}_COMMAND"},
|
|
168
|
+
)
|
|
163
169
|
|
|
164
170
|
|
|
165
171
|
class _SendableCommandMixin:
|
|
File without changes
|
|
File without changes
|