setup.cfg 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. # Project-wide configuration file, can be used for package metadata and other toll configurations
  2. # Example usage: global configuration for PEP8 (via flake8) setting or default pytest arguments
  3. # Local usage: pip install pre-commit, pre-commit run --all-files
  4. [metadata]
  5. license_files = LICENSE
  6. description_file = README.md
  7. [tool:pytest]
  8. norecursedirs =
  9. .git
  10. dist
  11. build
  12. addopts =
  13. --doctest-modules
  14. --durations=30
  15. --color=yes
  16. [coverage:run]
  17. source = ultralytics/
  18. data_file = tests/.coverage
  19. omit =
  20. ultralytics/utils/callbacks/*
  21. [flake8]
  22. max-line-length = 120
  23. exclude = .tox,*.egg,build,temp
  24. select = E,W,F
  25. doctests = True
  26. verbose = 2
  27. # https://pep8.readthedocs.io/en/latest/intro.html#error-codes
  28. format = pylint
  29. # see: https://www.flake8rules.com/
  30. ignore = E731,F405,E402,W504,E501
  31. # E731: Do not assign a lambda expression, use a def
  32. # F405: name may be undefined, or defined from star imports: module
  33. # E402: module level import not at top of file
  34. # W504: line break after binary operator
  35. # E501: line too long
  36. # removed:
  37. # F401: module imported but unused
  38. # E231: missing whitespace after ‘,’, ‘;’, or ‘:’
  39. # E127: continuation line over-indented for visual indent
  40. # F403: ‘from module import *’ used; unable to detect undefined names
  41. [isort]
  42. # https://pycqa.github.io/isort/docs/configuration/options.html
  43. line_length = 120
  44. # see: https://pycqa.github.io/isort/docs/configuration/multi_line_output_modes.html
  45. multi_line_output = 0
  46. [yapf]
  47. based_on_style = pep8
  48. spaces_before_comment = 2
  49. COLUMN_LIMIT = 120
  50. COALESCE_BRACKETS = True
  51. SPACES_AROUND_POWER_OPERATOR = True
  52. SPACE_BETWEEN_ENDING_COMMA_AND_CLOSING_BRACKET = True
  53. SPLIT_BEFORE_CLOSING_BRACKET = False
  54. SPLIT_BEFORE_FIRST_ARGUMENT = False
  55. # EACH_DICT_ENTRY_ON_SEPARATE_LINE = False