Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document methods in rrule module #1025

Merged
merged 2 commits into from Apr 24, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions changelog.d/1025.doc.rst
@@ -0,0 +1 @@
Fixed methods in the ``rrule`` module not being displayed in the docs. (gh pr #1025)
22 changes: 12 additions & 10 deletions dateutil/rrule.py
Expand Up @@ -5,25 +5,26 @@
`iCalendar RFC <https://tools.ietf.org/html/rfc5545>`_,
including support for caching of results.
"""
import itertools
import datetime
import calendar
import datetime
import heapq
import itertools
import re
import sys

try:
from math import gcd
except ImportError:
from fractions import gcd
from functools import wraps
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

functools.wraps is new, the rest have been sorted by isort

# For warning about deprecation of until and count
from warnings import warn

from six import advance_iterator, integer_types

from six.moves import _thread, range
import heapq

from ._common import weekday as weekdaybase

# For warning about deprecation of until and count
from warnings import warn
try:
from math import gcd
except ImportError:
from fractions import gcd

__all__ = ["rrule", "rruleset", "rrulestr",
"YEARLY", "MONTHLY", "WEEKLY", "DAILY",
Expand Down Expand Up @@ -81,6 +82,7 @@ def _invalidates_cache(f):
Decorator for rruleset methods which may invalidate the
cached length.
"""
@wraps(f)
def inner_func(self, *args, **kwargs):
rv = f(self, *args, **kwargs)
self._invalidate_cache()
Expand Down
6 changes: 6 additions & 0 deletions docs/rrule.rst
Expand Up @@ -9,7 +9,13 @@ Classes
-------

.. autoclass:: rrule
:members:
:undoc-members:
:inherited-members:
.. autoclass:: rruleset
:members:
:undoc-members:
:inherited-members:

Functions
---------
Expand Down