This repository has been archived by the owner on Mar 8, 2020. It is now read-only.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Python client v3 (UASTv2) #128
Python client v3 (UASTv2) #128
Changes from all commits
9b5b502
2788a1a
8e39632
d3b6bf9
6ce2b11
7bac87f
8b84e4a
1fa1d0d
9e88733
98b3ef8
96abf64
151e61c
7f583ea
6ba57fc
24fd7b6
a2ca471
e308038
0d675e1
91b798b
acec219
2fd570c
d05770c
272acc9
270445b
1f977e4
20890e0
2c983a9
0bcf223
8401a1c
bd8c2d5
f964c46
ea7d615
1c73766
7cb563a
cd1d90d
a55abc4
d74a514
75170a6
c4fd5be
753efb4
9876503
7098328
7ad8c6f
a2752b7
a99f5be
b983ea2
9e3f415
988eb5e
ba93944
d485273
66ccfed
a020666
9b094aa
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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 is not very Pythonic. IDK if it is hard to guess the type, but the following is more Pythonic:
Where
iterate()
would be an unordered iterator over the resulting values. Or name itresults()
. Or remove it and iterate directly, anyway.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.
Those are typed functions for queries returning boolean/string/integer/float values instead of nodes so the "typed get" is needed when the user doesn't have to do
isinstance
of the results to check that they're right every time (but if he wants, he can use the normalget()
).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.
We should use an enum class or define separate constants instead of raw strings.
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.
It's mapping the
protocol_v2_module.Mode.DESCRIPTOR.values_by_name
field. Maybe we could generate variable names from these strings usingeval
orexec
but that's almost worse.