Updated tox for new python versions and added docstring for del_cam.

This commit is contained in:
Josh Miklos
2022-11-05 22:30:01 -07:00
parent 8f9ae47533
commit 925053b11b
2 changed files with 6 additions and 3 deletions

View File

@ -50,12 +50,15 @@ def stop_cam(cam_id: Union[int, str]):
if str(cam_id) in CV_CAM_HANDLERS_DICT:
CV_CAM_HANDLERS_DICT[str(cam_id)].cmd_pub.publish("quit", blocking=True)
def del_cam(cam_id: Union[int, str]):
"""Delete camera "cam_id"."""
if str(cam_id) in CV_CAMS_DICT:
del CV_CAMS_DICT[str(cam_id)]
if str(cam_id) in CV_CAM_HANDLERS_DICT:
del CV_CAM_HANDLERS_DICT[str(cam_id)]
def cam_cmd_sub(cam_id, blocking=True):
"""Get a command subscriber for registered camera "cam_id"."""
if blocking:

View File

@ -1,13 +1,13 @@
[tox]
envlist = py36, py37, mypy, pydocstyle
envlist = py37, py38, mypy, pydocstyle
isolated_build = false
skip_missing_interpreters = true
skipsdist=True
[gh-actions]
python =
3.6: py36, pydocstyle
3.7: py37, mypy, pydocstyle
3.7: py37, pydocstyle
3.8: py38, mypy, pydocstyle
[testenv]
whitelist_externals = coverage