-
Notifications
You must be signed in to change notification settings - Fork 38
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bugfix for #28 #41
Bugfix for #28 #41
Conversation
Codecov Report
@@ Coverage Diff @@
## master #41 +/- ##
==========================================
+ Coverage 82.68% 82.73% +0.04%
==========================================
Files 6 6
Lines 387 388 +1
==========================================
+ Hits 320 321 +1
Misses 67 67 |
@@ -29,7 +29,7 @@ class ScalaMagic(Magic): | |||
def __init__(self, kernel): | |||
super(ScalaMagic, self).__init__(kernel) | |||
self.retval = None | |||
self._interp = None | |||
self._interp = scala_intp |
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.
Hm. Is this really needed? _get_scala_interpreter
initializes this variable by calling get_scala_interpreter()
instead of reaching in and grabbing the global directly.
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.
No, it's not necessary. It's really just to avoid the messaging, etc. around using the magic for the first time if an interpreter already exists.
@parente This PR is just a band-aid to get |
Merged. As for refactoring, yes. The cross-calling happening between the interpreter class and the magic makes the code hard to follow and maintain for sure. |
Quick patch to enable
%%scala
magic when running under ipykernel.