Skip to content

Commit

Permalink
Merge pull request #524 from frenzymadness/fix_syntax_warnings
Browse files Browse the repository at this point in the history
Fix SyntaxWarning: "is" with a literal.
  • Loading branch information
rmorshea authored May 28, 2019
2 parents 14dcafd + cce2a1d commit c5c9166
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions traitlets/config/loader.py
Original file line number Diff line number Diff line change
Expand Up @@ -918,7 +918,7 @@ def _add_arguments(self, aliases=None, flags=None, classes=None):
if key in self.aliases:
alias_flags[self.aliases[key]] = value
continue
keys = ('-'+key, '--'+key) if len(key) is 1 else ('--'+key, )
keys = ('-'+key, '--'+key) if len(key) == 1 else ('--'+key, )
paa(*keys, action=_FlagAction, flag=value)

for keys, traitname in aliases.items():
Expand All @@ -943,7 +943,7 @@ def _add_arguments(self, aliases=None, flags=None, classes=None):
argparse_kwds['action'] = _FlagAction
argparse_kwds['flag'] = alias_flags[traitname]
argparse_kwds['alias'] = traitname
keys = ('-'+key, '--'+key) if len(key) is 1 else ('--'+key, )
keys = ('-'+key, '--'+key) if len(key) == 1 else ('--'+key, )
paa(*keys, **argparse_kwds)

def _convert_to_config(self):
Expand Down

0 comments on commit c5c9166

Please sign in to comment.