Skip to content

Commit fcb64c4

Browse files
committed
[vobject] Partly annotate validate methods
Should help with python#14194
1 parent a92ecca commit fcb64c4

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

stubs/vobject/vobject/behavior.pyi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ class Behavior:
1414
forceUTC: bool
1515
sortFirst: Incomplete
1616
@classmethod
17-
def validate(cls, obj, raiseException: bool = False, complainUnrecognized: bool = False): ...
17+
def validate(cls, obj, raiseException: bool = False, complainUnrecognized: bool = False) -> bool: ...
1818
@classmethod
1919
def lineValidate(cls, line, raiseException, complainUnrecognized): ...
2020
@classmethod

stubs/vobject/vobject/icalendar.pyi

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ class VTimezone(VCalendarComponentBehavior):
118118
description: str
119119
sortFirst: Incomplete
120120
@classmethod
121-
def validate(cls, obj, raiseException, *args): ...
121+
def validate(cls, obj, raiseException: bool, *args) -> bool: ... # type: ignore[override]
122122
@staticmethod
123123
def transformToNative(obj): ...
124124
@staticmethod
@@ -134,13 +134,13 @@ class VEvent(RecurringBehavior):
134134
sortFirst: Incomplete
135135
description: str
136136
@classmethod
137-
def validate(cls, obj, raiseException, *args): ...
137+
def validate(cls, obj, raiseException: bool, *args) -> bool: ... # type: ignore[override]
138138

139139
class VTodo(RecurringBehavior):
140140
name: str
141141
description: str
142142
@classmethod
143-
def validate(cls, obj, raiseException, *args): ...
143+
def validate(cls, obj, raiseException: bool, *args) -> bool: ... # type: ignore[override]
144144

145145
class VJournal(RecurringBehavior):
146146
name: str
@@ -156,21 +156,21 @@ class VAlarm(VCalendarComponentBehavior):
156156
@staticmethod
157157
def generateImplicitParameters(obj) -> None: ...
158158
@classmethod
159-
def validate(cls, obj, raiseException, *args): ...
159+
def validate(cls, obj, raiseException: bool, *args) -> bool: ... # type: ignore[override]
160160

161161
class VAvailability(VCalendarComponentBehavior):
162162
name: str
163163
description: str
164164
sortFirst: Incomplete
165165
@classmethod
166-
def validate(cls, obj, raiseException, *args): ...
166+
def validate(cls, obj, raiseException: bool, *args) -> bool: ... # type: ignore[override]
167167

168168
class Available(RecurringBehavior):
169169
name: str
170170
sortFirst: Incomplete
171171
description: str
172172
@classmethod
173-
def validate(cls, obj, raiseException, *args): ...
173+
def validate(cls, obj, raiseException: bool, *args) -> bool: ... # type: ignore[override]
174174

175175
class Duration(Behavior):
176176
name: str

0 commit comments

Comments
 (0)