<commit_before>""" API relating to server time """
import datetime

from flask_restful import marshal_with, Resource

from .util import DT_FORMATTER
from dockci.server import API


NOW_FIELDS = {
    'now_ts': DT_FORMATTER,
}


class NowDetail(Resource):
    @marshal_with(NOW_FIELDS)
    def get(self):
        return {'now_ts': datetime.datetime.now()}


API.add_resource(NowDetail,
                 '/time/now',
                 endpoint='time_now')<commit_msg>Pylint<commit_after>""" API relating to server time """
import datetime

from flask_restful import marshal_with, Resource

from .util import DT_FORMATTER
from dockci.server import API


NOW_FIELDS = {
    'now_ts': DT_FORMATTER,
}


class NowDetail(Resource):
    """ API to retrieve current server time """
    @marshal_with(NOW_FIELDS)
    def get(self):  # pylint:disable=no-self-use
        """ Return current server time """
        return {'now_ts': datetime.datetime.now()}


API.add_resource(NowDetail,
                 '/time/now',
                 endpoint='time_now')
{'fraction_non_alphanumeric': 0.11036468330134357, 'fraction_numerical': 0.0, 'mean_word_length': 3.2398373983739837, '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': '3172707', 'n_tokens_mistral': 330, 'n_tokens_neox': 316, 'n_words': 80}