<commit_before>from collections import OrderedDict, namedtuple

from django.db import models
from django.utils.translation import ugettext_lazy as _
from django.utils.translation import get_language

from c3nav.mapdata.models.level import Level
from c3nav.mapdata.models.package import Package

from ..fields import GeometryField


class FeatureType(namedtuple('FeatureType', ('name', 'title', 'title_plural', 'geomtype', 'color'))):
    def __init__(self, *args, **kwargs):
        FEATURE_TYPES[self.name] = self


FEATURE_TYPES = OrderedDict()
FeatureType('building', _('Building'), _('Buildings'), 'polygon', '#333333')
FeatureType('room', _('Room'), _('Rooms'), 'polygon', '#CCCCCC')
FeatureType('outside', _('Outside Area'), _('Outside Areas'), 'polygon', '#EEEEEE')
FeatureType('obstacle', _('Obstacle'), _('Obstacles'), 'polygon', '#999999')


# FeatureType('door', _('Door'), 'polygon', '#FF00FF')
# FeatureType('step', _('Step'), 'polyline', '#FF0000')
# FeatureType('elevator', _('Elevator'), 'polygon', '#99CC00')

<commit_msg>add super().__init__() to FeatureType<commit_after>from collections import OrderedDict, namedtuple

from django.db import models
from django.utils.translation import ugettext_lazy as _
from django.utils.translation import get_language

from c3nav.mapdata.models.level import Level
from c3nav.mapdata.models.package import Package

from ..fields import GeometryField


class FeatureType(namedtuple('FeatureType', ('name', 'title', 'title_plural', 'geomtype', 'color'))):
    def __init__(self, *args, **kwargs):
        super().__init__()
        FEATURE_TYPES[self.name] = self


FEATURE_TYPES = OrderedDict()
FeatureType('building', _('Building'), _('Buildings'), 'polygon', '#333333')
FeatureType('room', _('Room'), _('Rooms'), 'polygon', '#CCCCCC')
FeatureType('outside', _('Outside Area'), _('Outside Areas'), 'polygon', '#EEEEEE')
FeatureType('obstacle', _('Obstacle'), _('Obstacles'), 'polygon', '#999999')


# FeatureType('door', _('Door'), 'polygon', '#FF00FF')
# FeatureType('step', _('Step'), 'polyline', '#FF0000')
# FeatureType('elevator', _('Elevator'), 'polygon', '#99CC00')


{'fraction_non_alphanumeric': 0.18412400187881633, 'fraction_numerical': 0.02254579614842649, 'mean_word_length': 7.287937743190661, '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': '110881', 'n_tokens_mistral': 720, 'n_tokens_neox': 674, 'n_words': 162}