Skip to content

Commit f2dfb69

Browse files
[pre-commit.ci] pre-commit autoupdate (#134)
* [pre-commit.ci] pre-commit autoupdate updates: - [github.com/astral-sh/ruff-pre-commit: v0.1.1 → v0.1.13](astral-sh/ruff-pre-commit@v0.1.1...v0.1.13) - [github.com/psf/black: 23.10.1 → 23.12.1](psf/black@23.10.1...23.12.1) - [github.com/pre-commit/mirrors-prettier: v3.0.3 → v4.0.0-alpha.8](pre-commit/mirrors-prettier@v3.0.3...v4.0.0-alpha.8) - [github.com/pre-commit/mirrors-mypy: v1.6.1 → v1.8.0](pre-commit/mirrors-mypy@v1.6.1...v1.8.0) - [github.com/adrienverge/yamllint.git: v1.32.0 → v1.33.0](https://github.com/adrienverge/yamllint.git/compare/v1.32.0...v1.33.0) * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Fix prettier error --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Elahd Bar-Shai <[email protected]>
1 parent 49144cf commit f2dfb69

File tree

7 files changed

+68
-81
lines changed

7 files changed

+68
-81
lines changed

.github/dependabot.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
version: 2
77
updates:
8-
- package-ecosystem: "pip" # See documentation for possible values
9-
directory: "/" # Location of package manifests
10-
schedule:
11-
interval: "daily"
8+
- package-ecosystem: "pip" # See documentation for possible values
9+
directory: "/" # Location of package manifests
10+
schedule:
11+
interval: "daily"

.github/workflows/dependency-review.yml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,17 @@
44
#
55
# Source repository: https://github.com/actions/dependency-review-action
66
# Public documentation: https://docs.github.com/en/code-security/supply-chain-security/understanding-your-software-supply-chain/about-dependency-review#dependency-review-enforcement
7-
name: 'Dependency Review'
7+
name: "Dependency Review"
88
on: [pull_request, workflow_dispatch]
99

1010
permissions:
11-
contents: read
11+
contents: read
1212

1313
jobs:
14-
dependency-review:
15-
runs-on: ubuntu-latest
16-
steps:
17-
- name: 'Checkout Repository'
18-
uses: actions/checkout@v3
19-
- name: 'Dependency Review'
20-
uses: actions/dependency-review-action@v1
14+
dependency-review:
15+
runs-on: ubuntu-latest
16+
steps:
17+
- name: "Checkout Repository"
18+
uses: actions/checkout@v3
19+
- name: "Dependency Review"
20+
uses: actions/dependency-review-action@v1
Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
11
name: PyTest & Code Coverage Report
22
on: [workflow_dispatch, pull_request]
33
jobs:
4-
run:
5-
runs-on: ubuntu-latest
6-
env:
7-
OS: ubuntu-latest
8-
PYTHON: '3.11'
9-
steps:
10-
- uses: actions/checkout@master
11-
- name: Setup Python
12-
uses: actions/setup-python@master
13-
with:
14-
python-version: '3.11'
15-
- name: Generate coverage report
16-
run: |
17-
pip install pytest-cov
18-
pip install -r requirements-dev.txt
19-
pytest --cov=./ --cov-report=xml --cov-report=html
20-
- name: Upload coverage reports to Codecov
21-
uses: codecov/codecov-action@v3
4+
run:
5+
runs-on: ubuntu-latest
6+
env:
7+
OS: ubuntu-latest
8+
PYTHON: "3.11"
9+
steps:
10+
- uses: actions/checkout@master
11+
- name: Setup Python
12+
uses: actions/setup-python@master
13+
with:
14+
python-version: "3.11"
15+
- name: Generate coverage report
16+
run: |
17+
pip install pytest-cov
18+
pip install -r requirements-dev.txt
19+
pytest --cov=./ --cov-report=xml --cov-report=html
20+
- name: Upload coverage reports to Codecov
21+
uses: codecov/codecov-action@v3

.github/workflows/python-publish.yml

Lines changed: 21 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -9,28 +9,27 @@
99
name: Upload Python Package
1010

1111
on:
12-
release:
13-
types: [published]
12+
release:
13+
types: [published]
1414

1515
jobs:
16-
deploy:
16+
deploy:
17+
runs-on: ubuntu-latest
1718

18-
runs-on: ubuntu-latest
19-
20-
steps:
21-
- uses: actions/checkout@v2
22-
- name: Set up Python
23-
uses: actions/setup-python@v2
24-
with:
25-
python-version: '3.x'
26-
- name: Install dependencies
27-
run: |
28-
python -m pip install --upgrade pip
29-
pip install build
30-
- name: Build package
31-
run: python -m build
32-
- name: Publish package
33-
uses: pypa/gh-action-pypi-publish@27b31702a0e7fc50959f5ad993c78deac1bdfc29
34-
with:
35-
user: __token__
36-
password: ${{ secrets.PYPI_TOKEN }}
19+
steps:
20+
- uses: actions/checkout@v2
21+
- name: Set up Python
22+
uses: actions/setup-python@v2
23+
with:
24+
python-version: "3.x"
25+
- name: Install dependencies
26+
run: |
27+
python -m pip install --upgrade pip
28+
pip install build
29+
- name: Build package
30+
run: python -m build
31+
- name: Publish package
32+
uses: pypa/gh-action-pypi-publish@27b31702a0e7fc50959f5ad993c78deac1bdfc29
33+
with:
34+
user: __token__
35+
password: ${{ secrets.PYPI_TOKEN }}

.pre-commit-config.yaml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@ default_language_version:
33

44
repos:
55
- repo: https://github.com/astral-sh/ruff-pre-commit
6-
rev: v0.1.1
6+
rev: v0.1.13
77
hooks:
88
- id: ruff
99
args: [--fix, --exit-non-zero-on-fix]
1010
- repo: https://github.com/psf/black
11-
rev: 23.10.1
11+
rev: 23.12.1
1212
hooks:
1313
- id: black
1414
args:
@@ -24,17 +24,18 @@ repos:
2424
- --quiet-level=2
2525
exclude_types: [csv, json]
2626
- repo: https://github.com/pre-commit/mirrors-prettier
27-
rev: v3.0.3
27+
rev: v4.0.0-alpha.8
2828
hooks:
2929
- id: prettier
30+
types_or: [toml, yaml]
3031
- repo: https://github.com/pre-commit/mirrors-mypy
31-
rev: v1.6.1
32+
rev: v1.8.0
3233
hooks:
3334
- id: mypy
3435
additional_dependencies: [types-all]
3536
args: [--config-file=pyproject.toml]
3637
- repo: https://github.com/adrienverge/yamllint.git
37-
rev: v1.32.0
38+
rev: v1.33.0
3839
hooks:
3940
- id: yamllint
4041
exclude: (.vscode|.devcontainer|.github)

.prettierignore

Lines changed: 0 additions & 9 deletions
This file was deleted.

tests/test_partition.py

Lines changed: 10 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -31,14 +31,12 @@ async def test__device_partition__house__ok(
3131

3232
if partition.attributes.extended_arming_options is not None:
3333
# Counter allows for comparing lists while ignoring order.
34-
assert Counter(partition.attributes.extended_arming_options.arm_away) == Counter(
35-
[
36-
Partition.ExtendedArmingOption.NO_ENTRY_DELAY,
37-
Partition.ExtendedArmingOption.SILENT_ARMING,
38-
Partition.ExtendedArmingOption.BYPASS_SENSORS,
39-
Partition.ExtendedArmingOption.SELECTIVE_BYPASS,
40-
]
41-
)
34+
assert Counter(partition.attributes.extended_arming_options.arm_away) == Counter([
35+
Partition.ExtendedArmingOption.NO_ENTRY_DELAY,
36+
Partition.ExtendedArmingOption.SILENT_ARMING,
37+
Partition.ExtendedArmingOption.BYPASS_SENSORS,
38+
Partition.ExtendedArmingOption.SELECTIVE_BYPASS,
39+
])
4240

4341

4442
@pytest.mark.asyncio
@@ -62,12 +60,10 @@ async def test__device_partition__garage__ok(
6260

6361
if partition.attributes.extended_arming_options is not None:
6462
# Counter allows for comparing lists while ignoring order.
65-
assert Counter(partition.attributes.extended_arming_options.arm_away) == Counter(
66-
[
67-
Partition.ExtendedArmingOption.NO_ENTRY_DELAY,
68-
Partition.ExtendedArmingOption.SILENT_ARMING,
69-
]
70-
)
63+
assert Counter(partition.attributes.extended_arming_options.arm_away) == Counter([
64+
Partition.ExtendedArmingOption.NO_ENTRY_DELAY,
65+
Partition.ExtendedArmingOption.SILENT_ARMING,
66+
])
7167

7268

7369
@pytest.mark.asyncio

0 commit comments

Comments
 (0)