Switch to using six (#1189)

With the Python 2.7 deadline fast approaching, modernize the codebase
making use of the modernize module to switch to using six, as well as
other upcoming features, such as absolute imports . Stop using 2to3
for Travis, yay!
This commit is contained in:
Steve Kowalik
2019-08-05 14:06:19 +10:00
committed by GitHub
parent f1ae7200ba
commit dc2f2ad8cb
182 changed files with 850 additions and 629 deletions
+4 -2
View File
@@ -22,10 +22,12 @@
# #
################################################################################
from __future__ import absolute_import
import github.GithubObject
import github.ProjectColumn
import Consts
from . import Consts
import six
class Project(github.GithubObject.CompletableGithubObject):
@@ -159,7 +161,7 @@ class Project(github.GithubObject.CompletableGithubObject):
calls: `POST https://developer.github.com/v3/projects/columns/#create-a-project-column>`_
:param name: string
"""
assert isinstance(name, (str, unicode)), name
assert isinstance(name, (str, six.text_type)), name
post_parameters = {"name": name}
import_header = {"Accept": Consts.mediaTypeProjectsPreview}
headers, data = self._requester.requestJsonAndCheck(