Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
9.2.2023: Due to updates GitLab will be unavailable for some minutes between 9:00 and 11:00.
Open sidebar
badw-it
DHParser
Commits
8f72f453
Commit
8f72f453
authored
Feb 26, 2019
by
di68kap
Browse files
- DHParser: transform: issubtype bugfix für cython
parent
a3db829f
Changes
2
Hide whitespace changes
Inline
Side-by-side
DHParser/toolkit.py
View file @
8f72f453
...
...
@@ -218,6 +218,8 @@ def issubtype(sub_type, base_type):
try
:
ot
=
t
.
__origin__
except
AttributeError
:
if
t
==
'unicode'
:
# work-around for cython bug
return
str
return
t
return
ot
if
ot
is
not
None
else
t
return
issubclass
(
origin
(
sub_type
),
origin
(
base_type
))
...
...
DHParser/transform.pxd
View file @
8f72f453
...
...
@@ -40,7 +40,7 @@ cpdef _reduce_child(node: Node, child: Node)
cpdef
replace_by_single_child
(
context
:
List
[
Node
])
cpdef
reduce_single_child
(
context
:
List
[
Node
])
# cpdef replace_or_reduce(context: List[Node], condition: Callable = ?)
# cpdef
replace_parser
(context: List[Node], name: str)
# cpdef
change_tag_name
(context: List[Node], name: str)
# cpdef flatten(context: List[Node], condition: Callable = ?,
# recursive: bool = ?)
cpdef
collapse
(
context
:
List
[
Node
])
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment