|
1 | 1 | [tool.black]
|
2 | 2 | target-version = ["py37", "py38"]
|
3 | 3 | exclude = 'generated'
|
| 4 | + |
| 5 | +[tool.isort] |
| 6 | +# https://github.com/PyCQA/isort/wiki/isort-Settings |
| 7 | +profile = "black" |
| 8 | +# will group `import x` and `from x import` of the same module. |
| 9 | +force_sort_within_sections = true |
| 10 | +known_first_party = [ |
| 11 | + "homeassistant", |
| 12 | + "tests", |
| 13 | +] |
| 14 | +forced_separate = [ |
| 15 | + "tests", |
| 16 | +] |
| 17 | +combine_as_imports = true |
| 18 | + |
| 19 | +[tool.pylint.MASTER] |
| 20 | +ignore = [ |
| 21 | + "tests", |
| 22 | +] |
| 23 | +# Use a conservative default here; 2 should speed up most setups and not hurt |
| 24 | +# any too bad. Override on command line as appropriate. |
| 25 | +# Disabled for now: https://github.com/PyCQA/pylint/issues/3584 |
| 26 | +#jobs = 2 |
| 27 | +load-plugins = [ |
| 28 | + "pylint_strict_informational", |
| 29 | +] |
| 30 | +persistent = false |
| 31 | +extension-pkg-whitelist = [ |
| 32 | + "ciso8601", |
| 33 | + "cv2", |
| 34 | +] |
| 35 | + |
| 36 | +[tool.pylint.BASIC] |
| 37 | +good-names = [ |
| 38 | + "_", |
| 39 | + "ev", |
| 40 | + "ex", |
| 41 | + "fp", |
| 42 | + "i", |
| 43 | + "id", |
| 44 | + "j", |
| 45 | + "k", |
| 46 | + "Run", |
| 47 | + "T", |
| 48 | +] |
| 49 | + |
| 50 | +[tool.pylint."MESSAGES CONTROL"] |
| 51 | +# Reasons disabled: |
| 52 | +# format - handled by black |
| 53 | +# locally-disabled - it spams too much |
| 54 | +# duplicate-code - unavoidable |
| 55 | +# cyclic-import - doesn't test if both import on load |
| 56 | +# abstract-class-little-used - prevents from setting right foundation |
| 57 | +# unused-argument - generic callbacks and setup methods create a lot of warnings |
| 58 | +# too-many-* - are not enforced for the sake of readability |
| 59 | +# too-few-* - same as too-many-* |
| 60 | +# abstract-method - with intro of async there are always methods missing |
| 61 | +# inconsistent-return-statements - doesn't handle raise |
| 62 | +# too-many-ancestors - it's too strict. |
| 63 | +# wrong-import-order - isort guards this |
| 64 | +disable = [ |
| 65 | + "format", |
| 66 | + "abstract-class-little-used", |
| 67 | + "abstract-method", |
| 68 | + "cyclic-import", |
| 69 | + "duplicate-code", |
| 70 | + "inconsistent-return-statements", |
| 71 | + "locally-disabled", |
| 72 | + "not-context-manager", |
| 73 | + "too-few-public-methods", |
| 74 | + "too-many-ancestors", |
| 75 | + "too-many-arguments", |
| 76 | + "too-many-branches", |
| 77 | + "too-many-instance-attributes", |
| 78 | + "too-many-lines", |
| 79 | + "too-many-locals", |
| 80 | + "too-many-public-methods", |
| 81 | + "too-many-return-statements", |
| 82 | + "too-many-statements", |
| 83 | + "too-many-boolean-expressions", |
| 84 | + "unused-argument", |
| 85 | + "wrong-import-order", |
| 86 | +] |
| 87 | +enable = [ |
| 88 | + #"useless-suppression", # temporarily every now and then to clean them up |
| 89 | + "use-symbolic-message-instead", |
| 90 | +] |
| 91 | + |
| 92 | +[tool.pylint.REPORTS] |
| 93 | +score = false |
| 94 | + |
| 95 | +[tool.pylint.TYPECHECK] |
| 96 | +ignored-classes = [ |
| 97 | + "_CountingAttr", # for attrs |
| 98 | +] |
| 99 | + |
| 100 | +[tool.pylint.FORMAT] |
| 101 | +expected-line-ending-format = "LF" |
| 102 | + |
| 103 | +[tool.pylint.EXCEPTIONS] |
| 104 | +overgeneral-exceptions = [ |
| 105 | + "BaseException", |
| 106 | + "Exception", |
| 107 | + "HomeAssistantError", |
| 108 | +] |
| 109 | + |
| 110 | +[tool.pytest.ini_options] |
| 111 | +testpaths = [ |
| 112 | + "tests", |
| 113 | +] |
| 114 | +norecursedirs = [ |
| 115 | + ".git", |
| 116 | + "testing_config", |
| 117 | +] |
0 commit comments