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

Typo in get_devices type hint #22

Closed
le91688 opened this issue Jul 28, 2023 · 0 comments · Fixed by #23
Closed

Typo in get_devices type hint #22

le91688 opened this issue Jul 28, 2023 · 0 comments · Fixed by #23

Comments

@le91688
Copy link
Contributor

le91688 commented Jul 28, 2023

Fix fields parameter type hint in get_devices function

Issue Description:

The fields parameter of the get_devices function in the lariat.py file is currently using the wrong syntax for the type hint. We need to fix the type hint and ensure that mypy does not report any errors for the function.

Current function signature

def get_devices(client: SwaggerClient,
                request_opts: typing.Dict,
                fields=typing.Optional[typing.List[str]]) -> typing.List[Device]:

Correct function signature:

def get_devices(client: SwaggerClient,
                request_opts: typing.Dict,
                fields: typing.Optional[typing.Set[typing.Any]) -> typing.List[Device]:

Mypy is also currently not configured to enforce type hints, so disallow_untyped_defs = True should be added to mypy.ini to catch any future of these issues

@le91688 le91688 linked a pull request Jul 28, 2023 that will close this issue
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 a pull request may close this issue.

1 participant