blakeblackshear.frigate/frigate
Martin Weinelt 4d4d54d030
Fix various typing issues (#18187)
* Fix the `Any` typing hint treewide

There has been confusion between the Any type[1] and the any function[2]
in typing hints.

[1] https://docs.python.org/3/library/typing.html#typing.Any
[2] https://docs.python.org/3/library/functions.html#any

* Fix typing for various frame_shape members

Frame shapes are most likely defined by height and width, so a single int
cannot express that.

* Wrap gpu stats functions in Optional[]

These can return `None`, so they need to be `Type | None`, which is what
`Optional` expresses very nicely.

* Fix return type in get_latest_segment_datetime

Returns a datetime object, not an integer.

* Make the return type of FrameManager.write optional

This is necessary since the SharedMemoryFrameManager.write function can
return None.

* Fix total_seconds() return type in get_tz_modifiers

The function returns a float, not an int.

https://docs.python.org/3/library/datetime.html#datetime.timedelta.total_seconds

* Account for floating point results in to_relative_box

Because the function uses division the return types may either be int or
float.

* Resolve ruff deprecation warning

The config has been split into formatter and linter, and the global
options are deprecated.
2025-05-13 08:27:20 -06:00
..
api Fix various typing issues (#18187) 2025-05-13 08:27:20 -06:00
camera Fix various typing issues (#18187) 2025-05-13 08:27:20 -06:00
comms Fix various typing issues (#18187) 2025-05-13 08:27:20 -06:00
config Fixes (#18055) 2025-05-05 20:42:24 -06:00
data_processing Fix various typing issues (#18187) 2025-05-13 08:27:20 -06:00
db Improve face recognition (#15205) 2025-02-08 12:47:01 -06:00
detectors Fix various typing issues (#18187) 2025-05-13 08:27:20 -06:00
embeddings Fix various typing issues (#18187) 2025-05-13 08:27:20 -06:00
events Fix various typing issues (#18187) 2025-05-13 08:27:20 -06:00
genai Catch crash when openai compatible endpoints don't return results correctly (#17572) 2025-04-07 06:59:39 -06:00
images Replace green screen with error message and force camera_fps to 0 (#4544) 2022-11-28 21:47:20 -06:00
motion Various fixes (#17342) 2025-03-24 12:25:36 -05:00
object_detection Fix video MP typing (#17880) 2025-04-23 17:59:02 -06:00
output Fix various typing issues (#18187) 2025-05-13 08:27:20 -06:00
ptz Fix various typing issues (#18187) 2025-05-13 08:27:20 -06:00
record Fix various typing issues (#18187) 2025-05-13 08:27:20 -06:00
review Fix various typing issues (#18187) 2025-05-13 08:27:20 -06:00
service_manager Add metrics page for embeddings and face / license plate processing times (#15818) 2025-02-08 12:47:01 -06:00
stats Fix various typing issues (#18187) 2025-05-13 08:27:20 -06:00
test Autotracking improvements (#17955) 2025-04-29 10:17:56 -06:00
track Fix various typing issues (#18187) 2025-05-13 08:27:20 -06:00
util Fix various typing issues (#18187) 2025-05-13 08:27:20 -06:00
__init__.py
__main__.py Generalize postprocessing (#15931) 2025-02-08 12:47:01 -06:00
app.py Refactor async ONVIF (#18093) 2025-05-07 07:53:29 -06:00
const.py Lower timeout in object processing (#17970) 2025-04-30 07:42:53 -06:00
ffmpeg_presets.py Increase ffmpeg timeout to 10 seconds (#17831) 2025-04-21 07:38:51 -05:00
log.py Update base image (#15103) 2025-02-08 12:47:01 -06:00
models.py Review items per user (#17137) 2025-03-13 14:20:09 -06:00
mypy.ini Add metrics page for embeddings and face / license plate processing times (#15818) 2025-02-08 12:47:01 -06:00
plus.py Add ability to update Frigate+ model to latest from UI (#17324) 2025-03-24 09:19:58 -06:00
storage.py Cap storage bandwidth (#15473) 2024-12-12 14:46:00 -06:00
timeline.py Fix various typing issues (#18187) 2025-05-13 08:27:20 -06:00
types.py Add face and lpr to tracked object update topic (#17940) 2025-04-28 16:43:03 -06:00
video.py Fix various typing issues (#18187) 2025-05-13 08:27:20 -06:00
watchdog.py Improve async object detector support (#17712) 2025-04-15 08:55:38 -05:00