Skip to content

Commit

Permalink
Restore the correct type of AugmentedHelpFormatter._fill_text() (pyth…
Browse files Browse the repository at this point in the history
…on#9377)

This reverts commit af00d01 which
introduced a workaround for an incorrect type definition in typeshed.

The type of AugmentedHelpFormatter._fill_text() got fixed in commit
python/typeshed@686e21d so we can
remove the workaround.
  • Loading branch information
dlax authored Aug 30, 2020
1 parent 0ea510c commit 6e25daa
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions mypy/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,9 +134,7 @@ class AugmentedHelpFormatter(argparse.RawDescriptionHelpFormatter):
def __init__(self, prog: str) -> None:
super().__init__(prog=prog, max_help_position=28)

# FIXME: typeshed incorrectly has the type of indent as int when
# it should be str. Make it Any to avoid rusing mypyc.
def _fill_text(self, text: str, width: int, indent: Any) -> str:
def _fill_text(self, text: str, width: int, indent: str) -> str:
if '\n' in text:
# Assume we want to manually format the text
return super()._fill_text(text, width, indent)
Expand Down

0 comments on commit 6e25daa

Please sign in to comment.