Skip to content

Commit

Permalink
fix(cli): remove color imports
Browse files Browse the repository at this point in the history
  • Loading branch information
hanxiao committed May 4, 2020
1 parent e4d44d4 commit 6640bb5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions jina/main/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@

import argparse

from ..helper import colored


def add_arg_group(parser, title):
return parser.add_argument_group(title)
Expand Down Expand Up @@ -511,6 +509,7 @@ def format_help(self):

# add the heading if the section was non-empty
if self.heading is not argparse.SUPPRESS and self.heading is not None:
from ..helper import colored
current_indent = self.formatter._current_indent
captial_heading = ' '.join(v[0].upper() + v[1:] for v in self.heading.split(' '))
heading = '⚙️ %*s%s\n' % (
Expand All @@ -531,6 +530,7 @@ def _get_help_string(self, action):
help = action.help
if '%(default)' not in action.help:
if action.default is not argparse.SUPPRESS:
from ..helper import colored
defaulting_nargs = [argparse.OPTIONAL, argparse.ZERO_OR_MORE]
if isinstance(action, argparse._StoreTrueAction):

Expand Down

0 comments on commit 6640bb5

Please sign in to comment.