kopia lustrzana https://github.com/collective/icalendar
docs: add __all__ variables to some modules
rodzic
6d0596dbce
commit
43e5357e49
|
@ -764,3 +764,8 @@ class Calendar(Component):
|
|||
# These are read only singleton, so one instance is enough for the module
|
||||
types_factory = TypesFactory()
|
||||
component_factory = ComponentFactory()
|
||||
|
||||
__all__ = ["Alarm", "Calendar", "Component", "ComponentFactory", "Event",
|
||||
"FreeBusy", "INLINE", "Journal", "Timezone", "TimezoneDaylight",
|
||||
"TimezoneStandard", "Todo", "component_factory", "dateutil",
|
||||
"types_factory"]
|
||||
|
|
|
@ -106,3 +106,6 @@ class CaselessDict(OrderedDict):
|
|||
Items not specified in canonical_order will appear at the end.
|
||||
"""
|
||||
return canonsort_items(self, self.canonical_order)
|
||||
|
||||
|
||||
__all__ = ["canonsort_keys", "canonsort_items", "CaselessDict"]
|
||||
|
|
|
@ -384,3 +384,11 @@ class Contentlines(list):
|
|||
|
||||
# XXX: what kind of hack is this? import depends to be at end
|
||||
from icalendar.prop import vText
|
||||
|
||||
|
||||
__all__ = ["Contentline", "Contentlines", "FOLD", "NAME", "NEWLINE",
|
||||
"Parameters", "QUNSAFE_CHAR", "QUOTABLE", "UNSAFE_CHAR", "dquote",
|
||||
"escape_char", "escape_string", "foldline", "param_value", "q_join",
|
||||
"q_split", "tzid_from_dt", "uFOLD", "unescape_char",
|
||||
"unescape_list_or_string", "unescape_string", "validate_param_value",
|
||||
"validate_token"]
|
||||
|
|
|
@ -48,3 +48,7 @@ def data_encode(data: Union[ICAL_TYPE, dict, list], encoding=DEFAULT_ENCODING) -
|
|||
return list(map(data_encode, data))
|
||||
else:
|
||||
return data
|
||||
|
||||
|
||||
__all__ = ["DEFAULT_ENCODING", "SEQUENCE_TYPES", "data_encode", "from_unicode",
|
||||
"to_unicode"]
|
||||
|
|
|
@ -1119,3 +1119,11 @@ class TypesFactory(CaselessDict):
|
|||
type_class = self.for_property(name)
|
||||
decoded = type_class.from_ical(value)
|
||||
return decoded
|
||||
|
||||
__all__ = ["DSTDIFF", "DSTOFFSET", "DURATION_REGEX", "FixedOffset", "HOUR",
|
||||
"LocalTimezone", "STDOFFSET", "TimeBase", "TypesFactory",
|
||||
"WEEKDAY_RULE", "ZERO", "from_unicode", "tzid_from_dt", "vBinary",
|
||||
"vBoolean", "vCalAddress", "vCategory", "vDDDLists", "vDDDTypes",
|
||||
"vDate", "vDatetime", "vDuration", "vFloat", "vFrequency", "vGeo",
|
||||
"vInline", "vInt", "vPeriod", "vRecur", "vText", "vTime",
|
||||
"vUTCOffset", "vUri", "vWeekday"]
|
||||
|
|
|
@ -43,3 +43,5 @@ class TZProvider(ABC):
|
|||
@abstractmethod
|
||||
def uses_zoneinfo(self) -> bool:
|
||||
"""Whether we use zoneinfo."""
|
||||
|
||||
__all__ = ["TZProvider"]
|
||||
|
|
|
@ -31,3 +31,5 @@ class UIDGenerator:
|
|||
unique = unique or UIDGenerator.rnd_string()
|
||||
today = to_unicode(vDatetime(datetime.today()).to_ical())
|
||||
return vText(f'{today}-{unique}@{host_name}')
|
||||
|
||||
__all__ = ["UIDGenerator"]
|
||||
|
|
Ładowanie…
Reference in New Issue