Skip to content

Commit

Permalink
Merge branch 'dev' of https://github.com/AppDaemon/appdaemon into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
acockburn committed Mar 14, 2023
2 parents a08a338 + fa7acac commit cd49e44
Show file tree
Hide file tree
Showing 3 changed files with 57 additions and 30 deletions.
9 changes: 0 additions & 9 deletions .flake8

This file was deleted.

25 changes: 5 additions & 20 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,28 +4,13 @@ repos:
hooks:
- id: end-of-file-fixer
- id: trailing-whitespace
- repo: https://github.com/charliermarsh/ruff-pre-commit
rev: 'v0.0.255'
hooks:
- id: ruff
args: [--fix, --exit-non-zero-on-fix]
- repo: https://github.com/ambv/black
rev: 23.1.0
hooks:
- id: black
language_version: python3
- repo: https://github.com/PyCQA/flake8
rev: 6.0.0
hooks:
- id: flake8
# If pyproject.toml is modified, run pip-compile to pin the version of dependencies inside requirements.txt files
#- repo: https://github.com/jazzband/pip-tools
# rev: 6.12.3
# hooks:
# - id: pip-compile
# name: pip-compile pyproject.toml
# args: [--resolver=backtracking, pyproject.toml]
# files: ^requirements\.txt|pyproject\.toml$
# - id: pip-compile
# name: pip-compile pyproject.toml --extra=dev
# args: [--extra=dev, --output-file=dev-requirements.txt, --resolver=backtracking, pyproject.toml]
# files: ^dev-requirements\.txt|pyproject\.toml$
# - id: pip-compile
# name: pip-compile pyproject.toml --extra=doc
# args: [--extra=doc, --output-file=doc-requirements.txt, --resolver=backtracking, pyproject.toml]
# files: ^doc-requirements\.txt|pyproject\.toml$
53 changes: 52 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,8 @@ dev = [
"flake8 ~= 6.0.0",
"black ~= 23.1.0",
'pre-commit ~= 3.1.1; python_version>"3.7"', # pre-commit does not support Python < 3.8
"pytest ~= 7.2.1"
"pytest ~= 7.2.1",
"ruff ~= 0.0.255"
]

# Dependencies required to build the documentation using sphinx
Expand Down Expand Up @@ -96,3 +97,53 @@ addopts = [
# black configuration
[tool.black]
line-length = 120

# Ruff

[tool.ruff]
# Enable pycodestyle (`E`) and Pyflakes (`F`) codes by default.
select = ["E", "F"]
ignore = []

# Allow autofix for all enabled rules (when `--fix`) is provided.
fixable = ["E", "F", "UP"]
unfixable = []

src = ["appdaemon"]

# Exclude a variety of commonly ignored directories.
exclude = [
".bzr",
".direnv",
".eggs",
".git",
".hg",
".mypy_cache",
".nox",
".pants.d",
".pytype",
".ruff_cache",
".svn",
".tox",
".venv",
"__pypackages__",
"_build",
"buck-out",
"build",
"dist",
"node_modules",
"venv",
]
per-file-ignores = {}

line-length = 500

# Allow unused variables when underscore-prefixed.
dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$"

# Assume Python 3.8.
target-version = "py38"

[tool.ruff.mccabe]
# Unlike Flake8, default to a complexity level of 10.
max-complexity = 10

0 comments on commit cd49e44

Please sign in to comment.