<commit_before># -*- coding: utf-8 -*-

from __future__ import division, print_function

import copy
import datetime
import re
import sys
import threading
if sys.version_info.major == 3:
    from builtins import object, range, str
from collections import OrderedDict

import dateutil.tz
from dateutil.parser import parse as dateutil_parser

from .fetcher import Fetcher, REPO_CREATED_TAG_NAME
from .pygcgen_exceptions import ChangelogGeneratorError
from .reader import read_changelog


def timestring_to_datetime(timestring):
    """
    Convert an ISO formated date and time string to a datetime object.

    :param str timestring: String with date and time in ISO format.
    :rtype: datetime
    :return: datetime object
    """
    result = dateutil_parser(str(timestring))
    return result


# noinspection PyTypeChecker
class Generator(object):
    """
    A Generator responsible for all logic, related with
    change log generation from ready-to-parse issues.
    """

    def __init__(self, options):
        self.options = options
        self.tag_times_dict = {}
        self.issues = []
        self.issues2 = []
        self.pull_requests = []
        self.all_tags = []
        self.filtered_tags = []
        self.fetcher = Fetcher(options)
<commit_msg>ignore some UnicodeWarning generated by dateutil<commit_after># -*- coding: utf-8 -*-

from __future__ import division, print_function

import copy
import datetime
import re
import sys
import threading
if sys.version_info.major == 3:
    from builtins import object, range, str
from collections import OrderedDict

import dateutil.tz
from dateutil.parser import parse as dateutil_parser

from .fetcher import Fetcher, REPO_CREATED_TAG_NAME
from .pygcgen_exceptions import ChangelogGeneratorError
from .reader import read_changelog


def timestring_to_datetime(timestring):
    """
    Convert an ISO formated date and time string to a datetime object.

    :param str timestring: String with date and time in ISO format.
    :rtype: datetime
    :return: datetime object
    """
    with warnings.catch_warnings():
        warnings.filterwarnings("ignore", category=UnicodeWarning)
        result = dateutil_parser(timestring)

    return result


# noinspection PyTypeChecker
class Generator(object):
    """
    A Generator responsible for all logic, related with
    change log generation from ready-to-parse issues.
    """

    def __init__(self, options):
        self.options = options
        self.tag_times_dict = {}
        self.issues = []
        self.issues2 = []
        self.pull_requests = []
        self.all_tags = []
        self.filtered_tags = []
        self.fetcher = Fetcher(options)

{'fraction_non_alphanumeric': 0.07505601194921584, 'fraction_numerical': 0.0022404779686333084, 'mean_word_length': 3.3279483037156705, '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': '7180269', 'n_tokens_mistral': 763, 'n_tokens_neox': 752, 'n_words': 243}