diff --git a/.travis.yml b/.travis.yml index c706818..51e5492 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,6 +1,5 @@ language: python python: - - 3.5 - 3.8 install: - pip install -r requirements/travis.txt @@ -13,6 +12,6 @@ deploy: distributions: sdist bdist_wheel on: tags: true - python: 3.5 + python: 3.8 password: secure: XftLPhN6LpfOxPTiTnlwFDi53qjZIkp0VeR+Ydy4MTUbJKla5/yfXfSFmBX0lHN3PYa1A2A4rIUhvMWd9j66ist+2nqPjcJJy1DwSX1nKgVLanOpV/fFTC8yt/BOxgiaT+vdOUdoi3LmbTpezc6dYZHPmts5maAtG/RLGZG9Bcoreu28WPCGv45t1t36s+HUxtbDrMCTEqgwrBKJiaHza3m1XtFOjF722ypyoOlPPutq565tlmacJ7A44jaCrv/6SVtPCOsBd48qXyULvpZJdWor2vGdKzPQOWi7cOLty6iNc9chHCP5CCCJvRIwiv3RMkOhtcxqT/ch5eVhzBpTb8uV3upbQslP88q8bGeMVDWNBnpwPvNYipMX4mEJHKCESzGp9doJtPF17e3fPw7L52sGtHbn8peLm0Itw65W8UH1w49LDmJSOqPeZmzlSg/tp/Tt4FvYWt8zxH2J5Q4UReM5SCROWfBq5Asn1rzHZCgHauLRrBd0SjeO9RgDHPsuDUZmvzMiJ/wPwQ21IpSXl7xBEx79mI3NOdYRGxOA+y8fQUdfPLtY0TV3xhv4dU6YCc2jrpmwNu07jbHO5w47RtZr0TBfIR6wjcVMSeQBtUkKpn0QPKN+JpAU6qrEeDNx92YUm6V0z7MXZmtcxr/dcxq4fsTK5hQqy2zOzkw8VYY= diff --git a/README.md b/README.md index fa588ee..b42e9ea 100644 --- a/README.md +++ b/README.md @@ -10,10 +10,10 @@ For more information about the Tin Can API visit: -Requires Python 2.7 or later. +Requires Python 3.8 or later. ## Installation -TinCanPython requires [Python 2.7](https://www.python.org/downloads/) or later. Python 3 is not supported. +TinCanPython requires [Python 3.8](https://www.python.org/downloads/) or later. If you are installing from the Github repo, you will need to install `aniso8601` and `pytz` (use `sudo` as necessary): diff --git a/docs/source/conf.py b/docs/source/conf.py index 4a0bc3a..82b8fc0 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # # Tin Can Python documentation build configuration file, created by # sphinx-quickstart on Tue Jun 10 12:52:27 2014. @@ -57,8 +56,8 @@ def setup(app): master_doc = 'index' # General information about the project. -project = u'Tin Can Python' -copyright = u'2014, Rustici Software' +project = 'Tin Can Python' +copyright = '2014, Rustici Software' # The version info for the project you're documenting, acts as replacement for # |version| and |release|, also used in various other places throughout the @@ -209,8 +208,8 @@ def setup(app): # (source start file, target name, title, # author, documentclass [howto, manual, or own class]). latex_documents = [ - ('index', 'TinCanPython.tex', u'Tin Can Python Documentation', - u'Rustici Software', 'manual'), + ('index', 'TinCanPython.tex', 'Tin Can Python Documentation', + 'Rustici Software', 'manual'), ] # The name of an image file (relative to this directory) to place at the top of @@ -239,8 +238,8 @@ def setup(app): # One entry per manual page. List of tuples # (source start file, name, description, authors, manual section). man_pages = [ - ('index', 'tincanpython', u'Tin Can Python Documentation', - [u'Rustici Software'], 1) + ('index', 'tincanpython', 'Tin Can Python Documentation', + ['Rustici Software'], 1) ] # If true, show URL addresses after external links. @@ -253,8 +252,8 @@ def setup(app): # (source start file, target name, title, author, # dir menu entry, description, category) texinfo_documents = [ - ('index', 'TinCanPython', u'Tin Can Python Documentation', - u'Rustici Software', 'TinCanPython', + ('index', 'TinCanPython', 'Tin Can Python Documentation', + 'Rustici Software', 'TinCanPython', 'One line description of project.', 'Miscellaneous'), ] diff --git a/requirements/base.txt b/requirements/base.txt index 67d4e06..9f1baa3 100644 --- a/requirements/base.txt +++ b/requirements/base.txt @@ -4,5 +4,7 @@ # # make upgrade # -aniso8601==8.0.0 # via -r requirements/base.in -pytz==2020.1 # via -r requirements/base.in +aniso8601==8.1.0 + # via -r requirements/base.in +pytz==2020.5 + # via -r requirements/base.in diff --git a/requirements/pip_tools.txt b/requirements/pip_tools.txt index 279019f..53310ee 100644 --- a/requirements/pip_tools.txt +++ b/requirements/pip_tools.txt @@ -4,9 +4,10 @@ # # make upgrade # -click==7.1.2 # via pip-tools -pip-tools==5.2.1 # via -r requirements/pip_tools.in -six==1.15.0 # via pip-tools +click==7.1.2 + # via pip-tools +pip-tools==5.5.0 + # via -r requirements/pip_tools.in # The following packages are considered to be unsafe in a requirements file: # pip diff --git a/requirements/test.txt b/requirements/test.txt index 522c95d..23337a9 100644 --- a/requirements/test.txt +++ b/requirements/test.txt @@ -4,5 +4,7 @@ # # make upgrade # -aniso8601==8.0.0 # via -r requirements/base.txt -pytz==2020.1 # via -r requirements/base.txt +aniso8601==8.1.0 + # via -r requirements/base.txt +pytz==2020.5 + # via -r requirements/base.txt diff --git a/requirements/travis.txt b/requirements/travis.txt index ad93e2e..530aafd 100644 --- a/requirements/travis.txt +++ b/requirements/travis.txt @@ -4,5 +4,7 @@ # # make upgrade # -aniso8601==8.0.0 # via -r requirements/test.txt -pytz==2020.1 # via -r requirements/test.txt +aniso8601==8.1.0 + # via -r requirements/test.txt +pytz==2020.5 + # via -r requirements/test.txt diff --git a/setup.py b/setup.py index 98be133..75bb58b 100644 --- a/setup.py +++ b/setup.py @@ -31,13 +31,12 @@ def is_requirement(line): 'tincan/conversions', 'tincan/documents', ], - version='0.0.9', + version='1.0.0', description='A Python 3 library for implementing Tin Can API.', author='edX', author_email='oscm@edx.org', classifiers=[ 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.5', 'Programming Language :: Python :: 3.8', ], maintainer_email='mailto:brian.miller@tincanapi.com', diff --git a/test/documents/activity_profile_document_test.py b/test/documents/activity_profile_document_test.py index 5dfb732..e120b72 100644 --- a/test/documents/activity_profile_document_test.py +++ b/test/documents/activity_profile_document_test.py @@ -75,7 +75,7 @@ def test_init_arg_exception_dict(self): ActivityProfileDocument(d) def test_init_arg_exception_obj(self): - class Tester(object): + class Tester: def __init__(self, id=None, bad_test="test"): self.id = id self.bad_test = bad_test diff --git a/test/documents/agent_profile_document_test.py b/test/documents/agent_profile_document_test.py index b06001f..4d00b6c 100644 --- a/test/documents/agent_profile_document_test.py +++ b/test/documents/agent_profile_document_test.py @@ -62,7 +62,7 @@ def test_init_arg_exception_dict(self): AgentProfileDocument(d) def test_init_arg_exception_obj(self): - class Tester(object): + class Tester: def __init__(self, id=None, bad_test="test"): self.id = id self.bad_test = bad_test diff --git a/test/documents/document_test.py b/test/documents/document_test.py index 6b97b75..0e34102 100644 --- a/test/documents/document_test.py +++ b/test/documents/document_test.py @@ -60,7 +60,7 @@ def test_init_arg_exception_dict(self): Document(d) def test_init_arg_exception_obj(self): - class Tester(object): + class Tester: def __init__(self, id=None, bad_test="test"): self.id = id self.bad_test = bad_test diff --git a/test/documents/state_document_test.py b/test/documents/state_document_test.py index e6bff72..9455cc9 100644 --- a/test/documents/state_document_test.py +++ b/test/documents/state_document_test.py @@ -82,7 +82,7 @@ def test_init_arg_exception_dict(self): StateDocument(d) def test_init_arg_exception_obj(self): - class Tester(object): + class Tester: def __init__(self, id=None, bad_test="test"): self.id = id self.bad_test = bad_test diff --git a/test/http_request_test.py b/test/http_request_test.py index aab5eea..c3e562f 100644 --- a/test/http_request_test.py +++ b/test/http_request_test.py @@ -56,7 +56,7 @@ def test_init_arg_exception_dict(self): HTTPRequest(d) def test_init_arg_exception_obj(self): - class Tester(object): + class Tester: def __init__(self, resource="ok", bad_test="test"): self.resource = resource self.bad_test = bad_test @@ -153,7 +153,7 @@ def test_setters_none(self): self.assertEqual(req.query_params, {}) def test_headers_setter(self): - class Tester(object): + class Tester: def __init__(self, param="ok", tester="test"): self.param = param self.tester = tester @@ -169,7 +169,7 @@ def __init__(self, param="ok", tester="test"): self.assertEqual(req.headers["tester"], "test") def test_query_params_setter(self): - class Tester(object): + class Tester: def __init__(self, param="ok", tester="test"): self.param = param self.tester = tester diff --git a/test/lrs_response_test.py b/test/lrs_response_test.py index 6879762..f056794 100644 --- a/test/lrs_response_test.py +++ b/test/lrs_response_test.py @@ -1,4 +1,3 @@ -# coding=utf-8 # # Copyright 2014 Rustici Software # @@ -59,7 +58,7 @@ def test_init_arg_exception_dict(self): LRSResponse(d) def test_init_arg_exception_obj(self): - class Tester(object): + class Tester: def __init__(self, success=True, bad_test="test"): self.success = success self.bad_test = bad_test @@ -143,7 +142,7 @@ def test_unicode(self): self.assertIsInstance(resp, LRSResponse) self.assertIsInstance(resp.data, str) - self.assertEqual(resp.data, u"δοκιμή περιεχομένου") + self.assertEqual(resp.data, "δοκιμή περιεχομένου") def test_setters_none(self): resp = LRSResponse() @@ -168,7 +167,7 @@ def test_setters_none(self): self.assertIsNone(resp.response) def test_request_setter(self): - class Tester(object): + class Tester: def __init__(self, resource="ok", headers=None): if headers is None: headers = {"test": "ok"} @@ -188,7 +187,7 @@ def __init__(self, resource="ok", headers=None): self.assertEqual(resp.request.headers, {"test": "ok"}) def test_response_setter(self): - class Tester(object): + class Tester: def __init__(self, msg="ok", version="test"): self.msg = msg self.version = version diff --git a/tincan/about.py b/tincan/about.py index c76e032..d4c8e4e 100644 --- a/tincan/about.py +++ b/tincan/about.py @@ -37,7 +37,7 @@ def __init__(self, *args, **kwargs): self._version = None self._extensions = None - super(About, self).__init__(*args, **kwargs) + super().__init__(*args, **kwargs) @property def version(self): diff --git a/tincan/activity.py b/tincan/activity.py index dfca8d2..f0a3927 100644 --- a/tincan/activity.py +++ b/tincan/activity.py @@ -41,7 +41,7 @@ def __init__(self, *args, **kwargs): self._object_type = None self._definition = None - super(Activity, self).__init__(*args, **kwargs) + super().__init__(*args, **kwargs) @property def id(self): diff --git a/tincan/activity_definition.py b/tincan/activity_definition.py index 8214c12..d0da49e 100644 --- a/tincan/activity_definition.py +++ b/tincan/activity_definition.py @@ -68,7 +68,7 @@ def __init__(self, *args, **kwargs): self._steps = None self._extensions = None - super(ActivityDefinition, self).__init__(*args, **kwargs) + super().__init__(*args, **kwargs) @property def name(self): diff --git a/tincan/agent.py b/tincan/agent.py index d8d339d..9764039 100644 --- a/tincan/agent.py +++ b/tincan/agent.py @@ -45,7 +45,7 @@ def __init__(self, *args, **kwargs): self._openid = None self._account = None - super(Agent, self).__init__(*args, **kwargs) + super().__init__(*args, **kwargs) @property def object_type(self): diff --git a/tincan/agent_account.py b/tincan/agent_account.py index d5dc0a5..0f4f1fb 100644 --- a/tincan/agent_account.py +++ b/tincan/agent_account.py @@ -31,7 +31,7 @@ def __init__(self, *args, **kwargs): self._name = None self._home_page = None - super(AgentAccount, self).__init__(*args, **kwargs) + super().__init__(*args, **kwargs) @property def name(self): diff --git a/tincan/attachment.py b/tincan/attachment.py index 181a035..b988459 100644 --- a/tincan/attachment.py +++ b/tincan/attachment.py @@ -46,7 +46,7 @@ def __init__(self, *args, **kwargs): self._description = None self._fileurl = None - super(Attachment, self).__init__(*args, **kwargs) + super().__init__(*args, **kwargs) @property def usage_type(self): diff --git a/tincan/base.py b/tincan/base.py index 4b0baef..2f5062b 100644 --- a/tincan/base.py +++ b/tincan/base.py @@ -21,7 +21,7 @@ """ -class Base(object): +class Base: _props = [] def __init__(self, *args, **kwargs): @@ -56,7 +56,7 @@ def __setattr__(self, attr, value): """ if attr.startswith('_') and attr[1:] in self._props: - super(Base, self).__setattr__(attr, value) + super().__setattr__(attr, value) elif attr not in self._props: raise AttributeError( "Property '%s' cannot be set on a 'tincan.%s' object. Allowed properties: %s" % @@ -66,7 +66,7 @@ def __setattr__(self, attr, value): ', '.join(self._props) )) else: - super(Base, self).__setattr__(attr, value) + super().__setattr__(attr, value) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ diff --git a/tincan/context.py b/tincan/context.py index 36522d7..a56be2a 100644 --- a/tincan/context.py +++ b/tincan/context.py @@ -62,7 +62,7 @@ def __init__(self, *args, **kwargs): self._statement = None self._extensions = None - super(Context, self).__init__(*args, **kwargs) + super().__init__(*args, **kwargs) @property def registration(self): diff --git a/tincan/context_activities.py b/tincan/context_activities.py index 4b36bd3..c2ee3eb 100644 --- a/tincan/context_activities.py +++ b/tincan/context_activities.py @@ -31,7 +31,7 @@ def __init__(self, *args, **kwargs): self._grouping = None self._other = None - super(ContextActivities, self).__init__(*args, **kwargs) + super().__init__(*args, **kwargs) @property def category(self): diff --git a/tincan/conversions/iso8601.py b/tincan/conversions/iso8601.py index 4e38623..68e0f35 100644 --- a/tincan/conversions/iso8601.py +++ b/tincan/conversions/iso8601.py @@ -114,12 +114,12 @@ def jsonify_timedelta(value): # hours bigger_exists = date or hours if bigger_exists: - time += '{:02}H'.format(hours) + time += f'{hours:02}H' # minutes bigger_exists = bigger_exists or minutes if bigger_exists: - time += '{:02}M'.format(minutes) + time += f'{minutes:02}M' # seconds if seconds.is_integer(): @@ -130,7 +130,7 @@ def jsonify_timedelta(value): # remove trailing zeros seconds = seconds.rstrip('0') - time += '{}S'.format(seconds) + time += f'{seconds}S' return 'P' + date + time diff --git a/tincan/documents/activity_profile_document.py b/tincan/documents/activity_profile_document.py index ebb279f..2bccb41 100644 --- a/tincan/documents/activity_profile_document.py +++ b/tincan/documents/activity_profile_document.py @@ -45,7 +45,7 @@ class ActivityProfileDocument(Document): def __init__(self, *args, **kwargs): self._activity = None - super(ActivityProfileDocument, self).__init__(*args, **kwargs) + super().__init__(*args, **kwargs) @property def activity(self): diff --git a/tincan/documents/agent_profile_document.py b/tincan/documents/agent_profile_document.py index 62f65bb..1042de6 100644 --- a/tincan/documents/agent_profile_document.py +++ b/tincan/documents/agent_profile_document.py @@ -45,7 +45,7 @@ class AgentProfileDocument(Document): def __init__(self, *args, **kwargs): self._agent = None - super(AgentProfileDocument, self).__init__(*args, **kwargs) + super().__init__(*args, **kwargs) @property def agent(self): diff --git a/tincan/documents/document.py b/tincan/documents/document.py index 4bdeb25..45aedd9 100644 --- a/tincan/documents/document.py +++ b/tincan/documents/document.py @@ -51,7 +51,7 @@ def __init__(self, *args, **kwargs): self._etag = None self._timestamp = None - super(Document, self).__init__(*args, **kwargs) + super().__init__(*args, **kwargs) @property def id(self): diff --git a/tincan/documents/state_document.py b/tincan/documents/state_document.py index 56fb911..cedbcd7 100644 --- a/tincan/documents/state_document.py +++ b/tincan/documents/state_document.py @@ -55,7 +55,7 @@ def __init__(self, *args, **kwargs): self._activity = None self._registration = None - super(StateDocument, self).__init__(*args, **kwargs) + super().__init__(*args, **kwargs) @property def agent(self): diff --git a/tincan/extensions.py b/tincan/extensions.py index d0ad06d..db1d232 100644 --- a/tincan/extensions.py +++ b/tincan/extensions.py @@ -26,4 +26,4 @@ class Extensions(dict, SerializableBase): """ def __init__(self, *args, **kwargs): - super(Extensions, self).__init__(*args, **kwargs) + super().__init__(*args, **kwargs) diff --git a/tincan/group.py b/tincan/group.py index 332c932..9b22370 100644 --- a/tincan/group.py +++ b/tincan/group.py @@ -34,7 +34,7 @@ def __init__(self, *args, **kwargs): self._object_type = None self._member = AgentList() - super(Group, self).__init__(*args, **kwargs) + super().__init__(*args, **kwargs) def addmember(self, value): """Adds a single member to this group's list of members. diff --git a/tincan/http_request.py b/tincan/http_request.py index 85ba209..341bafd 100644 --- a/tincan/http_request.py +++ b/tincan/http_request.py @@ -53,7 +53,7 @@ def __init__(self, *args, **kwargs): self._content = None self._ignore404 = None - super(HTTPRequest, self).__init__(*args, **kwargs) + super().__init__(*args, **kwargs) @property def method(self): diff --git a/tincan/interaction_component.py b/tincan/interaction_component.py index ee857e4..0f092af 100644 --- a/tincan/interaction_component.py +++ b/tincan/interaction_component.py @@ -38,7 +38,7 @@ def __init__(self, *args, **kwargs): self._id = None self._description = None - super(InteractionComponent, self).__init__(*args, **kwargs) + super().__init__(*args, **kwargs) @property def id(self): diff --git a/tincan/language_map.py b/tincan/language_map.py index a53973b..8553200 100644 --- a/tincan/language_map.py +++ b/tincan/language_map.py @@ -31,7 +31,7 @@ def __init__(self, *args, **kwargs): """ check_args = dict(*args, **kwargs) list(map(lambda k_v: (k_v[0], self._check_basestring(k_v[1])), iter(check_args.items()))) - super(LanguageMap, self).__init__(check_args) + super().__init__(check_args) def __setitem__(self, prop, value): """Allows bracket notation for setting values with hyphenated keys @@ -45,7 +45,7 @@ def __setitem__(self, prop, value): """ self._check_basestring(value) - super(LanguageMap, self).__setitem__(prop, value) + super().__setitem__(prop, value) @staticmethod def _check_basestring(value): diff --git a/tincan/lrs_response.py b/tincan/lrs_response.py index 41a86d1..7e718ad 100644 --- a/tincan/lrs_response.py +++ b/tincan/lrs_response.py @@ -56,7 +56,7 @@ def __init__(self, *args, **kwargs): self._data = None self._content = None - super(LRSResponse, self).__init__(*args, **kwargs) + super().__init__(*args, **kwargs) @property def success(self): diff --git a/tincan/remote_lrs.py b/tincan/remote_lrs.py index 6c379d2..7e6ec96 100644 --- a/tincan/remote_lrs.py +++ b/tincan/remote_lrs.py @@ -101,7 +101,7 @@ def __init__(self, *args, **kwargs): kwargs.pop("password") kwargs["auth"] = auth_string - super(RemoteLRS, self).__init__(*args, **kwargs) + super().__init__(*args, **kwargs) def _send_request(self, request): """Establishes connection and returns http response based off of request. diff --git a/tincan/result.py b/tincan/result.py index 439e783..d39e5a2 100644 --- a/tincan/result.py +++ b/tincan/result.py @@ -58,7 +58,7 @@ def __init__(self, *args, **kwargs): self._response = None self._extensions = None - super(Result, self).__init__(*args, **kwargs) + super().__init__(*args, **kwargs) @property def score(self): diff --git a/tincan/serializable_base.py b/tincan/serializable_base.py index 80e0a28..544b7a3 100644 --- a/tincan/serializable_base.py +++ b/tincan/serializable_base.py @@ -64,7 +64,7 @@ def __init__(self, *args, **kwargs): new_kwargs[uscore[1:]] = new_kwargs[camel] new_kwargs.pop(camel) - super(SerializableBase, self).__init__(**new_kwargs) + super().__init__(**new_kwargs) @classmethod def from_json(cls, json_data): diff --git a/tincan/statement.py b/tincan/statement.py index e219145..ab79215 100644 --- a/tincan/statement.py +++ b/tincan/statement.py @@ -63,7 +63,7 @@ def __init__(self, *args, **kwargs): self._result = None self._version = Version.latest - super(Statement, self).__init__(*args, **kwargs) + super().__init__(*args, **kwargs) @property def id(self): diff --git a/tincan/statement_base.py b/tincan/statement_base.py index 20190fa..e2cabe7 100644 --- a/tincan/statement_base.py +++ b/tincan/statement_base.py @@ -55,7 +55,7 @@ def __init__(self, *args, **kwargs): self._context = None self._attachments = None - super(StatementBase, self).__init__(*args, **kwargs) + super().__init__(*args, **kwargs) @property def actor(self): diff --git a/tincan/statement_ref.py b/tincan/statement_ref.py index 5cb1ce3..b94a3b6 100644 --- a/tincan/statement_ref.py +++ b/tincan/statement_ref.py @@ -38,7 +38,7 @@ def __init__(self, *args, **kwargs): self._object_type = None self._id = None - super(StatementRef, self).__init__(*args, **kwargs) + super().__init__(*args, **kwargs) @property def object_type(self): diff --git a/tincan/statement_targetable.py b/tincan/statement_targetable.py index 4d32da6..3a6e2d2 100644 --- a/tincan/statement_targetable.py +++ b/tincan/statement_targetable.py @@ -22,7 +22,7 @@ """ -class StatementTargetable(object): +class StatementTargetable: def __init__(self): self.object_type = None diff --git a/tincan/statements_result.py b/tincan/statements_result.py index bc32957..93a11a8 100644 --- a/tincan/statements_result.py +++ b/tincan/statements_result.py @@ -34,7 +34,7 @@ def __init__(self, *args, **kwargs): self._statements = None self._more = None - super(StatementsResult, self).__init__(*args, **kwargs) + super().__init__(*args, **kwargs) @property def statements(self): diff --git a/tincan/substatement.py b/tincan/substatement.py index edfdcb1..e648938 100644 --- a/tincan/substatement.py +++ b/tincan/substatement.py @@ -31,7 +31,7 @@ class SubStatement(StatementBase): def __init__(self, *args, **kwargs): self._object_type = None - super(SubStatement, self).__init__(*args, **kwargs) + super().__init__(*args, **kwargs) @property def object(self): diff --git a/tincan/typed_list.py b/tincan/typed_list.py index fcd3374..f692303 100644 --- a/tincan/typed_list.py +++ b/tincan/typed_list.py @@ -27,12 +27,12 @@ class TypedList(list, SerializableBase): def __init__(self, *args, **kwargs): self._check_cls() new_args = [self._make_cls(v) for v in list(*args, **kwargs)] - super(TypedList, self).__init__(new_args) + super().__init__(new_args) def __setitem__(self, ind, value): self._check_cls() value = self._make_cls(value) - super(TypedList, self).__setitem__(ind, value) + super().__setitem__(ind, value) def _check_cls(self): """If self._cls is not set, raises ValueError. @@ -56,14 +56,14 @@ def _make_cls(self, value): def append(self, value): self._check_cls() value = self._make_cls(value) - super(TypedList, self).append(value) + super().append(value) def extend(self, value): self._check_cls() new_args = [self._make_cls(v) for v in value] - super(TypedList, self).extend(new_args) + super().extend(new_args) def insert(self, ind, value): self._check_cls() value = self._make_cls(value) - super(TypedList, self).insert(ind, value) + super().insert(ind, value) diff --git a/tincan/verb.py b/tincan/verb.py index 5ea92b7..7efa952 100644 --- a/tincan/verb.py +++ b/tincan/verb.py @@ -37,7 +37,7 @@ def __init__(self, *args, **kwargs): self._id = None self._display = None - super(Verb, self).__init__(*args, **kwargs) + super().__init__(*args, **kwargs) def __repr__(self): return 'Verb: %s' % self.__dict__ diff --git a/tincan/version.py b/tincan/version.py index 9cd9f42..37f84ac 100644 --- a/tincan/version.py +++ b/tincan/version.py @@ -19,7 +19,7 @@ """ -class Version(object): +class Version: supported = [ '1.0.1', '1.0.0',