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

refactor observer #58

Merged
merged 4 commits into from
May 6, 2024
Merged

refactor observer #58

merged 4 commits into from
May 6, 2024

Conversation

cctdaniel
Copy link
Contributor

@cctdaniel cctdaniel commented May 6, 2024

Comment on lines 97 to 108
# Handle potential None for min_publishers
if (
price_account.min_publishers is None
or price_account.min_publishers >= 10
):
continue

# Ensure latest_block_slot is not None or provide a default value
latest_block_slot = (
price_account.slot if price_account.slot is not None else -1
)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is to fix pyright errors

@@ -59,6 +57,9 @@ async def send(self):
source_type_name="my_apps",
)

# Cast the event to EventCreateRequest explicitly because pyright complains that the previous line returns UnparsedObject | Unknown | None
event = cast(EventCreateRequest, event)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So strange of pyright 🤔

@cctdaniel cctdaniel merged commit 195e81a into main May 6, 2024
3 checks passed
@cctdaniel cctdaniel deleted the refactor branch May 6, 2024 14:59
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