Change all remaining old-style classes to new style

This commit is contained in:
Nicola Soranzo
2018-09-17 12:26:07 +01:00
parent 721a4656d9
commit 0c931235af
19 changed files with 26 additions and 26 deletions
+1 -1
View File
@@ -73,7 +73,7 @@ tc.agent("Mozilla/5.0 (compatible; check_galaxy/0.2)")
tc.config('use_tidy', 0)
class Browser:
class Browser(object):
def __init__(self):
self.server = server
self.handler = handler
+1 -1
View File
@@ -230,7 +230,7 @@ class Strategy(BaseStrategy):
return self.backend.continue_pipeline(*args, **kwargs)
class Storage:
class Storage(object):
user = UserAuthnzToken
nonce = PSANonce
association = PSAAssociation
+1 -1
View File
@@ -731,7 +731,7 @@ def get_attributes_from_fasta_header(header):
def iter_fasta_alignment(filename):
class fastaComponent:
class fastaComponent(object):
def __init__(self, species, text=""):
self.species = species
self.text = text
+2 -2
View File
@@ -120,7 +120,7 @@ class SelectToolParameterWrapper(ToolParameterValueWrapper):
attributes are accessible.
"""
class SelectToolParameterFieldWrapper:
class SelectToolParameterFieldWrapper(object):
"""
Provide access to any field by name or index for this particular value.
Only applicable for dynamic_options selects, which have more than simple 'options' defined (name, value, selected).
@@ -182,7 +182,7 @@ class DatasetFilenameWrapper(ToolParameterValueWrapper):
attributes are accessible.
"""
class MetadataWrapper:
class MetadataWrapper(object):
"""
Wraps a Metadata Collection to return MetadataParameters wrapped
according to the metadata spec. Methods implemented to match behavior
+1 -1
View File
@@ -33,7 +33,7 @@ class StreamBall(object):
def stream(self, environ, start_response):
response_write = start_response(self.wsgi_status, self.wsgi_headeritems)
class tarfileobj:
class tarfileobj(object):
def write(self, *args, **kwargs):
response_write(*args, **kwargs)
tf = tarfile.open(mode=self.mode, fileobj=tarfileobj())
+1 -1
View File
@@ -8,7 +8,7 @@ import sys
from bioblend import galaxy
class Uploader:
class Uploader(object):
def __init__(self, url, api, library_id, folder_id, should_link,
non_local):
+1 -1
View File
@@ -6,7 +6,7 @@ import time
from bioblend.galaxy import GalaxyInstance
class ApplyTagsHistory:
class ApplyTagsHistory(object):
@classmethod
def __init__(self, galaxy_url, galaxy_api_key, history_id=None):
+1 -1
View File
@@ -107,7 +107,7 @@ tc.agent("Mozilla/5.0 (compatible; check_galaxy/0.1)")
tc.config('use_tidy', 0)
class Browser:
class Browser(object):
def __init__(self):
self.server = server
+1 -1
View File
@@ -48,7 +48,7 @@ def kw_metrics(job):
}
class Sanitization:
class Sanitization(object):
def __init__(self, sanitization_config, model, sa_session):
self.sanitization_config = sanitization_config
+2 -2
View File
@@ -7,7 +7,7 @@ assert sys.version_info[:2] >= (2, 4)
# genbank_to_bed
class Region:
class Region(object):
def __init__(self):
self.qualifiers = {}
self.start = None
@@ -37,7 +37,7 @@ class Region:
self.end = end
class GenBankFeatureParser:
class GenBankFeatureParser(object):
"""Parses Features from Single Locus GenBank file"""
def __init__(self, fh, features_list=[]):
self.fh = fh
+1 -1
View File
@@ -19,7 +19,7 @@ from .interactor import TestCaseGalaxyInteractor as BaseInteractor
from .testcase import FunctionalTestCase
class UsesApiTestCaseMixin:
class UsesApiTestCaseMixin(object):
def _api_url(self, path, params=None, use_key=None, use_admin_key=None):
if not params:
+2 -2
View File
@@ -140,7 +140,7 @@ def _raise_skip_if(check):
# Deprecated mixin, use dataset populator instead.
# TODO: Rework existing tests to target DatasetPopulator in a setup method instead.
class TestsDatasets:
class TestsDatasets(object):
def _new_dataset(self, history_id, content='TestData123', **kwds):
return DatasetPopulator(self.galaxy_interactor).new_dataset(history_id, content=content, **kwds)
@@ -1087,7 +1087,7 @@ def wait_on_state(state_func, desc="state", skip_states=["running", "queued", "n
raise TimeoutAssertionError("%s Current response containing state [%s]." % (str(e), response.json()))
class GiPostGetMixin:
class GiPostGetMixin(object):
"""Mixin for adapting Galaxy testing populators helpers to bioblend."""
def _get(self, route, data={}):
+1 -1
View File
@@ -14,7 +14,7 @@ from selenium.webdriver.support.ui import WebDriverWait
UNSPECIFIED_TIMEOUT = object()
class HasDriver:
class HasDriver(object):
TimeoutException = TimeoutException
def assert_xpath(self, xpath):
+1 -1
View File
@@ -24,7 +24,7 @@ JobEnviromentProperties = collections.namedtuple("JobEnvironmentProperties", [
])
class RunsEnvironmentJobs:
class RunsEnvironmentJobs(object):
def _run_and_get_environment_properties(self, tool_id="job_environment_default"):
with self.dataset_populator.test_history() as history_id:
+2 -2
View File
@@ -431,7 +431,7 @@ class SharedStateSeleniumTestCase(SeleniumTestCase):
"""Override this to setup shared data for tests that gets initialized only once."""
class UsesHistoryItemAssertions:
class UsesHistoryItemAssertions(object):
def assert_item_peek_includes(self, hid, expected):
item_body = self.history_panel_item_component(hid=hid)
@@ -508,7 +508,7 @@ def get_remote_driver():
)
class SeleniumSessionGetPostMixin:
class SeleniumSessionGetPostMixin(object):
"""Mixin for adapting Galaxy testing populators helpers to Selenium session backed bioblend."""
def _get(self, route, data={}):
+3 -3
View File
@@ -20,7 +20,7 @@ from galaxy.util import stringify_dictionary_keys
from galaxy.util.bunch import Bunch
class OffsetList:
class OffsetList(object):
def __init__(self, filesize=0, fmt=None):
self.file = tempfile.NamedTemporaryFile('w+b')
if fmt:
@@ -146,7 +146,7 @@ class SortedOffsets(OffsetList):
# indexed set of offsets, index is built on demand
class OffsetIndex:
class OffsetIndex(object):
def __init__(self, filename, column, split=None, index_depth=3):
self.filename = filename
self.file = open(filename, 'r')
@@ -239,7 +239,7 @@ class OffsetIndex:
first_char = identifier[0]
class BufferedIndex:
class BufferedIndex(object):
def __init__(self, filename, column, split=None, buffer=1000000, index_depth=3):
self.index = OffsetIndex(filename, column, split, index_depth)
self.buffered_offsets = {}
+1 -1
View File
@@ -1180,7 +1180,7 @@ def read_ssaha_data(ssahadata_fh):
#
##########################################################################
class Fasta:
class Fasta(object):
def __init__(self, name, sequence):
self.name = name
self.sequence = sequence
+2 -2
View File
@@ -37,7 +37,7 @@ debug_flag = False
@total_ordering
class node:
class node(object):
def __init__(self, name):
self.name = name
self.edges = []
@@ -65,7 +65,7 @@ class node:
return self.name
class graph:
class graph(object):
def __init__(self):
self.nodes = {}
+1 -1
View File
@@ -25,7 +25,7 @@ from bx.cookbook import doc_optparse
from galaxy.util.ucsc import UCSCLimitException, UCSCOutWrapper
class PositionalScoresOnDisk:
class PositionalScoresOnDisk(object):
fmt = 'f'
fmt_size = struct.calcsize(fmt)
default_value = float('nan')