kopia lustrzana https://github.com/collective/icalendar
Move prop.py as __init__.py into a directory
rodzic
b4d6614b38
commit
776dc2b7a7
|
|
@ -184,7 +184,7 @@ extend-safe-fixes = [
|
|||
"N999", # module name
|
||||
"PT027", # assertRaises
|
||||
]
|
||||
"src/icalendar/prop.py" = [
|
||||
"src/icalendar/prop/__init__.py" = [
|
||||
"N801", # Class name should use CamelCase
|
||||
]
|
||||
"src/icalendar/fuzzing/*" = [
|
||||
|
|
|
|||
|
|
@ -717,6 +717,17 @@ class vDDDTypes(TimeBase):
|
|||
return vTime.from_ical(ical)
|
||||
raise ValueError(f"Expected datetime, date, or time. Got: '{ical}'")
|
||||
|
||||
@property
|
||||
def td(self) -> timedelta:
|
||||
"""Compatibility property returning self.dt.
|
||||
|
||||
This class is used to replace different time components.
|
||||
Some of them contain a datetime or date (.dt).
|
||||
Some of them contain a timedelta (.td).
|
||||
This property allows interoperability.
|
||||
"""
|
||||
return self.dt
|
||||
|
||||
|
||||
class vDate(TimeBase):
|
||||
"""Date
|
||||
Ładowanie…
Reference in New Issue