Skip to content

Pr 742 fixes#1

Merged
erzoe merged 3 commits intoerzoe:dev-logreaderfrom
andlaus:pr_742_fix
Aug 9, 2025
Merged

Pr 742 fixes#1
erzoe merged 3 commits intoerzoe:dev-logreaderfrom
andlaus:pr_742_fix

Conversation

@andlaus
Copy link
Copy Markdown

@andlaus andlaus commented Jul 30, 2025

this removes the freezegun dependency from the logreader unit test and converts the type hints of the logreader functionality to the old-style syntax.

note that this makes the logreader unit test slightly less comprehensive because it now does not check if the correct local time zone is used if no time zone is passed to the parser, but since this bit of functionality is fairly trivial, IMO we can simply trust that it works correctly.

regarding the old-style type hints: although python 3.9 support currently is on limited time because 3.9 it is close to its upstream EOL, we should still support type hints on all supported python versions. Also, converting old-school to new-school type hints can be done automatically using ruff once the minimum python version is raised in pyproject.toml.

Andreas Lauser <andreas.lauser@mercedes-benz.com>, on behalf of MBition GmbH.
Provider Information

andlaus added 2 commits July 30, 2025 11:28
this makes the logreader unit test slightly less comprehensive because
it now does not check if the correct local time zone is used if no
time zone is passed to the parser, but since this bit of functionality
is fairly trivial, IMO we can simply trust that it works correctly.

Signed-off-by: Andreas Lauser <andreas.lauser@mercedes-benz.com>
Approved-by: Gerrit Ecke <gerrit.ecke@mercedes-benz.com>
this makes type hints functional when using python 3.9.

(python 3.9 support currently is on limited time because 3.9 it is
close to its upstream EOL, but converting old-school to new-school
type hints can be done automatically by ruff once the minimum python
version is raised in `pyproject.toml`...)

Signed-off-by: Andreas Lauser <andreas.lauser@mercedes-benz.com>
this makes the test slightly more comprehensive again. IMO this is
acceptable because I missed the fact that the freezgun is only a
dependency for running the unit tests, not for normal operation.

Signed-off-by: Andreas Lauser <andreas.lauser@mercedes-benz.com>
@erzoe erzoe merged commit 288f885 into erzoe:dev-logreader Aug 9, 2025
4 of 19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants