Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

erezsh
Copy link
Member

@erezsh erezsh commented Nov 17, 2020

No description provided.

@erezsh erezsh requested a review from MegaIng November 17, 2020 22:40
Copy link
Member

@MegaIng MegaIng left a comment

Choose a reason for hiding this comment

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

Left a few comments.

res = self._call_userfunc_token(c)
else:
res = c
if type(res) is Inline:
Copy link
Member

Choose a reason for hiding this comment

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

bad style: isinstance should be used.


def a(self, children):
return Inline('c', 'd')

Copy link
Member

Choose a reason for hiding this comment

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

Adding a test to test for a Token would be nice just in case we somehow break that in the future.

@@ -15,9 +15,16 @@ class Discard(Exception):
"""
pass

# Transformers
class Inline(object):
"""When returning an Inline instance in a transformer callback,
Copy link
Member

Choose a reason for hiding this comment

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

Question: Will this make sure that it is added to the docs?

Anyway, an example would be nice, as well as pointing out to use it Inline(a, b, c) and not Inline((a,b,c)).

And it should be added to the stubs.

@MegaIng
Copy link
Member

MegaIng commented Nov 17, 2020

And this PR is certainly not complete as can be seen from comments on #763. (e.g. still missing for the transformer parameter. That should also be in the tests.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants