8th day of python challenges 111-117

This commit is contained in:
abd.shallal
2019-08-04 15:26:35 +03:00
parent b04c1b055f
commit 627802c383
3215 changed files with 760227 additions and 491 deletions

View File

@@ -0,0 +1 @@
F: 1: ignored builtin module sys

View File

@@ -0,0 +1,2 @@
E: 12:function: Instance of 'unicode' has no 'looower' member
W: 4: Relative import 'func_w0401', should be 'input.func_w0401'

View File

@@ -0,0 +1,6 @@
C: 35: Wrong continued indentation (add 2 spaces).
for x in range(3)} # [bad-continuation]
^ |
C: 38: Wrong continued indentation (remove 4 spaces).
for x in range(3)} # [bad-continuation]
| ^

View File

@@ -0,0 +1,2 @@
W: 20: Specify string format arguments as logging function parameters
W: 21: Specify string format arguments as logging function parameters

View File

@@ -0,0 +1,2 @@
C: 1: Line too long (127/100)
C: 14: Line too long (114/100)

View File

@@ -0,0 +1,2 @@
C: 1: Line too long (127/100)
C: 14: Line too long (114/100)

View File

@@ -0,0 +1 @@
R: 8:Aaaa: Too few public methods (0/2)

View File

@@ -0,0 +1 @@
E: 1: Bad option value 'W04044'

View File

@@ -0,0 +1,3 @@
E: 11:Abcd.__init__: Method should have "self" as first argument
E: 15:Abcd.abdc: Method should have "self" as first argument

View File

@@ -0,0 +1,6 @@
E: 14:pprint: Too many arguments for logging format string
E: 15:pprint: Too many arguments for logging format string
E: 16:pprint: Logging format string ends in middle of conversion specifier
E: 17:pprint: Not enough arguments for logging format string
E: 18:pprint: Unsupported logging format character 'y' (0x79) at index 3
E: 19:pprint: Too many arguments for logging format string

View File

@@ -0,0 +1,13 @@
E: 11:pprint: Not enough arguments for format string
E: 12:pprint: Too many arguments for format string
E: 13:pprint: Mixing named and unnamed conversion specifiers in format string
E: 14:pprint: Missing key 'PARG_2' in format string dictionary
E: 16:pprint: Missing key 'PARG_2' in format string dictionary
E: 17:pprint: Expected mapping for format string, not Tuple
E: 18:pprint: Expected mapping for format string, not List
E: 19:pprint: Unsupported format character 'z' (0x7a) at index 2
E: 20:pprint: Format string ends in middle of conversion specifier
E: 21:pprint: Unsupported format character 'a' (0x61) at index 12
W: 15:pprint: Unused key 'PARG_3' in format string dictionary
W: 16:pprint: Format string dictionary key should be a string, not 2

View File

@@ -0,0 +1,11 @@
E: 11:pprint: Not enough arguments for format string
E: 12:pprint: Too many arguments for format string
E: 13:pprint: Mixing named and unnamed conversion specifiers in format string
E: 14:pprint: Missing key 'PARG_2' in format string dictionary
E: 16:pprint: Missing key 'PARG_2' in format string dictionary
E: 17:pprint: Expected mapping for format string, not Tuple
E: 18:pprint: Expected mapping for format string, not List
E: 19:pprint: Unsupported format character 'z' (0x7a) at index 2
E: 20:pprint: Format string ends in middle of conversion specifier
W: 15:pprint: Unused key 'PARG_3' in format string dictionary
W: 16:pprint: Format string dictionary key should be a string, not 2

View File

@@ -0,0 +1,9 @@
W: 7: Anomalous backslash in string: '\['. String constant might be missing an r prefix.
W: 7: Anomalous backslash in string: '\]'. String constant might be missing an r prefix.
W: 8: Anomalous backslash in string: '\/'. String constant might be missing an r prefix.
W: 9: Anomalous backslash in string: '\`'. String constant might be missing an r prefix.
W: 15: Anomalous backslash in string: '\o'. String constant might be missing an r prefix.
W: 15: Anomalous backslash in string: '\o'. String constant might be missing an r prefix.
W: 17: Anomalous backslash in string: '\8'. String constant might be missing an r prefix.
W: 17: Anomalous backslash in string: '\9'. String constant might be missing an r prefix.
W: 27: Anomalous backslash in string: '\P'. String constant might be missing an r prefix.

View File

@@ -0,0 +1,9 @@
C: 10:Obj.__new__: Class method __new__ should have 'cls' as first argument
C: 18:Obj.class2: Class method class2 should have 'cls' as first argument
C: 25:Meta.__new__: Metaclass class method __new__ should have 'cls' as first argument
C: 32:Meta.method2: Metaclass method method2 should have 'cls' as first argument
C: 40:Meta.class2: Metaclass class method class2 should have 'cls' as first argument
R: 16:Obj: Consider using a decorator instead of calling classmethod
R: 20:Obj: Consider using a decorator instead of calling classmethod
R: 38:Meta: Consider using a decorator instead of calling classmethod
R: 42:Meta: Consider using a decorator instead of calling classmethod

View File

@@ -0,0 +1,3 @@
I: 1: Id 'W0404' is used to disable 'reimported' message emission
I: 1: Locally disabling reimported (W0404)
I: 1: Useless suppression of 'reimported'

View File

@@ -0,0 +1 @@
I: 1: Id 'W0404' is used to enable 'reimported' message emission

View File

@@ -0,0 +1 @@
I: 1: Ignoring entire file

View File

@@ -0,0 +1,2 @@
I: 1: Ignoring entire file
I: 1: Pragma "disable-all" is deprecated, use "skip-file" instead

View File

@@ -0,0 +1,3 @@
I: 7: Id 'W0612' is used to disable 'unused-variable' message emission
I: 7: Locally disabling unused-variable (W0612)
I: 8: Suppressed 'unused-variable' (from line 7)

View File

@@ -0,0 +1,21 @@
I: 5: Locally disabling invalid-name (C0103)
I: 5: Suppressed 'invalid-name' (from line 5)
I: 6: Locally disabling invalid-name (C0103)
I: 6: Pragma "disable-msg" is deprecated, use "disable" instead
I: 6: Suppressed 'invalid-name' (from line 6)
I: 8: Locally disabling invalid-name (C0103)
I: 9: Suppressed 'invalid-name' (from line 8)
I: 12: Locally disabling invalid-name (C0103)
I: 12: Pragma "disable-msg" is deprecated, use "disable" instead
I: 13: Suppressed 'invalid-name' (from line 12)
I: 14: Pragma "enable-msg" is deprecated, use "enable" instead
I: 16: Id 'C0103' is used to disable 'invalid-name' message emission
I: 16: Locally disabling invalid-name (C0103)
I: 16: Pragma "disable-msg" is deprecated, use "disable" instead
I: 17: Suppressed 'invalid-name' (from line 16)
I: 18: Id 'C0103' is used to enable 'invalid-name' message emission
I: 18: Pragma "enable-msg" is deprecated, use "enable" instead
I: 20: Id 'C0103' is used to disable 'invalid-name' message emission
I: 20: Locally disabling invalid-name (C0103)
I: 21: Suppressed 'invalid-name' (from line 20)
I: 22: Id 'C0103' is used to enable 'invalid-name' message emission

View File

@@ -0,0 +1,4 @@
W: 8: Specify string format arguments as logging function parameters
W: 9: Specify string format arguments as logging function parameters
W: 11: Specify string format arguments as logging function parameters
W: 13: Specify string format arguments as logging function parameters

View File

@@ -0,0 +1 @@
W: 8:bad_case.<lambda>: Cell variable x defined in loop

View File

@@ -0,0 +1 @@
E: 5: Using variable '__dict__' before assignment

View File

@@ -0,0 +1,2 @@
E: 5: Using variable 'MSG' before assignment
E: 8: Using variable 'MSG2' before assignment

View File

@@ -0,0 +1,2 @@
C: 7: Constant name "value" doesn't conform to UPPER_CASE naming style
W: 12:clobbering: Redefining name 'value' from outer scope (line 7)

View File

@@ -0,0 +1,2 @@
W: 5:func: Redefining built-in '__file__'
W: 5:func: Using the global statement

View File

@@ -0,0 +1,3 @@
W: 5: Anomalous Unicode escape in byte string: '\u'. String constant might be missing an r or u prefix.
W: 6: Anomalous Unicode escape in byte string: '\U'. String constant might be missing an r or u prefix.
W: 7: Anomalous Unicode escape in byte string: '\N'. String constant might be missing an r or u prefix.

View File

@@ -0,0 +1,2 @@
E: 6:somegen: Return with argument inside generator
E: 15:moregen: Return with argument inside generator

View File

@@ -0,0 +1,4 @@
C: 1: Line too long (101/100)
C: 2: Line too long (104/100)
C: 17: Line too long (102/100)
C: 25: Line too long (105/100)

View File

@@ -0,0 +1,3 @@
E: 18: Assigning result of a function call, where the function has no return
E: 26: Assigning result of a function call, where the function returns None
E: 33: Assigning result of a function call, where the function returns None

View File

@@ -0,0 +1,9 @@
E: 25:Client.__init__: Class 'Provider' has no 'cattribute' member
E: 35:Client.use_method: Instance of 'Provider' has no 'hophophop' member
E: 40:Client.use_attr: Instance of 'Provider' has no 'attribute' member
E: 52:Client.test_bt_types: Instance of 'list' has no 'apppend' member
E: 54:Client.test_bt_types: Instance of 'dict' has no 'set' member
E: 56:Client.test_bt_types: Instance of 'tuple' has no 'append' member
E: 58:Client.test_bt_types: Instance of 'str' has no 'loower' member
E: 62:Client.test_bt_types: Instance of 'int' has no 'whatever' member
E: 66: Instance of 'int' has no 'lower' member (but some types could not be inferred)

View File

@@ -0,0 +1,8 @@
E: 10: __revision__ is not callable
E: 29: INSTANCE is not callable
E: 31: LIST is not callable
E: 33: DICT is not callable
E: 35: TUPLE is not callable
E: 37: INT is not callable
E: 72: PROP.test is not callable
E: 73: PROP.custom is not callable

View File

@@ -0,0 +1 @@
W: 6: Anomalous Unicode escape in byte string: '\u'. String constant might be missing an r or u prefix.

View File

@@ -0,0 +1 @@
W: 8: Reimport 'ABCMeta' (imported line 7)

View File

@@ -0,0 +1,3 @@
W: 6: Using possibly undefined loop variable 'C'
W: 15: Using possibly undefined loop variable 'var1'

View File

@@ -0,0 +1,3 @@
E: 6: Using variable 'C' before assignment
W: 15: Using possibly undefined loop variable 'var1'

View File

@@ -0,0 +1,4 @@
W: 3: Unused import NonRegr from wildcard import
W: 3: Unused import os from wildcard import
W: 3: Unused import sys from wildcard import
W: 3: Wildcard import input.func_w0611

View File

@@ -0,0 +1,5 @@
W: 5: Use of exec
W: 6: Use of exec
W: 8: Use of exec
W: 12:func: Use of exec

View File

@@ -0,0 +1,6 @@
E: 7: Unable to import 'nonexistant'
E: 23:CCC: Module 'input.func_w0233' has no 'BBBB' member
E: 28:CCC.__init__: Module 'input.func_w0233' has no 'BBBB' member
E: 51:Super2.__init__: Super of 'Super2' has no '__woohoo__' member
W: 15:AAAA.__init__: __init__ method from a non direct base class 'BBBBMixin' is called
W: 49:Super2.__init__: __init__ method from base class 'dict' is not called

View File

@@ -0,0 +1,2 @@
W: 10: Found indentation with tabs instead of spaces
W: 11: Found indentation with tabs instead of spaces

View File

@@ -0,0 +1 @@
W: 4: Use of "l" as long integer identifier

View File

@@ -0,0 +1,3 @@
R: 1: Cyclic import (input.func_w0401 -> input.w0401_cycle)
W: 8: Using a conditional statement with a constant value
W: 8: Using a conditional statement with a constant value

View File

@@ -0,0 +1,2 @@
W: 8: Using a conditional statement with a constant value
W: 8: Using a conditional statement with a constant value

View File

@@ -0,0 +1,2 @@
W: 8: Using a conditional statement with a constant value
W: 10:func: Using a conditional statement with a constant value

View File

@@ -0,0 +1,2 @@
R: 1: Cyclic import (input.func_w0401_package.all_the_things -> input.func_w0401_package.thing2)
W: 8: Using a conditional statement with a constant value

