Skip to content

Commit 09665ef

Browse files
committed
Bump version to 0.23.0
1 parent 330b342 commit 09665ef

File tree

3 files changed

+10
-7
lines changed

3 files changed

+10
-7
lines changed

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "viam-sdk"
3-
version = "0.22.0"
3+
version = "0.23.0"
44
description = "Viam Robotics Python SDK"
55
authors = [ "Naveed <naveed@viam.com>" ]
66
license = "Apache-2.0"

src/viam/resource/easy_resource.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,14 +36,16 @@ def _create_stub_fn(name: str, is_async: bool) -> Callable:
3636
if is_async:
3737
# note: this is a pyright bug https://github.com/microsoft/pyright/issues/2136
3838
async def stub_fn(*args, **kwargs): # pyright: ignore [reportRedeclaration]
39-
logger.info(f'{name} not implemented')
39+
logger.info(f"{name} not implemented")
4040
raise MethodNotImplementedError(name)
41+
4142
else:
43+
4244
def stub_fn(*args, **kwargs):
43-
logger.info(f'{name} not implemented')
45+
logger.info(f"{name} not implemented")
4446
raise MethodNotImplementedError(name)
4547

46-
stub_fn.__name__ = f'{name}_stub'
48+
stub_fn.__name__ = f"{name}_stub"
4749
return stub_fn
4850

4951

@@ -67,7 +69,7 @@ class MyMotor(Motor, EasyResource):
6769
is_async = inspect.iscoroutinefunction(val)
6870
stub_fn = _create_stub_fn(attr, is_async)
6971
setattr(cls, attr, stub_fn)
70-
logger.debug('patched %s.%s with %s', cls, attr, stub_fn)
72+
logger.debug("patched %s.%s with %s", cls, attr, stub_fn)
7173
cls.__abstractmethods__ -= {attr}
7274
return cls
7375

tests/test_easy_resource.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,10 @@ class SubclassTest(Generic, EasyResource):
3737
def test_stubs(self, clear_registry):
3838
class MyMotor(Motor, EasyResource):
3939
MODEL = "org:type:name"
40+
4041
with pytest.raises(TypeError):
4142
# this has unimplemented abstract methods and should fail with TypeError
42-
MyMotor('name')
43+
MyMotor("name")
4344

4445
MyMotor = stub_model(MyMotor)
45-
MyMotor('name') # this has been stubbed and should now succeed
46+
MyMotor("name") # this has been stubbed and should now succeed

0 commit comments

Comments
 (0)