-
-
Notifications
You must be signed in to change notification settings - Fork 30.9k
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
Fix issue when timestamp is None #130133
Fix issue when timestamp is None #130133
Conversation
…g isoformat on it
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.
Avoid multi-line ternary
Please take a look at the requested changes, and use the Ready for review button when you are done, thanks 👍 |
Co-authored-by: epenet <[email protected]>
Co-authored-by: epenet <[email protected]>
@@ -110,6 +99,22 @@ async def archive_package(call: ServiceCall) -> None: | |||
|
|||
await seventeen_coordinator.client.profile.archive_package(tracking_number) | |||
|
|||
def package_to_dict(package): |
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.
Can you add type hints here also?
def package_to_dict(package: xtz) -> dict[str, Any]:
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.
done
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.
LGTM 👍
Co-authored-by: epenet <[email protected]>
Proposed change
Fix issue when timestamp is None. Check first for None before applying isoformat on it
Type of change
Additional information
Checklist
ruff format homeassistant tests
)