View File

@@ -0,0 +1,5 @@
W: 7: Reimport 'ElementTree' (imported line 6)
W: 10: Reimport 'email.encoders' (imported line 9)
W: 12: Reimport 'sys' (imported line 4)
W: 23:reimport: Redefining name 'sys' from outer scope (line 4)
W: 23:reimport: Reimport 'sys' (imported line 4)

View File

@@ -0,0 +1,4 @@
W: 8: Reimport 'os' (imported line 6)
W: 16: Reimport 'exists' (imported line 7)
W: 21:func: Reimport 'os' (imported line 6)
W: 23:func: Reimport 're' (imported line 9)

View File

@@ -0,0 +1 @@
W: 4: Module import itself

View File

@@ -0,0 +1 @@
W: 7: Unused import os

View File

@@ -0,0 +1,6 @@
W: 9:function: Unused variable 'aaaa'
W: 28:test_global: Using the global statement
W: 34:test_global: Unused platform imported from sys
W: 35:test_global: Unused version imported from sys as VERSION
W: 36:test_global: Unused import this
W: 37:test_global: Unused re imported as RE

View File

@@ -0,0 +1,5 @@
W: 7:function: Unused argument 'arg'
W: 14:AAAA.method: Unused argument 'arg'
W: 21:AAAA.selected: Unused argument 'args'
W: 21:AAAA.selected: Unused argument 'kwargs'
W: 40:BBBB.__init__: Unused argument 'arg'

View File

@@ -0,0 +1,2 @@
W: 8:function: Redefining built-in 'type'
W: 11: Redefining built-in 'map'

View File

@@ -0,0 +1,11 @@
C: 28:some_function: Variable name "FOO" doesn't conform to 'variable-name-hint' template
C: 41: Constant name "exc3" doesn't conform to 'constant-name-hint' template
C: 55: Variable name "OOPS" doesn't conform to 'variable-name-hint' template
W: 18:some_function: Redefining name 'RuntimeError' from object 'exceptions' in exception handler
W: 20:some_function: Redefining name 'OSError' from builtins in exception handler
W: 20:some_function: Unused variable 'OSError'
W: 22:some_function: Redefining name 'MyError' from outer scope (line 7) in exception handler
W: 22:some_function: Unused variable 'MyError'
W: 45: Redefining name 'RuntimeError' from object 'exceptions' in exception handler
W: 47: Redefining name 'OSError' from builtins in exception handler
W: 49: Redefining name 'MyOtherError' from outer scope (line 36) in exception handler

View File

@@ -0,0 +1,2 @@
W: 16:some_function: Redefining name 'some_function' from outer scope (line 11) in exception handler
W: 16:some_function: Unused variable 'some_function'

View File

@@ -0,0 +1,12 @@
C: 28:some_function: Variable name "FOO" doesn't conform to 'variable-name-hint' template
C: 41: Constant name "exc3" doesn't conform to 'constant-name-hint' template
C: 57: Variable name "OOPS" doesn't conform to 'variable-name-hint' template
W: 18:some_function: Redefining name 'RuntimeError' from object 'exceptions' in exception handler
W: 20:some_function: Redefining name 'OSError' from builtins in exception handler
W: 20:some_function: Unused variable 'OSError'
W: 22:some_function: Redefining name 'MyError' from outer scope (line 7) in exception handler
W: 22:some_function: Unused variable 'MyError'
W: 45: Redefining name 'RuntimeError' from object 'exceptions' in exception handler
W: 47: Redefining name 'args' from object 'exceptions.RuntimeError' in exception handler
W: 49: Redefining name 'OSError' from builtins in exception handler
W: 51: Redefining name 'MyOtherError' from outer scope (line 36) in exception handler

View File

@@ -0,0 +1,11 @@
R: 1: Similar lines in 2 files
==input.func_w0801:3
==input.w0801_same:3
__revision__ = 'id'
A = 2
B = 3
C = A + B
# need more than X lines to trigger the message
C *= 2
A -= B
# all this should be detected

View File

@@ -0,0 +1,3 @@
E: 11:do_nothing: Using variable 'base' before assignment
W: 11:do_nothing: Statement seems to have no effect