GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — feat: add type hint for public methods by HemangChothani · Pull Request #445 · googleapis/python-bigquery

This repository was archived by the owner on Mar 6, 2026. It is now read-only.

Conversation

@HemangChothani

@HemangChothani HemangChothani commented Dec 22, 2020

Copy link
Copy Markdown
Contributor

Fixes #157

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@HemangChothani
feat: add type hint for public methods
63c9cd3
@HemangChothani
HemangChothani requested review from a team and tswast December 22, 2020 08:02
@google-cla google-cla Bot added the cla: yes This human has signed the Contributor License Agreement. label Dec 22, 2020
@product-auto-label product-auto-label Bot added the api: bigquery Issues related to the googleapis/python-bigquery API. label Dec 22, 2020
HemangChothani
HemangChothani commented Dec 22, 2020
View reviewed changes
Comment thread setup.cfg
google/cloud/bigquery_v2/
output = .pytype/
# Workaround for https://github.com/google/pytype/issues/150
disable = pyi-error No newline at end of file

@HemangChothani HemangChothani Dec 22, 2020 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This file is synthtool generated so changes are not allowed here, but for the reference and pass current tests changed the current file.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@tswast tswast Jan 8, 2021

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

google/pytype#150 is marked as closed. Can you provide a little more context as to why this is needed?

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@HemangChothani
feat: add bigquery-storage in requirement file
ee8e76d
@HemangChothani
HemangChothani requested a review from a team as a code owner December 22, 2020 10:23
@HemangChothani
HemangChothani requested review from busunkim96 and removed request for a team December 22, 2020 10:23
@HemangChothani HemangChothani added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Dec 22, 2020
@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Dec 22, 2020
@HemangChothani
feat: add pandas in requirement file
c1452be
tswast
tswast reviewed Dec 22, 2020
View reviewed changes
Comment thread google/cloud/bigquery/client.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

tswast
tswast reviewed Dec 22, 2020
View reviewed changes
Comment thread google/cloud/bigquery/client.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

HemangChothani added 2 commits December 24, 2020 21:28
@HemangChothani
feat: add return type hint
40910a0
@HemangChothani
feat: remove pandas import as a string
fba20f6
tswast
tswast reviewed Jan 8, 2021
View reviewed changes

@tswast tswast left a comment

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking good, thanks! A few questions.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread google/cloud/bigquery/client.py
from google.cloud.bigquery.table import TableReference
from google.cloud.bigquery.table import RowIterator

# Types needed only for Type Hints

@tswast tswast Jan 8, 2021

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't see any reason to keep these in a separate location from the other imports. Let's put them in their respective groups.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread google/cloud/bigquery/client.py
max_creation_time=None,
):
project: str = None,
parent_job: Union[_AsyncJob, str] = None,

@tswast tswast Jan 8, 2021

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

parent_job is only relevant for queries, so I think we can put QueryJob here and avoid the use of a private type.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread google/cloud/bigquery/client.py
table: Union[Table, TableReference, str],
rows: Union[Sequence[Tuple], Sequence[Dict]],
selected_fields: Sequence[SchemaField] = None,
**kwargs: dict,

@tswast tswast Jan 8, 2021

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why dict here and Dict below?

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread google/cloud/bigquery/client.py
permissions: Sequence[str],
retry: retries.Retry = DEFAULT_RETRY,
timeout: float = None,
):

@tswast tswast Jan 8, 2021

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking at the system tests, I believe the output for this method id Dict

python-bigquery/tests/system.py

Line 1645 in dbc68b3

self.assertEqual(set(response["permissions"]), set(permissions))

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@plamut

plamut commented Jan 21, 2021

Copy link
Copy Markdown
Contributor

Bump, just checking the status of this?

Generally speaking, though, type hints would be welcome, even though static type checks have not been added to Kokoro (yet).

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@plamut plamut mentioned this pull request Apr 15, 2021
feat: add type hints for public methods #613
Merged
4 tasks done
@plamut

plamut commented Apr 15, 2021 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

Superseded by #613.

(will also address the comments there)

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@plamut plamut closed this Apr 15, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Reviewers

@busunkim96 busunkim96 Awaiting requested review from busunkim96
1 more reviewer
@tswast tswast tswast left review comments
Reviewers whose approvals may not affect merge requirements

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

api: bigquery Issues related to the googleapis/python-bigquery API. cla: yes This human has signed the Contributor License Agreement.

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

feat: add type hints to methods

Uh oh!

There was an error while loading. Please reload this page.

4 participants

@HemangChothani @plamut @tswast @yoshi-kokoro
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.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.