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

AS3935 Lightning Detector #407

Merged
merged 6 commits into from
Oct 3, 2024
Merged

AS3935 Lightning Detector #407

merged 6 commits into from
Oct 3, 2024

Conversation

mschlenstedt
Copy link
Contributor

Add AS3935 Lightning Detector module.

@mschlenstedt
Copy link
Contributor Author

mschlenstedt commented Sep 27, 2024

Can maybe someone help with the follow mypy errors?

mqtt_io/modules/sensor/as3935.py:229: error: Function is missing a type annotation for one or more arguments  [no-untyped-def]
mqtt_io/modules/sensor/as3935.py:232: error: Returning Any from function declared to return "float"  [no-any-return]

No glue what this means...

@ondras12345
Copy link

ondras12345 commented Sep 28, 2024

Try this:

    def get_value(self, value: str) -> float:
        ret = float(self.data[value])
        return ret

Or this:

    def get_value(self, value: str) -> float:
        return float(self.data[value])

Mypy really does not like it when you reuse the same variable name for different types.

@mschlenstedt
Copy link
Contributor Author

@ondras12345 Thanks!

@BenjiU BenjiU merged commit fc19f77 into flyte:develop Oct 3, 2024
6 checks passed
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.

3 participants