[flake8]
# Exclude some exluded places to speed up.
# Reference: https://flake8.pycqa.org/en/latest/user/configuration.html#project-configuration
extend-exclude =
    # No need to traverse our git directory.
    .git,
    # No need to traverse our virtual env directory.
    .venv,
    # There's no value in checking cache directories.
    __pycache__,
    # This contains our built documentation.
    build,
    # This contains builds of flake8 that we don't want to check
    dist,
    unirobot/robot/ros_lib/*,
    unirobot/robot/utils/vis_hdf5.py

# exclude = # torch dist code, ignore it.,

# Ignore some specific erorrs.
extend-ignore =
    # Back-compatibility for flake8-blind-except. Should remove it in the future.
    B902,
    # Since dict() is commonly used for configuration.
    C408,
    # black compatibility.
    # Reference: https://black.readthedocs.io/en/stable/guides/using_black_with_other_tools.html#flake8
    E203,
    # Pickle and modules that wrap it can be unsafe when used to deserialize untrusted data, possible security issue.
    S301,
    # Standard pseudo-random generators are not suitable for security/cryptographic purposes.
    S311,
    # possible security implications associated with pickle module.
    S403,
    I001,
    I005,
    BLK100,
    ABS101,
    F403,
    F401,
    E501,
    S614,
    G004,
    D401,
    G200,
    N812
# Make `flake8-quotes` compatible with black.
# Reference: https://github.com/zheller/flake8-quotes#configuration
# Reference: https://black.readthedocs.io/en/stable/the_black_code_style/current_style.html#strings
inline-quotes = double
# black compatibility.
# Reference: https://black.readthedocs.io/en/stable/guides/using_black_with_other_tools.html#flake8
max-line-length = 88
# For E501, Ignore line too long in setup.py and experiments folder.
# For I900, Ignore requirement error in the tests folder.
# For S101, Ignore assert used error in the tests folder.
# Reference: https://github.com/tylerwince/flake8-bandit#configuration
per-file-ignores =
    setup.py:E501
    tests/*:I900,S101
# Require code for noqa. Avoid rough `# noqa`
noqa-require-code = true

# known-modules =
