[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
    __init__.py
    # Ignore vendored files
    numba/cloudpickle/*
    versioneer.py
    # Grandfather in existing failing files.  This list should shrink over time
    numba/stencils/stencil.py
    numba/core/transforms.py
    numba/_version.py
    numba/core/ir_utils.py
    numba/core/pylowering.py
    numba/python_utils.py
    numba/parfors/parfor.py
    numba/misc/numba_entry.py
    numba/stencils/stencilparfor.py
    numba/core/ir.py
    numba/core/generators.py
    numba/misc/appdirs.py
    numba/core/caching.py
    numba/core/debuginfo.py
    numba/core/annotations/pretty_annotate.py
    numba/core/dataflow.py
    numba/core/pythonapi.py
    numba/core/decorators.py
    numba/core/typeconv/rules.py
    numba/core/typeconv/castgraph.py
    numba/core/rewrites/registry.py
    numba/core/rewrites/macros.py
    numba/core/rewrites/static_binop.py
    numba/core/rewrites/ir_print.py
    numba/core/types/abstract.py
    numba/core/types/misc.py
    numba/core/types/npytypes.py
    numba/core/types/common.py
    numba/core/types/iterators.py
    numba/core/types/scalars.py
    numba/core/fastmathpass.py
    numba/cpython/setobj.py
    numba/core/options.py
    numba/cpython/printimpl.py
    numba/cpython/cmathimpl.py
    numba/cpython/tupleobj.py
    numba/cpython/mathimpl.py
    numba/core/registry.py
    numba/core/imputils.py
    numba/cpython/builtins.py
    numba/misc/quicksort.py
    numba/cpython/randomimpl.py
    numba/np/npyimpl.py
    numba/cpython/slicing.py
    numba/cpython/numbers.py
    numba/cpython/listobj.py
    numba/core/removerefctpass.py
    numba/core/boxing.py
    numba/misc/cffiimpl.py
    numba/np/linalg.py
    numba/cpython/rangeobj.py
    numba/np/npyfuncs.py
    numba/cpython/iterators.py
    numba/core/codegen.py
    numba/misc/mergesort.py
    numba/core/base.py
    numba/np/npdatetime.py
    numba/pycc/cc.py
    numba/pycc/compiler.py
    numba/pycc/llvm_types.py
    numba/pycc/platform.py
    numba/pycc/decorators.py
    numba/core/runtime/nrtdynmod.py
    numba/core/runtime/context.py
    numba/tests/test_support.py
    numba/tests/test_llvm_version_check.py
    numba/tests/test_builtins.py
    numba/tests/test_jitmethod.py
    numba/tests/test_inlining.py
    numba/tests/test_array_manipulation.py
    numba/tests/test_smart_array.py
    numba/tests/test_linalg.py
    numba/tests/test_threadsafety.py
    numba/tests/test_utils.py
    numba/tests/cfunc_cache_usecases.py
    numba/tests/enum_usecases.py
    numba/tests/test_func_lifetime.py
    numba/tests/test_typeinfer.py
    numba/tests/test_return_values.py
    numba/tests/test_npdatetime.py
    numba/tests/test_fancy_indexing.py
    numba/tests/support.py
    numba/tests/test_print.py
    numba/tests/test_debug.py
    numba/tests/test_interproc.py
    numba/tests/test_typeconv.py
    numba/tests/test_tracing.py
    numba/tests/usecases.py
    numba/tests/test_vectorization_type_inference.py
    numba/tests/matmul_usecase.py
    numba/tests/complex_usecases.py
    numba/tests/test_array_exprs.py
    numba/tests/test_wrapper.py
    numba/tests/test_obj_lifetime.py
    numba/tests/test_intwidth.py
    numba/tests/test_remove_dead.py
    numba/tests/serialize_usecases.py
    numba/tests/test_del.py
    numba/tests/test_gil.py
    numba/tests/cffi_usecases.py
    numba/tests/test_slices.py
    numba/tests/test_mandelbrot.py
    numba/tests/compile_with_pycc.py
    numba/tests/test_looplifting.py
    numba/tests/test_storeslice.py
    numba/tests/recursion_usecases.py
    numba/tests/dummy_module.py
    numba/tests/test_operators.py
    numba/tests/test_comprehension.py
    numba/tests/ctypes_usecases.py
    numba/tests/test_locals.py
    numba/tests/test_dicts.py
    numba/tests/test_optional.py
    numba/tests/test_mathlib.py
    numba/tests/test_numberctor.py
    numba/tests/test_globals.py
    numba/tests/test_typingerror.py
    numba/tests/test_copy_propagate.py
    numba/tests/test_ctypes.py
    numba/tests/test_typeof.py
    numba/tests/test_usecases.py
    numba/tests/test_auto_constants.py
    numba/tests/test_cffi.py
    numba/tests/test_sort.py
    numba/tests/test_cfunc.py
    numba/tests/test_conversion.py
    numba/tests/test_indexing.py
    numba/tests/test_pycc.py
    numba/tests/annotation_usecases.py
    numba/tests/test_alignment.py
    numba/tests/test_multi3.py
    numba/tests/test_overlap.py
    numba/tests/test_array_attr.py
    numba/tests/test_array_methods.py
    numba/tests/test_enums.py
    numba/tests/test_profiler.py
    numba/tests/test_numpyadapt.py
    numba/tests/cache_usecases.py
    numba/tests/true_div_usecase.py
    numba/tests/test_dataflow.py
    numba/tests/test_tuples.py
    numba/tests/test_svml.py
    numba/tests/test_array_iterators.py
    numba/tests/test_buffer_protocol.py
    numba/tests/test_casting.py
    numba/tests/test_lists.py
    numba/tests/test_array_analysis.py
    numba/tests/test_serialize.py
    numba/tests/test_iteration.py
    numba/tests/test_recarray_usecases.py
    numba/tests/test_target_overloadselector.py
    numba/tests/test_compile_cache.py
    numba/tests/test_array_reductions.py
    numba/tests/test_dyn_func.py
    numba/tests/test_unpack_sequence.py
    numba/tests/test_cgutils.py
    numba/tests/test_complex.py
    numba/tests/test_hashing.py
    numba/tests/test_sys_stdin_assignment.py
    numba/tests/pdlike_usecase.py
    numba/tests/test_range.py
    numba/tests/test_nrt_refct.py
    numba/misc/timsort.py
    numba/tests/test_nested_calls.py
    numba/tests/test_chained_assign.py
    numba/tests/test_withlifting.py
    numba/tests/test_parfors.py
    numba/tests/test_sets.py
    numba/tests/test_dyn_array.py
    numba/tests/test_objects.py
    numba/tests/test_random.py
    numba/tests/test_nan.py
    numba/tests/pycc_distutils_usecase/source_module.py
    numba/tests/npyufunc/test_ufuncbuilding.py
    numba/tests/npyufunc/test_errors.py
    numba/tests/npyufunc/test_vectorize_decor.py
    numba/tests/npyufunc/test_parallel_ufunc_issues.py
    numba/tests/npyufunc/test_parallel_env_variable.py
    numba/tests/npyufunc/test_gufunc.py
    numba/core/typing/cmathdecl.py
    numba/core/typing/bufproto.py
    numba/core/typing/mathdecl.py
    numba/core/typing/listdecl.py
    numba/core/typing/builtins.py
    numba/core/typing/randomdecl.py
    numba/core/typing/setdecl.py
    numba/core/typing/npydecl.py
    numba/core/typing/arraydecl.py
    numba/core/typing/collections.py
    numba/core/typing/ctypes_utils.py
    numba/core/typing/enumdecl.py
    numba/core/typing/cffi_utils.py
    numba/core/typing/npdatetime.py
    numba/core/annotations/type_annotations.py
    numba/testing/ddt.py
    numba/testing/loader.py
    numba/testing/notebook.py
    numba/testing/main.py
    numba/np/unsafe/ndarray.py
    numba/np/ufunc/sigparse.py
    numba/parfors/parfor_lowering.py
    numba/np/ufunc/array_exprs.py
    numba/np/ufunc/decorators.py
    numba/core/datamodel/models.py
    numba/core/datamodel/packer.py
    numba/core/datamodel/testing.py
    numba/core/datamodel/manager.py
    numba/np/math/cmathimpl.py
    numba/np/math/mathimpl.py
    numba/np/math/numbers.py
per-file-ignores =
    # 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/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/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/tests/doc_examples/test_random.py:E501
    numba/cuda/tests/doc_examples/test_cg.py:E501
    numba/cuda/tests/doc_examples/test_matmul.py:E501
    numba/tests/doc_examples/test_interval_example.py:E501
