diff --git a/.flake8 b/.flake8 new file mode 100644 index 0000000..591e4a2 --- /dev/null +++ b/.flake8 @@ -0,0 +1,52 @@ +[flake8] +ignore = + # Extra space in brackets + E20, + # Multiple spaces around "," + E231,E241, + # Comments + E26, + # Assigning lambda expression + E731, + # Ambiguous variable names + E741, + # line break before binary operator + W503, + # line break after binary operator + W504, +max-line-length = 80 + +exclude = + __pycache__ + .git + *.pyc + *~ + *.o + *.so + *.cpp + *.c + *.h + +per-file-ignores = + # Slightly long line in the standard version file + numba_cuda/_version.py: E501 + # "Unused" imports / potentially undefined names in init files + numba_cuda/numba/cuda/__init__.py:F401,F403,F405 + numba_cuda/numba/cuda/simulator/__init__.py:F401,F403 + numba_cuda/numba/cuda/simulator/cudadrv/__init__.py:F401 + # Ignore star imports, unused imports, and "may be defined by star imports" + # errors in device_init because its purpose is to bring together a lot of + # the public API to be star-imported in numba.cuda.__init__ + numba_cuda/numba/cuda/device_init.py:F401,F403,F405 + # libdevice.py is an autogenerated file containing stubs for all the device + # functions. Some of the lines in docstrings are a little over-long, as they + # contain the URLs of the reference pages in the online libdevice + # documentation. + numba_cuda/numba/cuda/libdevice.py:E501 + # Ignore too-long lines in the doc examples, prioritising readability + # in the docs over line length in the example source (especially given that + # the test code is already indented by 8 spaces) + numba_cuda/numba/cuda/tests/doc_examples/test_random.py:E501 + numba_cuda/numba/cuda/tests/doc_examples/test_cg.py:E501 + numba_cuda/numba/cuda/tests/doc_examples/test_matmul.py:E501 + numba_cuda/numba/tests/doc_examples/test_interval_example.py:E501