Skip to content

Commit

Permalink
Update docstrings
Browse files Browse the repository at this point in the history
Signed-off-by: Tsuyoshi Hombashi <tsuyoshi.hombashi@gmail.com>
  • Loading branch information
thombashi committed Apr 30, 2024
1 parent 4e24ee7 commit 57fc7df
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions datetimerange/_core.py
Original file line number Diff line number Diff line change
Expand Up @@ -367,14 +367,14 @@ def is_set(self) -> bool:

def validate_time_inversion(self) -> None:
"""
Check time inversion of the time range.
Check the time inversion of the time range.
:raises ValueError:
If |attr_start_datetime| is
bigger than |attr_end_datetime|.
:raises TypeError:
Any one of |attr_start_datetime| and |attr_end_datetime|,
or both is inappropriate datetime value.
or both are inappropriate datetime values.
:Sample Code:
.. code:: python
Expand Down Expand Up @@ -699,7 +699,7 @@ def intersection(
) -> "DateTimeRange":
"""
Create a new time range that overlaps the input and the current time range.
If no overlaps found, return a time range that set ``None`` for both start and end time.
If no overlaps are found, return a time range that sets ``None`` for both start and end time.
:param DateTimeRange x:
Value to compute intersection with the current time range.
Expand Down Expand Up @@ -847,7 +847,7 @@ def encompass(self, x: "DateTimeRange") -> "DateTimeRange":
Create a new time range that encompasses the input and the current time range.
:param DateTimeRange x:
Value to compute encompass with the current time range.
Value to compute encompasses the current time range.
:Sample Code:
.. code:: python
Expand Down Expand Up @@ -878,7 +878,7 @@ def encompass(self, x: "DateTimeRange") -> "DateTimeRange":

def truncate(self, percentage: float) -> None:
"""
Truncate ``percentage`` / 2 [%] of whole time from first and last time.
Truncate ``percentage`` / 2 [%] of the whole time from the first and last time.
:param float percentage: Percentage of truncate.
Expand Down Expand Up @@ -921,7 +921,7 @@ def split(self, separator: Union[str, datetime.datetime]) -> List["DateTimeRange
:param Union[str, datetime.datetime] separator:
Date and time to split the DateTimeRange.
This value will be included for both of the ranges after split.
This value will be included for both of the ranges after the split.
:Sample Code:
.. code:: python
Expand Down Expand Up @@ -982,7 +982,7 @@ def from_range_text(
e.g. ``2021-01-23T10:00:00+0400 - 2021-01-232T10:10:00+0400``
:param str separator:
Regular expression that separating the ``range_text`` to start and end time.
Regular expression that separates the ``range_text`` to start and end time.
:return: DateTimeRange
Created instance.
Expand Down

0 comments on commit 57fc7df

Please sign in to comment.