<commit_before>import datetime

from django.utils.timezone import utc

from .models import Ticket


class TicketServices():
    def edit_ticket_once(self, **kwargs):
        id_list = kwargs.get('id_list')
        edit_tags = kwargs.get('edit_tags')
        edit_requester = kwargs.get('edit_requester')
        edit_subject = kwargs.get('edit_subject')
        edit_due_at = kwargs.get('edit_due_at')
        edit_assignee = kwargs.get('edit_assignee')

        if edit_tags:
            Ticket.objects.filter(
                pk__in=id_list
            ).update(tags=edit_tags)
        if edit_subject:
            Ticket.objects.filter(
                pk__in=id_list
            ).update(subject=edit_subject)
        if edit_requester:
            Ticket.objects.filter(
                pk__in=id_list
            ).update(requester=edit_requester)
        if edit_due_at:
            Ticket.objects.filter(
                pk__in=id_list
            ).update(
                due_at=datetime.datetime.strptime(
                    edit_due_at, "%m/%d/%Y"
                ).replace(tzinfo=utc)
            )
        if edit_assignee:
            Ticket.objects.filter(
                pk__in=id_list
            ).update(assignee=edit_assignee)<commit_msg>Adjust code style to reduce lines of code :bear:<commit_after>import datetime

from django.utils.timezone import utc

from .models import Ticket


class TicketServices():
    def edit_ticket_once(self, **kwargs):
        id_list = kwargs.get('id_list')
        edit_tags = kwargs.get('edit_tags')
        edit_requester = kwargs.get('edit_requester')
        edit_subject = kwargs.get('edit_subject')
        edit_due_at = kwargs.get('edit_due_at')
        edit_assignee = kwargs.get('edit_assignee')

        if edit_tags:
            Ticket.objects.filter(pk__in=id_list).update(tags=edit_tags)
        if edit_subject:
            Ticket.objects.filter(pk__in=id_list).update(subject=edit_subject)
        if edit_requester:
            Ticket.objects.filter(pk__in=id_list).update(
                requester=edit_requester
            )
        if edit_due_at:
            Ticket.objects.filter(pk__in=id_list).update(
                due_at=datetime.datetime.strptime(
                    edit_due_at, '%m/%d/%Y'
                ).replace(tzinfo=utc)
            )
        if edit_assignee:
            Ticket.objects.filter(pk__in=id_list).update(
                assignee=edit_assignee
            )
{'fraction_non_alphanumeric': 0.09566274827725983, 'fraction_numerical': 0.0, 'mean_word_length': 1.9987849331713243, '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': '6878197', 'n_tokens_mistral': 769, 'n_tokens_neox': 745, 'n_words': 111}