mirror of
https://github.com/pikvm/ustreamer.git
synced 2026-04-11 09:06:13 +00:00
new style typing
This commit is contained in:
@@ -1,14 +1,12 @@
|
|||||||
import os
|
import os
|
||||||
|
|
||||||
from typing import List
|
|
||||||
|
|
||||||
from setuptools import Extension
|
from setuptools import Extension
|
||||||
from setuptools import setup
|
from setuptools import setup
|
||||||
|
|
||||||
|
|
||||||
# =====
|
# =====
|
||||||
def _find_sources(suffix: str) -> List[str]:
|
def _find_sources(suffix: str) -> list[str]:
|
||||||
sources: List[str] = []
|
sources: list[str] = []
|
||||||
for (root_path, _, names) in os.walk("src"):
|
for (root_path, _, names) in os.walk("src"):
|
||||||
for name in names:
|
for name in names:
|
||||||
if name.endswith(suffix):
|
if name.endswith(suffix):
|
||||||
|
|||||||
@@ -26,13 +26,11 @@ import os
|
|||||||
import io
|
import io
|
||||||
import struct
|
import struct
|
||||||
|
|
||||||
from typing import Tuple
|
|
||||||
|
|
||||||
import common
|
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
|
# https://sheep.horse/2013/9/finding_the_dimensions_of_a_jpeg_file_in_python.html
|
||||||
|
|
||||||
stream = io.BytesIO(data)
|
stream = io.BytesIO(data)
|
||||||
|
|||||||
Reference in New Issue
Block a user