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

some TextToSpeechAsyncClient methods return Any type #12400

Open
AutonomousCat opened this issue Mar 2, 2024 · 6 comments
Open

some TextToSpeechAsyncClient methods return Any type #12400

AutonomousCat opened this issue Mar 2, 2024 · 6 comments
Labels
api: pubsub Issues related to the Pub/Sub API. priority: p2 Moderately-important priority. Fix may not be included in next release. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.

Comments

@AutonomousCat
Copy link

for example

(method) def from_service_account_file(
    filename: str,
    *args: Unknown,
    **kwargs: Unknown
) -> Any

Which leads to issues later, such as lack of syntax hinting when using tts_client.synthesize_speech()

@product-auto-label product-auto-label bot added the api: pubsub Issues related to the Pub/Sub API. label Mar 2, 2024
@mukund-ananthu
Copy link

Could you please provide more context on where you find this issue? More specifically, how this issue is related to the python-pubsub repository.

@parthea parthea transferred this issue from googleapis/python-pubsub Mar 5, 2024
@parthea
Copy link
Contributor

parthea commented Mar 5, 2024

I'm going to transfer this issue to google-cloud-python which has the source code for google-cloud-texttospeech https://github.com/googleapis/google-cloud-python/tree/main/packages/google-cloud-texttospeech

@mukund-ananthu
Copy link

Thanks @parthea . I am removing the api:pubsub label from the issue accordingly.

@AutonomousCat
Copy link
Author

Oh, I swear I saw an issue on this repo that said it's no longer maintained, and it pointed to that other repo. Maybe I didn't get all the context

@parthea
Copy link
Contributor

parthea commented Mar 6, 2024

Oh, I swear I saw an issue on this repo that said it's no longer maintained, and it pointed to that other repo. Maybe I didn't get all the context

I apologize for the confusing bug reporting guidance @AutonomousCat. #12363 is related to that issue and it will be fixed soon (https://github.com/googleapis/google-cloud-python/blob/main/.github/ISSUE_TEMPLATE/bug_report.md)

@parthea parthea added type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns. priority: p2 Moderately-important priority. Fix may not be included in next release. labels Mar 6, 2024
@parthea
Copy link
Contributor

parthea commented Mar 6, 2024

Code from #12400 (comment) that should be updated with type hints.

def from_service_account_file(cls, filename: str, *args, **kwargs):
"""Creates an instance of this client using the provided credentials
file.
Args:
filename (str): The path to the service account private key json
file.
args: Additional arguments to pass to the constructor.
kwargs: Additional arguments to pass to the constructor.
Returns:
TextToSpeechAsyncClient: The constructed client.
"""
return TextToSpeechClient.from_service_account_file.__func__(TextToSpeechAsyncClient, filename, *args, **kwargs) # type: ignore

Related to #10540

@AutonomousCat AutonomousCat changed the title some TextToSpeechAsyncClient methods an Any return type some TextToSpeechAsyncClient methods return Any type Mar 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: pubsub Issues related to the Pub/Sub API. priority: p2 Moderately-important priority. Fix may not be included in next release. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Projects
None yet
Development

No branches or pull requests

3 participants