Skip to content

Commit

Permalink
some cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
mgyucht committed Jul 4, 2024
1 parent a302e80 commit da607ba
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion databricks/sdk/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ def with_product(product: str, product_version: str):

def with_user_agent_extra(key: str, value: str):
"""[INTERNAL API] Add extra metadata to the User-Agent header when developing a library."""
useragent.with_user_agent_extra(key, value)
useragent.with_extra(key, value)


class Config:
Expand Down
4 changes: 2 additions & 2 deletions databricks/sdk/useragent.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ def _reset_product():
_product_version = "0.0.0"


def with_user_agent_extra(key: str, value: str):
def with_extra(key: str, value: str):
"""Add extra metadata to all requests submitted to Databricks.
User-specified extra metadata can be inserted into request headers to provide additional context to Databricks
Expand Down Expand Up @@ -93,7 +93,7 @@ def _reset_extra(extra: List[Tuple[str, str]]):

def with_partner(partner: str):
"""Adds the given partner to the metadata submitted to Databricks on every request."""
with_user_agent_extra("partner", partner)
with_extra("partner", partner)


def _get_upstream_user_agent_info() -> List[Tuple[str, str]]:
Expand Down

0 comments on commit da607ba

Please sign in to comment.