<commit_before># encoding: utf-8

"""
.. codeauthor:: <NAME> <<EMAIL>>
"""

from __future__ import division, unicode_literals

import datetime

import dateutil.parser
import dateutil.relativedelta as rdelta
import typepy

from .__version__ import __author__, __copyright__, __email__, __license__, __version__


class DateTimeRange(object):
    """
    The class that represents the time range.

    :param datetime.datetime/str start: |param_start_datetime|
    :param datetime.datetime/str end: |param_end_datetime|

    :Examples:
        :Sample Code:
            .. code:: python

                from datetimerange import DateTimeRange
                DateTimeRange("2015-03-22T10:00:00+0900", "2015-03-22T10:10:00+0900")

        :Output:
            .. parsed-literal::

                2015-03-22T10:00:00+0900 - 2015-03-22T10:10:00+0900

    .. py:attribute:: start_time_format

        Conversion format string for :py:attr:`.start_datetime`.

        .. seealso:: :py:meth:`.get_start_time_str`

    .. py:attribute:: end_time_format

        Conversion format string for :py:attr:`.end_datetime`.

        .. seealso:: :py:meth:`.get_end_time_str`
    """

    NOT_A_TIME_STR = "NaT"

    def __init__(
        self,
        start_datetime=None,
        end_datetime=None,
        start_time_format="%Y-%m-%dT%H:%M:%S%z",
        end_time_format="%Y-%m-%dT%H:%M:%S%z",
    ):

        self.set_time_range(start_datetime, end_datetime)

        self.start_time_format = start_time_format
        self.end_time_format = end_time_format

        self.is_output_elapse = False
        self.separator = " - "

    def __repr__(self):
        if self.is_output_elapse:
            suffix = " ({})".format(self.end_datetime - self.start_datetime)
        else:
            suffix = ""

        return self.separator.join((self.get_start_time_str(), self.get_end_time_str())) + suffix

    def __eq__(self, other):
        if not isinstance(other, DateTimeRange):
            return False
<commit_msg>Remove a blank line<commit_after># encoding: utf-8

"""
.. codeauthor:: <NAME> <<EMAIL>>
"""

from __future__ import division, unicode_literals

import datetime

import dateutil.parser
import dateutil.relativedelta as rdelta
import typepy

from .__version__ import __author__, __copyright__, __email__, __license__, __version__


class DateTimeRange(object):
    """
    The class that represents the time range.

    :param datetime.datetime/str start: |param_start_datetime|
    :param datetime.datetime/str end: |param_end_datetime|

    :Examples:
        :Sample Code:
            .. code:: python

                from datetimerange import DateTimeRange
                DateTimeRange("2015-03-22T10:00:00+0900", "2015-03-22T10:10:00+0900")

        :Output:
            .. parsed-literal::

                2015-03-22T10:00:00+0900 - 2015-03-22T10:10:00+0900

    .. py:attribute:: start_time_format

        Conversion format string for :py:attr:`.start_datetime`.

        .. seealso:: :py:meth:`.get_start_time_str`

    .. py:attribute:: end_time_format

        Conversion format string for :py:attr:`.end_datetime`.

        .. seealso:: :py:meth:`.get_end_time_str`
    """

    NOT_A_TIME_STR = "NaT"

    def __init__(
        self,
        start_datetime=None,
        end_datetime=None,
        start_time_format="%Y-%m-%dT%H:%M:%S%z",
        end_time_format="%Y-%m-%dT%H:%M:%S%z",
    ):
        self.set_time_range(start_datetime, end_datetime)

        self.start_time_format = start_time_format
        self.end_time_format = end_time_format

        self.is_output_elapse = False
        self.separator = " - "

    def __repr__(self):
        if self.is_output_elapse:
            suffix = " ({})".format(self.end_datetime - self.start_datetime)
        else:
            suffix = ""

        return self.separator.join((self.get_start_time_str(), self.get_end_time_str())) + suffix

    def __eq__(self, other):
        if not isinstance(other, DateTimeRange):
            return False

{'fraction_non_alphanumeric': 0.11899427433408016, 'fraction_numerical': 0.03634553149116256, 'mean_word_length': 2.642792384406165, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, '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': '630474', 'n_tokens_mistral': 1395, 'n_tokens_neox': 1257, 'n_words': 241}