Skip to content

Add default labels to BQUtils#551

Open
svij-sc wants to merge 1 commit intomainfrom
svij/bq-default-labels
Open

Add default labels to BQUtils#551
svij-sc wants to merge 1 commit intomainfrom
svij/bq-default-labels

Conversation

@svij-sc
Copy link
Collaborator

@svij-sc svij-sc commented Mar 19, 2026

Right now you have to pass in labels every time you "run a query".
This makes the code much more verbose than it needs to be and for you to pas around the labels everywhere.

Added ability to just initialize BqUtils with labels and respective tests.


class BqUtils:
def __init__(self, project: Optional[str] = None) -> None:
def __init__(self, project: Optional[str] = None, labels: dict[str, str] = {}) -> None:
Copy link
Collaborator

Choose a reason for hiding this comment

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

nit. labels: Optional[dict[str, str]] = {} since the default variable is mutable.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants