Skip to content

fix: add warnings for duplicated or conflicting type hints in bigfram… #1956

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

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

jialuoo
Copy link
Contributor

@jialuoo jialuoo commented Jul 30, 2025

Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly:

  • Make sure to open an issue as a bug/issue before writing your code! That way we can discuss the change, evaluate designs, and agree on the general idea
  • Ensure the tests and linter pass
  • Code coverage does not decrease (if any source code was changed)
  • Appropriate docs were updated (if necessary)

Fixes b/409565963.

@product-auto-label product-auto-label bot added size: m Pull request size is medium. api: bigquery Issues related to the googleapis/python-bigquery-dataframes API. labels Jul 30, 2025
@jialuoo jialuoo requested a review from TrevorBergeron August 5, 2025 17:50
@jialuoo jialuoo marked this pull request as ready for review August 5, 2025 17:50
@jialuoo jialuoo requested review from a team as code owners August 5, 2025 17:50
@TrevorBergeron
Copy link
Contributor

Maybe we should just warn if the decorator actually conflicts with the signature?

@jialuoo
Copy link
Contributor Author

jialuoo commented Aug 5, 2025

Maybe we should just warn if the decorator actually conflicts with the signature?

I considered that. While warning only on a signature conflict is an option, I'm concerned about the risk of users defining type hints in both the decorator and the function signature. Since this is just a warning and won't fail the execution, I lean toward warning users about any duplicated type hints too. What do you think?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: bigquery Issues related to the googleapis/python-bigquery-dataframes API. size: m Pull request size is medium.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants