-
-
Couldn't load subscription status.
- Fork 1.2k
Closed
Labels
Bug 🪲False Negative 🦋No message is emitted but something is wrong with the codeNo message is emitted but something is wrong with the code
Milestone
Description
Steps to reproduce
Try to lint following code:
a = 1
def foo():
global a
print(a)Current behavior
No config file found, using default configuration
************* Module test
W: 3, 0: Found indentation with tabs instead of spaces (mixed-indentation)
W: 4, 0: Found indentation with tabs instead of spaces (mixed-indentation)
C: 1, 0: Missing module docstring (missing-docstring)
C: 1, 0: Invalid constant name "a" (invalid-name)
C: 2, 0: Black listed name "foo" (blacklisted-name)
C: 2, 0: Missing function docstring (missing-docstring)
C: 3, 1: Invalid constant name "a" (invalid-name)
W: 3, 1: Using the global statement (global-statement)
Expected behavior
W: 3, 1: Using global for 'a' but no assignment is done (global-variable-not-as
signed)
pylint --version output
pylint 1.7.0,
astroid 1.5.0
Python 3.6.0 (v3.6.0:41df79263a11, Dec 23 2016, 07:18:10) [MSC v.1900 32 bit (In
tel)]
It is reported correctly in pylint 1.6.5.
No config file found, using default configuration
************* Module test
W: 3, 0: Found indentation with tabs instead of spaces (mixed-indentation)
W: 4, 0: Found indentation with tabs instead of spaces (mixed-indentation)
C: 1, 0: Missing module docstring (missing-docstring)
C: 1, 0: Invalid constant name "a" (invalid-name)
C: 2, 0: Black listed name "foo" (blacklisted-name)
C: 2, 0: Missing function docstring (missing-docstring)
W: 3, 1: Using global for 'a' but no assignment is done (global-variable-not-as
signed)
C: 3, 1: Invalid constant name "a" (invalid-name)
__main__.py 1.6.5,
astroid 1.4.9
Python 3.5.3 (v3.5.3:1880cb95a742, Jan 16 2017, 15:51:26) [MSC v.1900 32 bit (In
tel)]
Metadata
Metadata
Assignees
Labels
Bug 🪲False Negative 🦋No message is emitted but something is wrong with the codeNo message is emitted but something is wrong with the code