Commit f714577
authored
DOC: fix minor docstring grammar in events.py (#3783)
This PR fixes a few small docstring grammar issues in
`ignite/engine/events.py`. There are **no code or behavior changes**,
only wording fixes in comments/docstrings.
All changes are minimal and localized, for example:
```python
# Before
"""Single Event containing a filter, specifying whether the event should
be run at the current event (if the event type is correct)
Args:
value: The actual enum value. Only needed for internal use. Do not touch!
event_filter: A function taking the engine and the current event value as input and returning a
boolean to indicate whether this event should be executed. Defaults to None, which will result to a
function that always returns `True`
name: The enum-name of the current object. Only needed for internal use. Do not touch!
"""
```
```python
# After
"""Single event containing a filter specifying whether the handler should be run for the current event (if the event type is correct).
Args:
value: The actual enum value. Only needed for internal use. Do not touch!
event_filter: A function taking the engine and the current event value as input and returning a
boolean to indicate whether this event should be executed. Defaults to None, which will result in a
function that always returns `True`.
name: The enum-name of the current object. Only needed for internal use. Do not touch!
"""
```
The deprecated default event filter docstring is also cleaned up: [is
is]
```python
# Before
"""Default event filter. This method is is deprecated and will be removed. Please, use None instead"""
# After
"""Default event filter. This method is deprecated and will be removed. Please use None instead."""
```
These changes:
- Fix a duplicated word: `is is`.
- Replace “result to” with the correct “result in”.
- Make the `CallableEventWithFilter` docstring clearer and grammatically
correct.
- Fixed: "User can also combine events" --> "Users can also ..."1 parent 8de8822 commit f714577
1 file changed
Lines changed: 3 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
26 | | - | |
| 26 | + | |
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
| |||
178 | 178 | | |
179 | 179 | | |
180 | 180 | | |
181 | | - | |
| 181 | + | |
182 | 182 | | |
183 | 183 | | |
184 | 184 | | |
| |||
347 | 347 | | |
348 | 348 | | |
349 | 349 | | |
350 | | - | |
| 350 | + | |
351 | 351 | | |
352 | 352 | | |
353 | 353 | | |
| |||
0 commit comments