mirror of
https://github.com/status-im/PyGithub.git
synced 2026-08-31 19:01:15 +00:00
Remove some uses of atLeastPython3 (#1191)
There are a number of call sites that would behave differently depending on Python 2 or 3. A fair amount of them are left over from Python 3.2 or Python 2.6 were the current versions, and it was much harder to write compatible code for both versions. Happily, that is now in the past, so refactor some of them out.
This commit is contained in:
@@ -231,10 +231,7 @@ class GithubObject(object):
|
||||
Converts the object to a nicely printable string.
|
||||
"""
|
||||
def format_params(params):
|
||||
if atLeastPython3:
|
||||
items = list(params.items())
|
||||
else:
|
||||
items = list(params.items())
|
||||
items = list(params.items())
|
||||
for k, v in sorted(items, key=itemgetter(0), reverse=True):
|
||||
isText = isinstance(v, (str, six.text_type))
|
||||
if isText and not atLeastPython3:
|
||||
|
||||
Reference in New Issue
Block a user