-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Addresses warnings surfaced during p5 doc and API-view generation. #13069
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
Addresses warnings surfaced during p5 doc and API-view generation. #13069
Conversation
KieranBrantnerMagee
commented
Aug 12, 2020
- Removes localization from URIs,
- adds tons of type hints,
- normalizes return types,
- begins propagating class docstring into init docstring per guidelines.
…moves localization from URIs, adds tons of type hints, normalizes return types, begins propogating class docstring into init docstring per guidelines.
Add initial link for forever-receive refdocs inside readme.
sdk/servicebus/azure-servicebus/azure/servicebus/_common/message.py
Outdated
Show resolved
Hide resolved
|
/azp run python - servicebus - tests |
|
Azure Pipelines successfully started running 1 pipeline(s). |
sdk/servicebus/azure-servicebus/azure/servicebus/_common/auto_lock_renewer.py
Show resolved
Hide resolved
sdk/servicebus/azure-servicebus/azure/servicebus/_common/auto_lock_renewer.py
Show resolved
Hide resolved
sdk/servicebus/azure-servicebus/azure/servicebus/_servicebus_receiver.py
Show resolved
Hide resolved
| """Create a ServiceBusSessionReceiver from a connection string. | ||
| :param conn_str: The connection string of a Service Bus. | ||
| :param str conn_str: The connection string of a Service Bus. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nitpick: in some places it's
:param conn_str: The connection string of a Service Bus.
:type conn_str: str
while here it's
:param str conn_str: The connection string of a Service Bus.
we'd better be consistent.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was actually one of the other questions I posed for @annatisch , whether my understanding for our decision tree in using those was accurate; namely: prefer the terse syntax (inline) but if this would become problematic (e.g. complex type, very long signature) utilize next-line.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
conclusion from email: if the former generates line length or formatting issues, fall back to the latter. Don't know if that means we should just always use the latter, I'd be tempted to for consistency but it's just oh so verbose. Any strong feelings?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(my personal preference would be the "inline" as much as possible, for the sake of reducing number of lines🤣)
sdk/servicebus/azure-servicebus/azure/servicebus/aio/_async_auto_lock_renewer.py
Outdated
Show resolved
Hide resolved
Defensive ServiceBusErrors for internal state misalignment. Adjust readme streaming URL to point to proper location. Co-authored-by: Adam Ling (MSFT) <[email protected]>
add samples for streaming iter make receiver a ReceivedMessage param via kwargs and an expressive error to deincentivise use, but still required.
|
/azp run python - servicebus - tests |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
/azp run python - servicebus - tests |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
/azp run python - servicebus - tests |
|
Azure Pipelines successfully started running 1 pipeline(s). |
yunhaoling
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
…ply always pass receiver in kwargs (since it's _receiver_ mixins anyway)
|
/azp run python - servicebus - tests |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
/azp run python - servicebus - tests |
|
Azure Pipelines successfully started running 1 pipeline(s). |