# Path: privacyscore/evaluation/rating.py
# class Rating:
#     """
#     A rating.
# 
#     It can be critical, bad, warning, good or doubleplusgood.
#     """
#     # rating  : str
#     # influences_ranking  : bool
#     # devaluates_group : bool
# 
#     ORDERING = ['critical', 'bad', 'warning', 'neutral', 'good', 'doubleplusgood']
# 
#     def __init__(self, rating: str, influences_ranking: bool = True, devaluates_group: bool = False):
#         self.rating = rating
#         self.influences_ranking = influences_ranking
#         self.devaluates_group = devaluates_group
# 
#     def __str__(self) -> str:
#         return self.rating
# 
#     def __repr__(self) -> str:
#         return '<Rating {}>'.format(str(self))
# 
#     def __eq__(self, other) -> bool:
#         return self.rating == other.rating
# 
#     def __lt__(self, other) -> bool:
#         return self.ORDERING.index(self.rating) < self.ORDERING.index(other.rating)
# 
#     def __le__(self, other) -> bool:
#         return self.ORDERING.index(self.rating) <= self.ORDERING.index(other.rating)
# 
#     def __gt__(self, other) -> bool:
#         return self.ORDERING.index(self.rating) > self.ORDERING.index(other.rating)
# 
#     def __ge__(self, other) -> bool:
#         return self.ORDERING.index(self.rating) >= self.ORDERING.index(other.rating)


from django.utils.translation import ugettext_lazy as _
from privacyscore.evaluation.rating import Rating
    'Malta',
    'Netherlands',
    'Poland',
    'Portugal',
    'Romania',
    'Slovakia',
    'Slovenia',
    'Spain',
    'Sweden',
    'United Kingdom',
    # Non-EU, but EEA which implement GDPR
    'Iceland',
    'Liechtenstein',
    'Norway',
]


def describe_locations(server_type: str, locations: list) -> dict:
    """Describe a list of locations."""
    locations = [location for location in locations if location]
    if not locations:
        return {
            'description': _('The locations of the %(server_type)s could not '
                             'be detected.') % {'server_type': server_type},
            'classification': Rating('neutral', influences_ranking=False),
            'details_list': None
        }
    rating = Rating('good')
    for country in locations:
        if country not in GDPR_STATES:

# Path: privacyscore/evaluation/rating.py
# class Rating:
#     """
#     A rating.
# 
#     It can be critical, bad, warning, good or doubleplusgood.
#     """
#     # rating  : str
#     # influences_ranking  : bool
#     # devaluates_group : bool
# 
#     ORDERING = ['critical', 'bad', 'warning', 'neutral', 'good', 'doubleplusgood']
# 
#     def __init__(self, rating: str, influences_ranking: bool = True, devaluates_group: bool = False):
#         self.rating = rating
#         self.influences_ranking = influences_ranking
#         self.devaluates_group = devaluates_group
# 
#     def __str__(self) -> str:
#         return self.rating
# 
#     def __repr__(self) -> str:
#         return '<Rating {}>'.format(str(self))
# 
#     def __eq__(self, other) -> bool:
#         return self.rating == other.rating
# 
#     def __lt__(self, other) -> bool:
#         return self.ORDERING.index(self.rating) < self.ORDERING.index(other.rating)
# 
#     def __le__(self, other) -> bool:
#         return self.ORDERING.index(self.rating) <= self.ORDERING.index(other.rating)
# 
#     def __gt__(self, other) -> bool:
#         return self.ORDERING.index(self.rating) > self.ORDERING.index(other.rating)
# 
#     def __ge__(self, other) -> bool:
#         return self.ORDERING.index(self.rating) >= self.ORDERING.index(other.rating)


# Path: privacyscore/evaluation/description.py
from django.utils.translation import ugettext_lazy as _
from privacyscore.evaluation.rating import Rating

    'Malta',
    'Netherlands',
    'Poland',
    'Portugal',
    'Romania',
    'Slovakia',
    'Slovenia',
    'Spain',
    'Sweden',
    'United Kingdom',
    # Non-EU, but EEA which implement GDPR
    'Iceland',
    'Liechtenstein',
    'Norway',
]


def describe_locations(server_type: str, locations: list) -> dict:
    """Describe a list of locations."""
    locations = [location for location in locations if location]
    if not locations:
        return {
            'description': _('The locations of the %(server_type)s could not '
                             'be detected.') % {'server_type': server_type},
            'classification': Rating('neutral', influences_ranking=False),
            'details_list': None
        }
    rating = Rating('good')
    for country in locations:
        if country not in GDPR_STATES:

            rating = Rating('bad')