<commit_before>from __future__ import unicode_literals, division, absolute_import
from builtins import *  # pylint: disable=unused-import, redefined-builtin

import logging

from flexget import plugin
from flexget.event import event
from flexget.utils import qualities

log = logging.getLogger('reorder_quality')


class ReorderQuality(object):
    """
        Allows modifying quality priorities from default ordering.

        Example:

        reorder_quality:
          webrip:
            above: hdtv
    """

    schema = {
        'type': 'object',
        'additionalProperties': {
            'type': 'object',
            'properties': {
                'above': {'type': 'string', 'format': 'quality_requirements'},
                'below': {'type': 'string', 'format': 'quality_requirements'}
            },
            'maxProperties': 1
        }
    }

    def __init__(self):
        self.quality_priorities = {}<commit_msg>changed schema validator<commit_after>from __future__ import unicode_literals, division, absolute_import
from builtins import *  # pylint: disable=unused-import, redefined-builtin

import logging

from flexget import plugin
from flexget.event import event
from flexget.utils import qualities

log = logging.getLogger('reorder_quality')


class ReorderQuality(object):
    """
        Allows modifying quality priorities from default ordering.

        Example:

        reorder_quality:
          webrip:
            above: hdtv
    """

    schema = {
        'type': 'object',
        'additionalProperties': {
            'type': 'object',
            'properties': {
                'above': {'type': 'string', 'format': 'quality'},
                'below': {'type': 'string', 'format': 'quality'}
            },
            'maxProperties': 1
        }
    }

    def __init__(self):
        self.quality_priorities = {}
{'fraction_non_alphanumeric': 0.11045576407506702, 'fraction_numerical': 0.0010723860589812334, 'mean_word_length': 2.411334552102377, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4140389', 'n_tokens_mistral': 514, 'n_tokens_neox': 485, 'n_words': 130}