summaryrefslogtreecommitdiff
path: root/doc/user_guide
diff options
context:
space:
mode:
authorDani Alcala <112832187+clavedeluna@users.noreply.github.com>2023-02-01 18:12:15 -0300
committerGitHub <noreply@github.com>2023-02-01 22:12:15 +0100
commitb04e690a429adb5a1b0f17b909d8a98149f22fea (patch)
treeb403612e2d63aebaf97c2d32645388ad9c1a3115 /doc/user_guide
parent588c837efc074700d6a49edea8714c7934701012 (diff)
downloadpylint-git-b04e690a429adb5a1b0f17b909d8a98149f22fea.tar.gz
Update docs for `global-variable-not-assigned` (#8151)
Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com>
Diffstat (limited to 'doc/user_guide')
-rw-r--r--doc/user_guide/checkers/features.rst5
1 files changed, 3 insertions, 2 deletions
diff --git a/doc/user_guide/checkers/features.rst b/doc/user_guide/checkers/features.rst
index 1ebf5ca53..579f7f987 100644
--- a/doc/user_guide/checkers/features.rst
+++ b/doc/user_guide/checkers/features.rst
@@ -1363,8 +1363,9 @@ Variables checker Messages
:unused-variable (W0612): *Unused variable %r*
Used when a variable is defined but not used.
:global-variable-not-assigned (W0602): *Using global for %r but no assignment is done*
- Used when a variable is defined through the "global" statement but no
- assignment to this variable is done.
+ When a variable defined in the global scope is modified in an inner scope, the
+ 'global' keyword is required in the inner scope only if there is an
+ assignment operation done in the inner scope.
:undefined-loop-variable (W0631): *Using possibly undefined loop variable %r*
Used when a loop variable (i.e. defined by a for loop or a list comprehension
or a generator expression) is used outside the loop.