# -*- mode: conf; -*-
## flake8 default linting configuration
#
# Loaded by flake8 by default

[flake8]
# DO NOT check for the following errors:
# E265: block comment should start with '# '
#       (Note: autopep8 will not fix instances of commented-out code)
# E266: too many leading '#' for block comment
# E402: module level import not at top of file
# E701: multiple statements on one line (colon)
# E702: multiple statements on one line (semicolon)
# E704: multiple statements on one line (def)
# E722: do not use bare except, specify exception instead
# E741: do not use variables named 'l', 'O', or 'I'
# W503: line break before binary operator
# W605: invalid escape sequence 'x'
#       (Note: would only raise on false-positives in LaTeX samples)
# F401: module imported but unused
# F403: 'from module import *' used; unable to detect undefined names
# F405: name may be undefined, or defined from star imports: module
# N806: variable in function should be lowercase 
ignore=E265,E266,E402,E701,E702,E704,E722,E741,W503,W605,F401,F403,F405,N806

exclude=
    # automatically generated
    pygsti/io/parsetab_string.py
    pygsti/modelpacks/smq*.py
    pygsti/modelpacks/legacy/std*.py

#Allow legacyio to have names like 'GateString_setstate' and classes like 'dummy_GateString'
#Also allow report sections to have figure-factory methods whose first arg is 'workspace', not 'self'
# N801 : class name should not be mixed case
# N802 : function name should be lowercase
# N805 : first argument to method should be called 'self'
per-file-ignores =
    pygsti/io/legacyio.py:N801,N802
    pygsti/objects/replib/slowreplib.py:N802
    pygsti/report/section/*.py:N805

# 120 characters is a more agreeable max line length for modern displays
max-line-length=120
