diff --git a/python/gherkin/token_matcher.py b/python/gherkin/token_matcher.py index d7a530ae5..6daf648bd 100644 --- a/python/gherkin/token_matcher.py +++ b/python/gherkin/token_matcher.py @@ -3,17 +3,6 @@ from .dialect import Dialect from .errors import NoSuchLanguageException -# Source: https://stackoverflow.com/a/8348914 -try: - import textwrap - textwrap.indent -except AttributeError: # undefined function (wasn't added until Python 3.3) - def indent(text, amount, ch=' '): - padding = amount * ch - return ''.join(padding+line for line in text.splitlines(True)) -else: - def indent(text, amount, ch=' '): - return textwrap.indent(text, amount * ch) class TokenMatcher: LANGUAGE_RE = re.compile(r"^\s*#\s*language\s*:\s*([a-zA-Z\-_]+)\s*$")