GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||||||||||||||||||
GeezerVison is showing github.com — feat: allow credentials files to be passed for channel creation by busunkim96 · Pull Request #50 · googleapis/python-api-core
This repository was archived by the owner on Feb 23, 2026. It is now read-only.
Conversation
|
|
|
||
|
|
||
| def create_channel(target, credentials=None, scopes=None, ssl_credentials=None, **kwargs): | ||
| def create_channel(target, credentials=None, scopes=None, ssl_credentials=None, credentials_file=None, **kwargs): |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
I added credentials_file to the end of the list to avoid breaking anyone who is using positional arguments.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Looks good, one style/preference concern with exception raising.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| credentials=mock.sentinel.credentials | ||
| ) | ||
|
|
||
| assert "mutually exclusive" in str(excinfo.value) |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
I'm not a huge fan of checking for explicit strings in exception messages. If it's easy and within the style guides of the repo, I like to make one-off exception types and check for the specific exception type within tests, something like
class DuplicateCredentialArgs(Exception): pass ... with pytest.raises(DuplicateCredentialArgs) as exc: ...
Sorry, something went wrong.
There was an error while loading. Please reload this page.
…hon-api-core into creds-and-scope-overrides
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.