Skip to content
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 datetime timezone reference and improve asynchronous handling #44

Merged
merged 2 commits into from
Sep 8, 2024

Conversation

CharlesCNorton
Copy link
Contributor

Summary:
This pull request addresses a few minor issues and improvements in the Elia class implementation for the chat application.

Changes:

  1. Fixed datetime timezone reference:

    • Corrected datetime.UTC to datetime.timezone.utc to ensure the proper timezone is used for timestamps.
  2. Improved asynchronous handling:

    • Added await to push_screen and pop_screen methods to maintain asynchronous behavior and ensure that screens are handled correctly within the app's lifecycle.
  3. Code clarity and formatting:

    • Made minor formatting adjustments and improved comments for better readability and maintainability.

Impact:

  • These changes ensure accurate timezone handling, improve the app's asynchronous behavior, and enhance code clarity for future maintenance.

Please review the changes and provide feedback. Thank you!

- Corrected datetime.UTC to datetime.timezone.utc for accurate timezone reference
- Ensured use of 'await' with 'push_screen' and 'pop_screen' methods for proper async behavior
- Improved formatting and comments for clarity and readability
- Ensured proper handling of asynchronous functions within Click commands using `asyncio.run()`
- Added missing imports and components to maintain full functionality
- Verified correct use of `asyncio.run()` to avoid potential blocking issues in the event loop
- Enhanced code clarity and maintainability
@darrenburns darrenburns merged commit 6bbd438 into darrenburns:main Sep 8, 2024
@darrenburns
Copy link
Owner

thanks!

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