-
Notifications
You must be signed in to change notification settings - Fork 938
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a5e42d2
commit 3f20f73
Showing
4 changed files
with
74 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# yield-in-init (PLE0100) | ||
|
||
Derived from the **Pylint** linter. | ||
|
||
### What it does | ||
Checks for `__init__.py` methods that turned into generators | ||
via the presence of `yield` or `yield from` statements. | ||
|
||
### Why is this bad? | ||
Generators are not allowed in `__init__.py` methods. | ||
|
||
### Example | ||
```python | ||
class Foo: | ||
def __init__(self): | ||
yield 1 | ||
``` |