Skip to content

Commit

Permalink
repr is erasing ANSI escapes codes
Browse files Browse the repository at this point in the history
  • Loading branch information
Adrien Pensart committed May 4, 2021
1 parent 1059c20 commit fb986d6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/click/core.py
Expand Up @@ -2926,7 +2926,7 @@ def get_usage_pieces(self, ctx: Context) -> t.List[str]:
return [self.make_metavar()]

def get_error_hint(self, ctx: Context) -> str:
return repr(self.make_metavar())
return f"'{self.make_metavar()}'"

def add_to_parser(self, parser: OptionParser, ctx: Context) -> None:
parser.add_argument(dest=self.name, nargs=self.nargs, obj=self)

0 comments on commit fb986d6

Please sign in to comment.