Skip to content
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Tables] Make credential parameter keyword-only #19117

Merged
merged 2 commits into from
Jun 5, 2021

Conversation

annatisch
Copy link
Member

No description provided.

@ghost ghost added the Tables label Jun 4, 2021
@annatisch annatisch requested a review from seankane-msft June 4, 2021 20:17
@annatisch
Copy link
Member Author

/azp run python - tables - tests

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@@ -65,7 +65,7 @@ async def delete_entity(self):
from azure.core.credentials import AzureNamedKeyCredential

credential = AzureNamedKeyCredential(self.account_name, self.access_key)
table_client = TableClient(endpoint=self.endpoint, credential=credential, table_name=self.table_name)
table_client = TableClient(endpoint=self.endpoint, table_name=self.table_name, credential=credential)
Copy link
Member

Choose a reason for hiding this comment

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

nit: does this have to be the last keyword?

Copy link
Member Author

Choose a reason for hiding this comment

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

It doesn't, but given the endpoint, table_name are the two positional parameters - I thought for the samples it would be best to demonstrate the correct order. I didn't bother swapping them in the tests ;)

@@ -36,7 +36,7 @@ class StorageTableTest(AzureTestCase, TableTestCase):
def test_create_properties(self, tables_storage_account_name, tables_primary_storage_account_key):
# # Arrange
account_url = self.account_url(tables_storage_account_name, "table")
ts = self.create_client_from_credential(TableServiceClient, tables_primary_storage_account_key, endpoint=account_url)
ts = TableServiceClient(credential=tables_primary_storage_account_key, endpoint=account_url)
Copy link
Member

Choose a reason for hiding this comment

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

If this passes I'd keep it for now, but you can also change it to credential=tables_primary_storage_account_key. Small nit

Copy link
Member

@seankane-msft seankane-msft left a comment

Choose a reason for hiding this comment

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

small nits

@annatisch annatisch marked this pull request as ready for review June 4, 2021 21:56
@annatisch annatisch merged commit 996c680 into Azure:master Jun 5, 2021
azure-sdk pushed a commit to azure-sdk/azure-sdk-for-python that referenced this pull request Jun 9, 2022
Support.json Get Support Ticket serviceId + ProbClassId filter changes (Azure#19117)

* Support.json Get Support Ticket serviceId + ProbClassId filter changes

* Add list tickets service + probClassId examples

* Reference example files in support.json

* List Support tickets example files formatting

* Service Id problem class id example prettier format fix
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants