mirror of
https://github.com/pikvm/ustreamer.git
synced 2025-12-23 18:50:00 +00:00
new style typing
This commit is contained in:
parent
fb50eea526
commit
7f620c758f
@ -1,14 +1,12 @@
|
||||
import os
|
||||
|
||||
from typing import List
|
||||
|
||||
from setuptools import Extension
|
||||
from setuptools import setup
|
||||
|
||||
|
||||
# =====
|
||||
def _find_sources(suffix: str) -> List[str]:
|
||||
sources: List[str] = []
|
||||
def _find_sources(suffix: str) -> list[str]:
|
||||
sources: list[str] = []
|
||||
for (root_path, _, names) in os.walk("src"):
|
||||
for name in names:
|
||||
if name.endswith(suffix):
|
||||
|
||||
@ -26,13 +26,11 @@ import os
|
||||
import io
|
||||
import struct
|
||||
|
||||
from typing import Tuple
|
||||
|
||||
import common
|
||||
|
||||
|
||||
# =====
|
||||
def _get_jpeg_size(data: bytes) -> Tuple[int, int]:
|
||||
def _get_jpeg_size(data: bytes) -> tuple[int, int]:
|
||||
# https://sheep.horse/2013/9/finding_the_dimensions_of_a_jpeg_file_in_python.html
|
||||
|
||||
stream = io.BytesIO(data)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user