<commit_before>from pymongo import ReturnDocument

import virtool.utils
import virtool.user
import virtool.user_permissions
import virtool.validators

from virtool.handlers.utils import json_response, no_content, bad_request, protected, validation, unpack_request, \
    not_found

SETTINGS_SCHEMA = {
    "show_ids": {
        "type": "boolean",
        "required": False
    },
    "show_versions": {
        "type": "boolean",
        "required": False
    },
    "quick_analyze_algorithm": {
        "type": "boolean",
        "required": False
    },
    "skip_quick_analyze_dialog": {
        "type": "string",
        "required": False
    }
}


PASSWORD_SCHEMA = {
    "old_password": {"type": "string", "required": True},
    "new_password": {"type": "string", "required": True}
}


@protected()
async def get(req):
    """
    Get complete user document

    """<commit_msg>Fix PATCH /account/settings validator<commit_after>from pymongo import ReturnDocument

import virtool.utils
import virtool.user
import virtool.user_permissions
import virtool.validators

from virtool.handlers.utils import json_response, no_content, bad_request, protected, validation, unpack_request, \
    not_found

SETTINGS_SCHEMA = {
    "show_ids": {
        "type": "boolean",
        "required": False
    },
    "quick_analyze_algorithm": {
        "type": "boolean",
        "required": False
    },
    "skip_quick_analyze_dialog": {
        "type": "boolean",
        "required": False
    }
}


PASSWORD_SCHEMA = {
    "old_password": {"type": "string", "required": True},
    "new_password": {"type": "string", "required": True}
}


@protected()
async def get(req):
    """
    Get complete user document

    """
{'fraction_non_alphanumeric': 0.13508771929824562, 'fraction_numerical': 0.0, 'mean_word_length': 3.266832917705736, 'pattern_counts': {'":': 33, '<': 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': '2105840', 'n_tokens_mistral': 538, 'n_tokens_neox': 531, 'n_words': 122}