Conversation
…ndas-gbq` in ua.
There was a problem hiding this comment.
Code Review
This pull request updates the BigQuery client to include the google-cloud-bigquery version as a legacy identifier in the user agent string for to_dataframe and to_arrow operations, and adds corresponding unit tests. The review feedback suggests aliasing the imported version module to bq_version to avoid potential shadowing conflicts, and removing redundant local imports of the sys module within several test functions in test_table.py.
| _versions_helpers, | ||
| enums, | ||
| job, | ||
| version, |
There was a problem hiding this comment.
|
|
||
| # Track the google-cloud-bigquery version as "legacy" because this code | ||
| # path is intended to be migrated to pandas-gbq itself. | ||
| user_agent = f"legacy-gcb/{version.__version__} {pandas_user_agent}" |
| import sys | ||
|
|
||
| import google.auth.credentials |
There was a problem hiding this comment.
According to the general rules, do not import modules inside functions if they are already imported at the module level. Since sys is already imported at the module level of this file, this local import is redundant and can be removed.
| import sys | |
| import google.auth.credentials | |
| import google.auth.credentials |
References
- Do not import modules or classes inside functions if they are already imported at the module level.
| import sys | ||
|
|
||
| import google.auth.credentials |
There was a problem hiding this comment.
According to the general rules, do not import modules inside functions if they are already imported at the module level. Since sys is already imported at the module level of this file, this local import is redundant and can be removed.
| import sys | |
| import google.auth.credentials | |
| import google.auth.credentials |
References
- Do not import modules or classes inside functions if they are already imported at the module level.
| import sys | ||
|
|
||
| import google.auth.credentials |
There was a problem hiding this comment.
According to the general rules, do not import modules inside functions if they are already imported at the module level. Since sys is already imported at the module level of this file, this local import is redundant and can be removed.
| import sys | |
| import google.auth.credentials | |
| import google.auth.credentials |
References
- Do not import modules or classes inside functions if they are already imported at the module level.
| import sys | ||
|
|
||
| import google.auth.credentials |
There was a problem hiding this comment.
According to the general rules, do not import modules inside functions if they are already imported at the module level. Since sys is already imported at the module level of this file, this local import is redundant and can be removed.
| import sys | |
| import google.auth.credentials | |
| import google.auth.credentials |
References
- Do not import modules or classes inside functions if they are already imported at the module level.
For internal issue b/540939659 and a follow-up to #18364
🦕