Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

feat: add type hint for public methods#445

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Closed

Conversation

@HemangChothani
Copy link
Contributor

Fixes#157

@HemangChothaniHemangChothani requested review froma team andtswastDecember 22, 2020 08:02
@google-clagoogle-clabot added the cla: yesThis human has signed the Contributor License Agreement. labelDec 22, 2020
@product-auto-labelproduct-auto-labelbot added the api: bigqueryIssues related to the googleapis/python-bigquery API. labelDec 22, 2020
google/cloud/bigquery_v2/
output = .pytype/
# Workaround for https://github.com/google/pytype/issues/150
disable = pyi-error
Copy link
ContributorAuthor

@HemangChothaniHemangChothaniDec 22, 2020
edited
Loading

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.

Copy link
Contributor

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?

@HemangChothaniHemangChothani requested a review froma team as acode ownerDecember 22, 2020 10:23
@HemangChothaniHemangChothani requested review frombusunkim96 and removed request fora teamDecember 22, 2020 10:23
@HemangChothaniHemangChothani added the kokoro:force-runAdd this label to force Kokoro to re-run the tests. labelDec 22, 2020
@yoshi-kokoroyoshi-kokoro removed the kokoro:force-runAdd this label to force Kokoro to re-run the tests. labelDec 22, 2020
Copy link
Contributor

@tswasttswast left a 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.

fromgoogle.cloud.bigquery.tableimportTableReference
fromgoogle.cloud.bigquery.tableimportRowIterator

# Types needed only for Type Hints
Copy link
Contributor

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.

max_creation_time=None,
):
project:str=None,
parent_job:Union[_AsyncJob,str]=None,
Copy link
Contributor

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 putQueryJob here and avoid the use of a private type.

table:Union[Table,TableReference,str],
rows:Union[Sequence[Tuple],Sequence[Dict]],
selected_fields:Sequence[SchemaField]=None,
**kwargs:dict,
Copy link
Contributor

Choose a reason for hiding this comment

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

Whydict here andDict below?

permissions:Sequence[str],
retry:retries.Retry=DEFAULT_RETRY,
timeout:float=None,
):
Copy link
Contributor

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 idDict

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

@plamut
Copy link
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).

@plamutplamut mentioned this pull requestApr 15, 2021
4 tasks
@plamut
Copy link
Contributor

plamut commentedApr 15, 2021
edited
Loading

Superseded by#613.

(will also address the comments there)

@plamutplamut closed thisApr 15, 2021
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@tswasttswasttswast left review comments

@busunkim96busunkim96Awaiting requested review from busunkim96

Assignees

No one assigned

Labels

api: bigqueryIssues related to the googleapis/python-bigquery API.cla: yesThis 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

4 participants

@HemangChothani@plamut@tswast@yoshi-kokoro

[8]ページ先頭

©2009-2025 Movatter.jp