Skip to content

Commit

Permalink
Add flake8 config
Browse files Browse the repository at this point in the history
This enables a clean flake8 run, and is based on the existing flake8
configuration from Numba.
  • Loading branch information
gmarkall committed Jul 19, 2024
1 parent 91f92d9 commit a9d8ba3
Showing 1 changed file with 52 additions and 0 deletions.
52 changes: 52 additions & 0 deletions .flake8
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit a9d8ba3

Please sign in to comment.