Uh oh!
There was an error while loading. Please reload this page.
Fix docs datastore examples - #2039
Conversation
| if element.docstring: | ||
| if not isinstance(element, pdoc.Class) and element.cls: | ||
| cls = element.cls.cls | ||
| clas = element.cls.cls |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
dhermes
commented
Aug 1, 2016
We have until now curated all the |
daspecster
commented
Aug 1, 2016
I agree with you there. That's probably a bigger topic than this PR though. |
dhermes
commented
Aug 1, 2016
Slowly bringing the two approaches in sync would've been the right move. There is a way (one that is employed by |
I'm not really following I guess. Creates RST files with the autodoc directives in them. I guess you could grab the module references from that? But that's not a huge win in this case I don't think? I could be wrong or missing something though. |
dhermes
commented
Aug 1, 2016
The point is that in that regime we don't care what is in the RST files. Using |
Basically instead of |
dhermes
commented
Aug 1, 2016
I'm not referring to your handrolled solution, so |
daspecster
commented
Aug 2, 2016
The In anycase, I moved the example code to |
dhermes
commented
Aug 2, 2016
That sounds fine, we should have an issue for this discussion. Your docstring changes seem fine, how should I vet the docgen stuff in |
daspecster
commented
Aug 2, 2016
Sure, although I made #2043 to talk about what I think you were saying before. |
dhermes
commented
Aug 2, 2016
Thanks |
9101b26 to
72e5823Comparedaspecster
commented
Aug 15, 2016
@dhermes, I didn't delete the docs from connection.py. I thought it would be good to leave it for now. Otherwise I think I got the other issues you mentioned. |
3dc290f to
75baf31Compare| # Hack for old-style classes | ||
| if str(cls)[0] != '<': | ||
| cls = '<class \'' + str(cls) + '\'>' | ||
| if str(klass)[0] != '<': |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
| from verify_included_modules import get_public_modules | ||
| docstring_test_parser = doctest.DocTestParser() |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
tseaver
commented
Aug 17, 2016
LGTM FWIW |
| example_str += '%s' % (example.source,) | ||
| example_str += '%s' % (example.want,) | ||
| return example_str.replace('<', '<').replace('>', '>') |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Pull examples with doctest and exit less early for Method parsing. Move example docstring from connection.py->client.py Change clas to klass.
588f301 to
ac356dfComparedhermes
commented
Aug 17, 2016
LGTM. @daspecster on future PRs can you hold off on squashing until the PR is ready to merge? It makes it a lot harder to verify which fixes have been made during code review. |
daspecster
commented
Aug 17, 2016
@dhermes ah ok good point! Thanks! |
daspecster
commented
Aug 17, 2016
@tseaver I missed your |
tseaver
commented
Aug 17, 2016
@daspecster Nope, I was mistaken: |
dhermes
commented
Aug 17, 2016
Yup. |
Co-authored-by: Anthonios Partheniou <partheniou@google.com>
Adds a function `determine_requested_streams()` to compare `preserve_order` and the new argument `max_stream_count` to determine how many streams to request. ``` preserve_order (bool): Whether to preserve the order of streams. If True, this limits the number of streams to one (more than one cannot guarantee order). max_stream_count (Union[int, None]]): The maximum number of streams allowed. Must be a non-negative number or None, where None indicates the value is unset. If `max_stream_count` is set, it overrides `preserve_order`. ``` Fixes#2030 🦕
Fixes#2037.
This is a partial fix for the datastore docstring issue.
The original issue was actually, in part, due to the examples being in the datastore.Connection class. Sphinx put them all on one page for some reason.