Skip to content

Commit

Permalink
Merge pull request #152 from deathaxe/pr/python-38
Browse files Browse the repository at this point in the history
Opt-in to python 3.8
  • Loading branch information
cgahr authored Aug 5, 2024
2 parents 8abbb57 + 2e44c67 commit 0feec81
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 12 deletions.
2 changes: 1 addition & 1 deletion .python-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.3
3.8
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
Helium package for Sublime Text 3
Helium package for Sublime Text
===

Helium is a package for Sublime Text 3, which provides in-editor code execution and autocomplete in interaction with Jupyter kernels.
The concept of an editor extension communicating Jupyter kernels is inspired by @nteract's splendid Atom package [Hydrogen](https://github.com/nteract/Hydrogen). I want something like it in Sublime Text 3, too.
Helium is a package for Sublime Text, which provides in-editor code execution and autocomplete in interaction with Jupyter kernels.
The concept of an editor extension communicating Jupyter kernels is inspired by @nteract's splendid Atom package [Hydrogen](https://github.com/nteract/Hydrogen). I want something like it in Sublime Text, too.

Any feedback is highly welcome. I hope this package will help your life with ST3!

Expand Down
28 changes: 25 additions & 3 deletions dependencies.json
Original file line number Diff line number Diff line change
@@ -1,30 +1,52 @@
{
"windows": {
"*": [
"<4000": [
"dateutil",
"enum",
"python-six",
"pyzmq"
],
">=4000": [
"dateutil",
"python-six",
"pyzmq",
"tornado"
]
},
"osx": {
"*": [
"<4000": [
"dateutil",
"enum",
"pexpect",
"ptyprocess",
"python-six",
"pyzmq"
],
">=4000": [
"dateutil",
"pexpect",
"ptyprocess",
"python-six",
"pyzmq",
"tornado"
]
},
"linux": {
"*": [
"<4000": [
"dateutil",
"enum",
"pexpect",
"ptyprocess",
"python-six",
"pyzmq"
],
">=4000": [
"dateutil",
"pexpect",
"ptyprocess",
"python-six",
"pyzmq",
"tornado"
]
}
}
2 changes: 1 addition & 1 deletion lib/client/jupyter_client/manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ def _kernel_name_changed(self, name, old, new):

@property
def kernel_spec(self):
if self._kernel_spec is None and self.kernel_name is not '':
if self._kernel_spec is None and self.kernel_name != '':
self._kernel_spec = self.kernel_spec_manager.get_kernel_spec(self.kernel_name)
return self._kernel_spec

Expand Down
8 changes: 4 additions & 4 deletions lib/client/traitlets/config/loader.py
Original file line number Diff line number Diff line change
Expand Up @@ -542,7 +542,7 @@ def _load_flag(self, cfg):
# rejects: --anything=anything
# --two.word

flag_pattern = re.compile(r'\-\-?\w+[\-\w]*$')
flag_pattern = re.compile(r'\-\-?\w[\-\w]*$')

class KeyValueConfigLoader(CommandLineConfigLoader):
"""A config loader that loads key value pairs from the command line.
Expand Down Expand Up @@ -669,7 +669,7 @@ def load_config(self, argv=None, aliases=None, flags=None):

elif flag_pattern.match(raw):
if item in flags:
cfg,help = flags[item]
cfg,_ = flags[item]
self._load_flag(cfg)
else:
raise ArgumentError("Unrecognized flag: '%s'"%raw)
Expand Down Expand Up @@ -792,7 +792,7 @@ def _add_arguments(self, aliases=None, flags=None):
nargs = '?'
else:
nargs = None
if len(key) is 1:
if len(key) == 1:
paa('-'+key, '--'+key, type=text_type, dest=value, nargs=nargs)
else:
paa('--'+key, type=text_type, dest=value, nargs=nargs)
Expand All @@ -801,7 +801,7 @@ def _add_arguments(self, aliases=None, flags=None):
#
self.alias_flags[self.aliases[key]] = value
continue
if len(key) is 1:
if len(key) == 1:
paa('-'+key, '--'+key, action='append_const', dest='_flags', const=value)
else:
paa('--'+key, action='append_const', dest='_flags', const=value)
Expand Down

0 comments on commit 0feec81

Please sign in to comment.