Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
stubgenj
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Model registry
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
scripting-tools
stubgenj
Commits
f869d433
Verified
Commit
f869d433
authored
2 years ago
by
Ivan Sinkarenko
Browse files
Options
Downloads
Patches
Plain Diff
Update customizersUsed to get the robust imports, add extra protection from duplicated supertypes
parent
c98e6b15
No related branches found
No related tags found
1 merge request
!19
Improve robustness of java.lang.Throwable supertypes
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
stubgenj/_stubgenj.py
+2
-1
2 additions, 1 deletion
stubgenj/_stubgenj.py
with
2 additions
and
1 deletion
stubgenj/_stubgenj.py
+
2
−
1
View file @
f869d433
...
...
@@ -1111,10 +1111,11 @@ def jpypeCustomizerSuperTypes(jClass: jpype.JClass, classTypeVars: List[TypeVarS
typeStr
+=
'
[
'
+
'
,
'
.
join
([
tv
.
pythonName
for
tv
in
classTypeVars
])
+
'
]
'
extraSuperTypes
.
append
(
typeStr
)
customizersUsed
.
add
(
customizer
)
if
jClass
.
class_
.
getName
()
==
'
java.lang.Throwable
'
:
if
jClass
.
class_
.
getName
()
==
'
java.lang.Throwable
'
and
'
jpype.JException
'
not
in
extraSuperTypes
:
# Workaround to allow Throwable-derived exception types be recognized
# as JException, so that they can be assigned as Exception.__cause__
extraSuperTypes
.
append
(
'
jpype.JException
'
)
customizersUsed
.
add
(
jpype
.
JException
)
return
extraSuperTypes
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment