Skip to content

Commit

Permalink
Removed check for "yield from".
Browse files Browse the repository at this point in the history
Since the module requires python 3.6 and "yield from" was introduced in
3.3, there is no need for this check.
  • Loading branch information
hakonhagland committed Sep 1, 2021
1 parent 596f42c commit 364e171
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions ansi2html/converter.py
Original file line number Diff line number Diff line change
Expand Up @@ -389,13 +389,7 @@ def _osc_link(ansi):
if isinstance(part, OSC_Link):
yield part
else:
if ((sys.version_info.major == 3 and sys.version_info.minor >= 3)
or sys.version_info.major > 3):
# yield from requires python >= 3.3
yield from self._handle_ansi_code(part, styles_used, state)
else:
for sub_part in self._handle_ansi_code(part, styles_used, state):
yield sub_part
yield from self._handle_ansi_code(part, styles_used, state)
if state.inside_span:
if self.latex:
yield "}"
Expand Down

0 comments on commit 364e171

Please sign in to comment.