зеркало из https://github.com/mozilla/treeherder.git
Bug 1530267 - Remove explicit class inheritance from `object`
Since with Python 3 all classes inherit from it by default.
This commit is contained in:
Родитель
769cded9a8
Коммит
4704764a89
|
@ -602,7 +602,7 @@ def generic_reference_data(test_repository):
|
|||
Product,
|
||||
ReferenceDataSignatures)
|
||||
|
||||
class RefdataHolder(object):
|
||||
class RefdataHolder:
|
||||
pass
|
||||
r = RefdataHolder()
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@ import json
|
|||
import os
|
||||
|
||||
|
||||
class SampleData(object):
|
||||
class SampleData:
|
||||
|
||||
@classmethod
|
||||
def get_perf_data(cls, filename):
|
||||
|
|
|
@ -28,7 +28,7 @@ with open('treeherder/auth/jwks.json') as f:
|
|||
jwks = json.load(f)
|
||||
|
||||
|
||||
class AuthBackend(object):
|
||||
class AuthBackend:
|
||||
|
||||
def _get_access_token_expiry(self, request):
|
||||
expiration_timestamp_in_seconds = request.META.get('HTTP_ACCESS_TOKEN_EXPIRES_AT')
|
||||
|
|
|
@ -176,7 +176,7 @@ def crash_signature_matcher(text_log_error):
|
|||
return scored_matches
|
||||
|
||||
|
||||
class MatchScorer(object):
|
||||
class MatchScorer:
|
||||
"""Simple scorer for similarity of strings based on python's difflib SequenceMatcher."""
|
||||
def __init__(self, target):
|
||||
""":param target: The string to which candidate strings will be compared."""
|
||||
|
|
|
@ -10,7 +10,7 @@ __version__ = '5.0.0'
|
|||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
class TreeherderClient(object):
|
||||
class TreeherderClient:
|
||||
"""
|
||||
Treeherder client class
|
||||
"""
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
from .client import TreeherderClient
|
||||
|
||||
|
||||
class PerformanceTimeInterval(object):
|
||||
class PerformanceTimeInterval:
|
||||
'''
|
||||
Valid time intervals for Perfherder series
|
||||
'''
|
||||
|
|
|
@ -23,7 +23,7 @@ def fetch_intermittent_bugs(offset, limit):
|
|||
return response.get('bugs', [])
|
||||
|
||||
|
||||
class BzApiBugProcess(object):
|
||||
class BzApiBugProcess:
|
||||
|
||||
def run(self):
|
||||
bug_list = []
|
||||
|
|
|
@ -15,7 +15,7 @@ from treeherder.model.models import (Push,
|
|||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
class JobLoader(object):
|
||||
class JobLoader:
|
||||
"""Validate, transform and load a list of Jobs"""
|
||||
|
||||
TEST_RESULT_MAP = {
|
||||
|
|
|
@ -13,7 +13,7 @@ env = environ.Env()
|
|||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
class PushLoader(object):
|
||||
class PushLoader:
|
||||
"""Transform and load a list of pushes"""
|
||||
|
||||
def process(self, message_body, exchange):
|
||||
|
@ -62,7 +62,7 @@ class PushLoader(object):
|
|||
"Unsupported push exchange: {}".format(exchange))
|
||||
|
||||
|
||||
class GithubTransformer(object):
|
||||
class GithubTransformer:
|
||||
|
||||
CREDENTIALS = {
|
||||
"client_id": env("GITHUB_CLIENT_ID", default=None),
|
||||
|
@ -192,7 +192,7 @@ class GithubPullRequestTransformer(GithubTransformer):
|
|||
return self.fetch_push(pr_url, repository)
|
||||
|
||||
|
||||
class HgPushTransformer(object):
|
||||
class HgPushTransformer:
|
||||
# {
|
||||
# "root": {
|
||||
# "payload": {
|
||||
|
|
|
@ -21,7 +21,7 @@ def last_push_id_from_server(repo):
|
|||
return data['lastpushid']
|
||||
|
||||
|
||||
class HgPushlogProcess(object):
|
||||
class HgPushlogProcess:
|
||||
# For more info on Mercurial Pushes, see:
|
||||
# https://mozilla-version-control-tools.readthedocs.io/en/latest/hgmo/pushlog.html
|
||||
|
||||
|
|
|
@ -21,7 +21,7 @@ from treeherder.model.models import (BugJobMap,
|
|||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
class Commenter(object):
|
||||
class Commenter:
|
||||
"""Handles fetching, composing and submitting bug comments based on
|
||||
daily or weekly thresholds and date range, and updating whiteboard
|
||||
and priority status as need; if in dry_run, comments will be output
|
||||
|
|
|
@ -10,7 +10,7 @@ from .artifactbuilders import (BuildbotJobArtifactBuilder,
|
|||
MAX_DOWNLOAD_SIZE_IN_BYTES = 5 * 1024 * 1024
|
||||
|
||||
|
||||
class ArtifactBuilderCollection(object):
|
||||
class ArtifactBuilderCollection:
|
||||
"""
|
||||
Run a log through a collection of Artifact Builders to generate artifacts.
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@ from .parsers import (PerformanceParser,
|
|||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
class ArtifactBuilderBase(object):
|
||||
class ArtifactBuilderBase:
|
||||
"""
|
||||
Base class for all Buildbot log parsers.
|
||||
|
||||
|
|
|
@ -9,7 +9,7 @@ from django.conf import settings
|
|||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
class ParserBase(object):
|
||||
class ParserBase:
|
||||
"""
|
||||
Base class for all parsers.
|
||||
|
||||
|
|
|
@ -74,7 +74,7 @@ def calc_t(w1, w2, weight_fn=None):
|
|||
|
||||
|
||||
@functools.total_ordering
|
||||
class RevisionDatum(object):
|
||||
class RevisionDatum:
|
||||
'''
|
||||
This class represents a specific revision and the set of values for it
|
||||
'''
|
||||
|
|
|
@ -19,7 +19,7 @@ from treeherder.seta.update_job_priority import update_job_priority_table
|
|||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
class AnalyzeFailures(object):
|
||||
class AnalyzeFailures:
|
||||
def __init__(self, **options):
|
||||
self.dry_run = options.get('dry_run', False)
|
||||
|
||||
|
|
|
@ -20,7 +20,7 @@ class SetaError(Exception):
|
|||
pass
|
||||
|
||||
|
||||
class SETAJobPriorities(object):
|
||||
class SETAJobPriorities:
|
||||
"""
|
||||
SETA JobPriority Implementation
|
||||
"""
|
||||
|
|
|
@ -11,7 +11,7 @@ from django.db.utils import (IntegrityError,
|
|||
from treeherder.etl.exceptions import MissingPushException
|
||||
|
||||
|
||||
class retryable_task(object):
|
||||
class retryable_task:
|
||||
"""Wrapper around a celery task to add conditional task retrying."""
|
||||
|
||||
NON_RETRYABLE_EXCEPTIONS = (
|
||||
|
|
Загрузка…
Ссылка в новой задаче