8000 Wrong type annotation in workbook.refresh · Issue #1318 · tableau/server-client-python · GitHub
[go: up one dir, main page]

Skip to content

Wrong type annotation in workbook.refresh #1318

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

Closed
pes-magic opened this issue Nov 13, 2023 · 2 comments
Closed

Wrong type annotation in workbook.refresh #1318

pes-magic opened this issue Nov 13, 2023 · 2 comments

Comments

@pes-magic
Copy link
Contributor

Describe the bug
workbooks.refresh is implemented to receive workbook_id as a string type argument, but it can actually receive WorkbookItem as well. The documentation also states that it receives workbook_item.

Implementation: https://github.com/tableau/server-client-python/blob/master/tableauserverclient/server/endpoint/workbooks_endpoint.py#L91
Documentation: https://tableau.github.io/server-client-python/docs/api-ref#workbooksrefresh

Versions

  • TSC 0.28

To Reproduce
Nothing to do

Results
Static code analysis displays false warnings

pes-magic added a commit to pes-magic/server-client-python that referenced this issue Nov 13, 2023
`workbook.refresh` is implemented to accept both `WorkbookItem`
and `str` as arguments, but the type annotation describes it as
receiving `str`, which can cause false warnings in static analysis.

Since the documentation states that it receives `workbook_item`,
the name of the argument is also changed from `workbook_id` to
`workbook_item`.

Issue: tableau#1318
@jorwoods
Copy link
Contributor

@pes-magic Can you mark this as closed by #1319?

@pes-magic
Copy link
Contributor Author

Sure, thank you for reminding me

gconklin pushed a commit to gconklin/tableauserverclient that referenced this issue May 28, 2024
`workbook.refresh` is implemented to accept both `WorkbookItem`
and `str` as arguments, but the type annotation describes it as
receiving `str`, which can cause false warnings in static analysis.

Since the documentation states that it receives `workbook_item`,
the name of the argument is also changed from `workbook_id` to
`workbook_item`.

Issue: tableau#1318
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

No branches or pull requests

2 participants
0