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

feat: add type hints to methods #157

Closed

Description

@darwinyip

Having typings in the library would help and saw that there is a PR opened for that. However, the documentation is somewhat lacking.

It is hard to tell what the methods return and are all the parameters while looking at the docs https://googleapis.dev/python/bigquery/latest/generated/google.cloud.bigquery.client.Client.html

For example, in the tutorial: what is the difference between these 2 table objects created?

table = bigquery.Table(table_id, schema=schema)
table = client.create_table(table)  # Make an API request.

Activity

  1. HemangChothani commented on Jul 8, 2020

    @HemangChothani
    Contributor

    @darwinyip Description of the following statements:

     table = bigquery.Table(table_id, schema=schema)   
    # This statement creates a table class object locally which you need pass to `create_table` method to create your table 
    
    table = client.create_table(table)
    # This statement sent a request to the server to create a table in BigQuery database and return the table object with it's properties and information
    
    Example:
    table.created   # it gives the datetime of table creation
    table.etag  # gives the Etag of table
    table.num_rows  # gives the number of rows in table
    table.full_table_id  # full id of table including project and dataset.
    
  2. HemangChothani commented on Aug 19, 2020

    @HemangChothani
    Contributor

    @darwinyip Did above explanation helped you?

  3. darwinyip commented on Aug 19, 2020

    @darwinyip
    Author

    @HemangChothani Yes it did. Thank you. However main issue I am raising is the lack of documentation around it.

  4. HemangChothani commented on Aug 24, 2020

    @HemangChothani
    Contributor

    @darwinyip Is you concern related to type hints, types to method params.

  5. changed the title [-]Documentation on return types[/-] [+]feat: add type hints to methods[/+] on Dec 9, 2020
  6. HemangChothani commented on Dec 18, 2020

    @HemangChothani
    Contributor

    Should i mention return type of all the public methods of all the classes?

    Edit: Should we include pytype nox.py file to check type hints and return type as included in firestore

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

api: bigqueryIssues related to the googleapis/python-bigquery API.type: docsImprovement to the documentation for an API.

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions