From eb73207913915be7131256a1ed80d2402ecf6ad6 Mon Sep 17 00:00:00 2001 From: Martin Vilcans Date: Wed, 12 Feb 2020 23:21:51 +0100 Subject: Removing Python 2 support - no need for six #54 --- requirements.txt | 1 - screenplain/parsers/fountain.py | 1 - screenplain/richstring.py | 3 +-- setup.py | 1 - tests/fdx_test.py | 2 +- tests/fountain_test.py | 2 +- tests/richstring_test.py | 3 +-- 7 files changed, 4 insertions(+), 9 deletions(-) diff --git a/requirements.txt b/requirements.txt index 97231be..a818b80 100644 --- a/requirements.txt +++ b/requirements.txt @@ -2,4 +2,3 @@ reportlab unittest2 nose pycodestyle -six diff --git a/screenplain/parsers/fountain.py b/screenplain/parsers/fountain.py index c2f6d71..7f367aa 100644 --- a/screenplain/parsers/fountain.py +++ b/screenplain/parsers/fountain.py @@ -5,7 +5,6 @@ import itertools from itertools import takewhile import re -from six import next from screenplain.types import ( Slug, Action, Dialog, DualDialog, Transition, Section, PageBreak, diff --git a/screenplain/richstring.py b/screenplain/richstring.py index 75426e4..3890ecd 100644 --- a/screenplain/richstring.py +++ b/screenplain/richstring.py @@ -3,7 +3,6 @@ # http://www.opensource.org/licenses/mit-license.php import re -import six try: from html import escape as html_escape @@ -35,7 +34,7 @@ class RichString(object): return ' + '.join(repr(s) for s in self.segments) def __unicode__(self): - return ''.join(six.text_type(s) for s in self.segments) + return ''.join(str(s) for s in self.segments) def __str__(self): return self.__unicode__() diff --git a/setup.py b/setup.py index 68ad1c5..1b16e9f 100755 --- a/setup.py +++ b/setup.py @@ -15,7 +15,6 @@ setup( }, license='MIT', install_requires=[ - 'six', ], extras_require={ 'PDF': 'reportlab' diff --git a/tests/fdx_test.py b/tests/fdx_test.py index 497f908..3a3c8f7 100644 --- a/tests/fdx_test.py +++ b/tests/fdx_test.py @@ -3,7 +3,7 @@ # http://www.opensource.org/licenses/mit-license.php from testcompat import TestCase -from six import StringIO +from io import StringIO from screenplain.export.fdx import write_text from screenplain.richstring import plain, bold, italic diff --git a/tests/fountain_test.py b/tests/fountain_test.py index c31cc66..141772a 100644 --- a/tests/fountain_test.py +++ b/tests/fountain_test.py @@ -9,7 +9,7 @@ from screenplain.types import ( Slug, Action, Dialog, DualDialog, Transition, Section, PageBreak ) from screenplain.richstring import plain, italic, empty_string -from six import StringIO +from io import StringIO def parse(lines): diff --git a/tests/richstring_test.py b/tests/richstring_test.py index ee42087..82b2af0 100644 --- a/tests/richstring_test.py +++ b/tests/richstring_test.py @@ -3,7 +3,6 @@ # http://www.opensource.org/licenses/mit-license.php from testcompat import TestCase -import six from screenplain.richstring import ( RichString, Segment, Bold, Italic, @@ -39,7 +38,7 @@ class RichStringOperatorTests(TestCase): s = bold('Hello') + plain(' there ') + bold('folks') self.assertEquals( u'Hello there folks', - six.text_type(s) + str(s) ) def test_eq(self): -- cgit