fix: remove unnecessary global variable definition #907
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
A new rule in flake8 (F824) has caused our lint test to fail with the following error message, because we defined a global variable in some methods, but we didn't assign any value to them. In this case, you can access the global variable directly so it's unnecessary to define it.
Example log: https://github.com/googleapis/python-bigquery-pandas/actions/runs/14229816667/job/39877861461?pr=899
Note: We do change values of some fields to global
context
, but we do so by accessing its property, andcontext
was not reassigned, so F824 still applies here.