mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-09-24 16:30:27 +08:00
Drop support for retired Python 3.5
Upgrade syntax using `pyupgrade --py36-plus` . Manually drop several `six` imports. Also: - Remove broken pr_cache in scripts/bootstrap_history.py - Fix broken prefix removal in lib/galaxy/tool_util/deps/mulled/mulled_build.py
This commit is contained in:
@@ -1,14 +1,15 @@
|
||||
"""
|
||||
Common methods used by the API sample scripts.
|
||||
"""
|
||||
from __future__ import print_function
|
||||
|
||||
import json
|
||||
import logging
|
||||
import sys
|
||||
|
||||
from six.moves.urllib.error import HTTPError
|
||||
from six.moves.urllib.request import Request, urlopen
|
||||
from urllib.error import HTTPError
|
||||
from urllib.request import (
|
||||
Request,
|
||||
urlopen,
|
||||
)
|
||||
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
@@ -92,7 +93,7 @@ def display(api_key, url, return_formatted=True):
|
||||
if 'name' in i:
|
||||
print(' name: %s' % i.pop('name'))
|
||||
for k, v in i.items():
|
||||
print(' %s: %s' % (k, v))
|
||||
print(f' {k}: {v}')
|
||||
print('')
|
||||
print('%d element(s) in collection' % len(r))
|
||||
elif type(r) == dict:
|
||||
@@ -100,7 +101,7 @@ def display(api_key, url, return_formatted=True):
|
||||
print('Member Information')
|
||||
print('------------------')
|
||||
for k, v in r.items():
|
||||
print('%s: %s' % (k, v))
|
||||
print(f'{k}: {v}')
|
||||
elif type(r) == str:
|
||||
print(r)
|
||||
else:
|
||||
@@ -137,7 +138,7 @@ def submit(api_key, url, data, return_formatted=True):
|
||||
if 'name' in i:
|
||||
print(' name: %s' % i.pop('name'))
|
||||
for k, v in i.items():
|
||||
print(' %s: %s' % (k, v))
|
||||
print(f' {k}: {v}')
|
||||
else:
|
||||
print(i)
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user