diff --git a/flake8/.flake8 b/flake8/.flake8 new file mode 100644 index 0000000..59bd3ed --- /dev/null +++ b/flake8/.flake8 @@ -0,0 +1,4 @@ +[flake8] +max-line-length = 88 +extend-ignore = E203, W503 + diff --git a/flake8/example.py b/flake8/example.py new file mode 100644 index 0000000..45ca6f3 --- /dev/null +++ b/flake8/example.py @@ -0,0 +1,16 @@ +import os, sys # F401: sys imported but unused + +def my_function( x, y ): + print( "Result:",x+y ) # E201, E202, E231, E221 + +class myclass: # N801: class name should use CapWords convention + def __init__(self): + self.value =42 # E225: missing whitespace around operator + + def doSomething(self): # N802: function name should be snake_case + if( self.value>0 ): + print("Positive") + else: + print( "Not positive" ) + +my_function(1,2)