Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
ruffonce the minimum python version is raised inpyproject.toml.Andreas Lauser <andreas.lauser@mercedes-benz.com>, on behalf of MBition GmbH.
Provider Information