<commit_before>import datetime
from dateutil.relativedelta import relativedelta

from django import forms
from django.db.models import Q

from selectable import forms as selectable

from timepiece import utils
from timepiece.crm.models import Project, ProjectRelationship
from timepiece.entries.models import Entry, Location, ProjectHours
from timepiece.entries.lookups import ActivityLookup
from timepiece.forms import (
    INPUT_FORMATS, TimepieceSplitDateTimeField, TimepieceDateInput)


class ClockInForm(forms.ModelForm):
    # activity = selectable.AutoComboboxSelectWidget(
    #     lookup_class=ActivityLookup,
    # )
    active_comment = forms.CharField(
        label='Notes for the active entry', widget=forms.Textarea,
        required=False)
    start_time = TimepieceSplitDateTimeField(required=False)

    class Meta:
        model = Entry
        fields = ('active_comment', 'location', 'project', 'activity',
                  'start_time', 'comments')
        widgets = {
            'activity': selectable.AutoComboboxSelectWidget(lookup_class=ActivityLookup),
        }

    def __init__(self, *args, **kwargs):
        self.user = kwargs.pop('user')
        self.active = kwargs.pop('active', None)

        initial = kwargs.get('initial', {})
        default_loc = utils.get_setting('TIMEPIECE_DEFAULT_LOCATION_SLUG')
        if default_loc:
            try:<commit_msg>removed comments<commit_after>import datetime
from dateutil.relativedelta import relativedelta

from django import forms
from django.db.models import Q

from selectable import forms as selectable

from timepiece import utils
from timepiece.crm.models import Project, ProjectRelationship
from timepiece.entries.models import Entry, Location, ProjectHours
from timepiece.entries.lookups import ActivityLookup
from timepiece.forms import (
    INPUT_FORMATS, TimepieceSplitDateTimeField, TimepieceDateInput)


class ClockInForm(forms.ModelForm):
    active_comment = forms.CharField(
        label='Notes for the active entry', widget=forms.Textarea,
        required=False)
    start_time = TimepieceSplitDateTimeField(required=False)

    class Meta:
        model = Entry
        fields = ('active_comment', 'location', 'project', 'activity',
                  'start_time', 'comments')
        widgets = {
            'activity': selectable.AutoComboboxSelectWidget(lookup_class=ActivityLookup),
        }

    def __init__(self, *args, **kwargs):
        self.user = kwargs.pop('user')
        self.active = kwargs.pop('active', None)

        initial = kwargs.get('initial', {})
        default_loc = utils.get_setting('TIMEPIECE_DEFAULT_LOCATION_SLUG')
        if default_loc:
            try:
{'fraction_non_alphanumeric': 0.08729569093610698, 'fraction_numerical': 0.0, 'mean_word_length': 3.6192109777015435, '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': '7218747', 'n_tokens_mistral': 734, 'n_tokens_neox': 727, 'n_words': 179}