Hot-keys on this page
r m x p toggle line displays
j k next/prev highlighted chunk
0 (zero) top of page
1 (one) first highlighted chunk
"""LICENSE Copyright 2018 Hermann Krumrey <hermann@krumreyh.com>
This file is part of anime-list-apis.
anime-list-apis is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
anime-list-apis is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with anime-list-apis. If not, see <http://www.gnu.org/licenses/>. LICENSE"""
""" Enumeration modelling the different score types The value of the enum specifies the maximum value a score of that type may be. For example, TEN_POINT scores may range from 0 to 10 """
""" Class that models a score. Allows for different score types. """
""" Initializes the Score object. The score must be a positive number that less or equal than the maximum score of the score type. :param score: The points of the score :param score_type: The Type of score :raises TypeError: In case any of the parameter values is of the wrong type :raises ValueError: If the score is outside the valid range """
""" Retrieves the score converted to the selected score type. If no score type was supplied, returns the default score type's score :param score_type: The score type in which to retrieve the score. If left as None, will result in the default score type to be used :return: The score in the provided score type """ else:
""" Converts the internal score representation to another score type :param score_type: The score type to which to convert to :return: None """
# noinspection PyMethodMayBeStatic """ Converts a score from one score type to another. If converting to a score type of a higher accuracy, inaccuracies may occur and when converting to a less accurate one, loss of information may occur :param score: The score to convert :param source: The source score type :param dest: The destination score type :return: The converted score value """
or Dict or List or Tuple or Set]]: """ Serializes the object into a dictionary :return: The serialized form of this object """
or Dict or List or Tuple or Set]]): """ Deserializes a dictionary into an object of this type :param data: The data to deserialize :return: The deserialized object :raises TypeError: If a type error occurred :raises ValueError: If the data could not be deserialized """
|