-
-
Notifications
You must be signed in to change notification settings - Fork 762
Add pydantic models for borg 1.x's CLI (#8338) #8343
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
@@ -24,9 +25,15 @@ def __init__(self, msgid=None): | |||
self.id = self.operation_id() | |||
self.msgid = msgid | |||
|
|||
def make_json(self, *, finished=False, **kwargs): | |||
def make_json(self, *, finished=False, override_time: typing.Optional[float] = None, **kwargs): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let me know if you think this new argument is bad. The function is harder to test when it always takes time.time()
.
@ThomasWaldmann I just fixed the Python 3.10 union syntax, hopefully that's the last of it. |
Looks like mypy is unhappy. |
I might have left some Python 3.10-specific things in there, sorry! Will fix them when I have time. Also maybe there are some missing hints. |
This adds pydantic models for borg's CLI outputs (fixes #8338).
Sadly I can't try to run these tests locally; when trying to run tox or
pip install borg
I getOSError: pkg-config probably not installed: FileNotFoundError(2, 'No such file or directory')
.