mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-09-24 16:30:27 +08:00
Apply 2026 black style
This commit is contained in:
@@ -26,7 +26,7 @@ if __name__ == "__main__":
|
||||
print(usage, file=sys.stderr)
|
||||
sys.exit(1)
|
||||
|
||||
(base_url, key, hda_id, library_id, folder_id) = sys.argv[1:6]
|
||||
base_url, key, hda_id, library_id, folder_id = sys.argv[1:6]
|
||||
|
||||
message = ""
|
||||
if num_args >= 7:
|
||||
|
||||
@@ -4,6 +4,7 @@ Generic POST/create script
|
||||
|
||||
usage: create.py key url [key=value ...]
|
||||
"""
|
||||
|
||||
import sys
|
||||
|
||||
from common import submit
|
||||
|
||||
@@ -87,7 +87,7 @@ if __name__ == "__main__":
|
||||
default=DEFAULT_SLEEP_TIME,
|
||||
help="How long to sleep between check loops",
|
||||
)
|
||||
(options, args) = parser.parse_args()
|
||||
options, args = parser.parse_args()
|
||||
|
||||
# check options
|
||||
assert options.api_key is not None, ValueError("You must specify an API key.")
|
||||
|
||||
@@ -4,6 +4,7 @@ Generic DELETE/delete script
|
||||
|
||||
usage: delete.py key url
|
||||
"""
|
||||
|
||||
import sys
|
||||
|
||||
from common import delete
|
||||
|
||||
@@ -115,7 +115,7 @@ class Uploader:
|
||||
all_files = [x.strip() for x in list(sys.stdin.readlines())]
|
||||
|
||||
for idx, path in enumerate(all_files):
|
||||
(dirName, fname) = path.rsplit(os.path.sep, 1)
|
||||
dirName, fname = path.rsplit(os.path.sep, 1)
|
||||
if not os.path.exists(os.path.join(dirName, fname)):
|
||||
continue
|
||||
# Figure out what the memo key will be early
|
||||
|
||||
@@ -8,6 +8,7 @@ usage: reset_metadata_on_installed_repositories.py key
|
||||
Here is a working example of how to use this script.
|
||||
python ./reset_metadata_on_installed_repositories.py -a 22be3b -u http://localhost:8763/
|
||||
"""
|
||||
|
||||
import argparse
|
||||
|
||||
from common import submit
|
||||
|
||||
@@ -4,6 +4,7 @@ Generic PUT/update script
|
||||
|
||||
usage: create.py key url [key=value ...]
|
||||
"""
|
||||
|
||||
import sys
|
||||
|
||||
from common import update
|
||||
|
||||
@@ -8,8 +8,7 @@ THIS_DIRECTORY = os.path.dirname(os.path.realpath(__file__))
|
||||
GALAXY_ROOT_DIR = os.path.abspath(os.path.join(THIS_DIRECTORY, os.pardir))
|
||||
CWL_API_TESTS_DIRECTORY = os.path.join(GALAXY_ROOT_DIR, "lib", "galaxy_test", "api", "cwl")
|
||||
|
||||
TEST_FILE_TEMPLATE = string.Template(
|
||||
'''"""Test CWL conformance for version ${version}."""
|
||||
TEST_FILE_TEMPLATE = string.Template('''"""Test CWL conformance for version ${version}."""
|
||||
|
||||
import pytest
|
||||
|
||||
@@ -18,11 +17,9 @@ from ..test_workflows_cwl import BaseCwlWorkflowsApiTestCase
|
||||
|
||||
class TestCwlConformance(BaseCwlWorkflowsApiTestCase):
|
||||
"""Test case mapping to CWL conformance tests for version ${version}."""
|
||||
$tests'''
|
||||
)
|
||||
$tests''')
|
||||
|
||||
TEST_TEMPLATE = string.Template(
|
||||
'''
|
||||
TEST_TEMPLATE = string.Template('''
|
||||
${marks} def test_conformance_${version_simple}_${id_}(self):
|
||||
"""${doc}
|
||||
|
||||
@@ -31,8 +28,7 @@ ${marks} def test_conformance_${version_simple}_${id_}(self):
|
||||
${cwl_test_def}
|
||||
""" # noqa: W293
|
||||
self.cwl_populator.run_conformance_test("""${version}""", """${doc}""")
|
||||
'''
|
||||
)
|
||||
''')
|
||||
|
||||
RED_TESTS = {
|
||||
"v1.0": [
|
||||
|
||||
@@ -41,7 +41,7 @@ def main():
|
||||
path, galaxy_user_name, gid = validate_parameters()
|
||||
for cmd in [["chown", "-Rh", galaxy_user_name, path], ["chgrp", "-Rh", gid, path]]:
|
||||
p = subprocess.Popen(cmd, shell=False, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
|
||||
(stdoutdata, stderrdata) = p.communicate()
|
||||
stdoutdata, stderrdata = p.communicate()
|
||||
exitcode = p.returncode
|
||||
if exitcode != 0:
|
||||
sys.exit("external_chown_script: could not chown\ncmd was {}\n".format(" ".join(cmd)))
|
||||
|
||||
@@ -17,6 +17,7 @@ defaults logging to a single file with the following:
|
||||
galaxy-main -d --server-name handler0 --daemon-log-file=handler0-daemon.log --pid-file handler0.pid --log-file handler0.log
|
||||
|
||||
"""
|
||||
|
||||
import functools
|
||||
import logging
|
||||
import os
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
|
||||
See doc/source/admin/grt.rst for more detailed usage information.
|
||||
"""
|
||||
|
||||
import argparse
|
||||
import json
|
||||
import logging
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
|
||||
See doc/source/admin/grt.rst for more detailed usage information.
|
||||
"""
|
||||
|
||||
import argparse
|
||||
import logging
|
||||
import os
|
||||
|
||||
@@ -245,7 +245,7 @@ def __main__():
|
||||
default="True",
|
||||
help="Copy over text from all_fasta.loc.sample file (false if set to append)",
|
||||
)
|
||||
(options, args) = parser.parse_args()
|
||||
options, args = parser.parse_args()
|
||||
|
||||
exemptions = [e.strip() for e in options.exemptions.split(",")]
|
||||
fasta_exts = [x.strip() for x in options.fasta_exts.split(",")]
|
||||
|
||||
@@ -152,7 +152,7 @@ def main(old_revision, new_revision=None):
|
||||
old_contents = yaml.load(load_at_time(real_path, old_revision), Loader=MockOrderedLoader)
|
||||
new_contents = yaml.load(load_at_time(real_path, new_revision), Loader=MockOrderedLoader)
|
||||
|
||||
(a, r, c) = diff_files(old_contents, new_contents)
|
||||
a, r, c = diff_files(old_contents, new_contents)
|
||||
if a:
|
||||
added[filename] = sorted(a)
|
||||
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
"""
|
||||
Script to encode/decode the IDs that galaxy exposes to users and admins.
|
||||
"""
|
||||
|
||||
import argparse
|
||||
import logging
|
||||
import os
|
||||
|
||||
@@ -67,7 +67,7 @@ def main():
|
||||
help="verbose mode, print the name of each repository",
|
||||
default=False,
|
||||
)
|
||||
(options, args) = parser.parse_args()
|
||||
options, args = parser.parse_args()
|
||||
try:
|
||||
ini_file = args[0]
|
||||
except IndexError:
|
||||
|
||||
@@ -5,6 +5,7 @@ Escapes a file into a form suitable for use with tool tests using re_match or re
|
||||
usage: re_escape_output.py [options] input_file [output_file]
|
||||
-m: Use Multiline Matching
|
||||
"""
|
||||
|
||||
import optparse
|
||||
import re
|
||||
|
||||
@@ -14,7 +15,7 @@ def __main__():
|
||||
parser.add_option(
|
||||
"-m", "--multiline", action="store_true", dest="multiline", default=False, help="Use Multiline Matching"
|
||||
)
|
||||
(options, args) = parser.parse_args()
|
||||
options, args = parser.parse_args()
|
||||
input = open(args[0], "rb")
|
||||
if len(args) > 1:
|
||||
output = open(args[1], "wb")
|
||||
|
||||
Reference in New Issue
Block a user