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

Added autodetection of camera #89

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
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
Adjusted type hints to adhere to cheatsheet
  • Loading branch information
brilam committed Oct 14, 2021
commit ba141d59e9f4b9092409e82f8637dc08452b4e27
6 changes: 3 additions & 3 deletions skunkbooth/utils/frames/settings_frame.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import logging
from gettext import translation
from typing import Any
from typing import Any, List, Tuple

import cv2 as cv
from asciimatics.event import Event, KeyboardEvent
Expand Down Expand Up @@ -61,7 +61,7 @@ def _switchLanguage() -> None:
language._on_change = _switchLanguage
settings_layout.add_widget(language)

def _list_device_ids() -> [int]:
def _list_device_ids() -> List[int]:
"""Returns a list of device IDs."""
is_working = True
dev_port = 0
Expand All @@ -76,7 +76,7 @@ def _list_device_ids() -> [int]:
dev_port += 1
return working_ports

def _make_device_dropdown_list(device_ids: list[int]) -> list(tuple(str, str)):
def _make_device_dropdown_list(device_ids: List[int]) -> List[Tuple[str, str]]:
return list((str(id), str(id)) for id in device_ids)

def _update_device() -> None:
Expand Down