Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add example for undefined-all-variable message documentation #6160

Merged
merged 5 commits into from
Apr 3, 2022
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions doc/data/messages/u/undefined-all-variable/bad.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
__all__ = [
"pet",
"age",
"get_fruit_color", # [undefined-all-variable]
]

pet = "Cat"
age = 10


def get_pet_age():
pass
Pierre-Sassoulas marked this conversation as resolved.
Show resolved Hide resolved
12 changes: 12 additions & 0 deletions doc/data/messages/u/undefined-all-variable/good.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
__all__ = [
"pet",
"age",
"get_pet_age",
]

pet = "Cat"
age = 10


def get_pet_age():
pass
Pierre-Sassoulas marked this conversation as resolved.
Show resolved Hide resolved
1 change: 1 addition & 0 deletions doc/data/messages/u/undefined-all-variable/related.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* `Importing * From a Package <https://docs.python.org/3/tutorial/modules.html#importing-from-a-package>`_