-
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #9 from andrewgierens/ci-uplift
Ci uplift
- Loading branch information
Showing
14 changed files
with
100 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
[flake8] | ||
max-line-length = 88 | ||
extend-ignore = E203 | ||
per-file-ignores = | ||
*/__init__.py: F401 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
name: Python Lint and Type Check | ||
|
||
on: | ||
pull_request: | ||
push: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
container: | ||
image: python:3.11-buster | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up Python 3.x | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: '3.x' | ||
- name: Install dependencies | ||
run: | | ||
pip install -r requirements.txt | ||
pip install -r requirements-dev.txt | ||
- name: Set execute permission for build.sh and dist.sh | ||
run: | | ||
chmod +x ./scripts/lint.sh | ||
chmod +x ./scripts/type_check.sh | ||
- name: Run Linting | ||
run: ./scripts/lint.sh | ||
- name: Run Type Checks | ||
run: ./scripts/type_check.sh |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
repos: | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v4.0.1 | ||
hooks: | ||
- id: check-yaml | ||
- id: end-of-file-fixer | ||
- id: trailing-whitespace | ||
|
||
- repo: https://github.com/pycqa/flake8 | ||
rev: 4.0.1 | ||
hooks: | ||
- id: flake8 | ||
|
||
- repo: https://github.com/pre-commit/mirrors-mypy | ||
rev: v0.910-1 | ||
hooks: | ||
- id: mypy | ||
additional_dependencies: [types-requests] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
flake8 | ||
mypy | ||
black | ||
pre-commit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,4 @@ | ||
aiohttp==3.8.2 | ||
pytest-asyncio==0.21.1 | ||
pytest-asyncio==0.21.1 | ||
pytz==2023.3 | ||
types-pytz==2023.3.1.1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#!/bin/bash | ||
|
||
black ./tessie_api |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#!/bin/bash | ||
|
||
flake8 ./tessie_api |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#!/bin/bash | ||
|
||
mypy ./tessie_api |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,25 @@ | ||
from typing import Literal | ||
from enum import Enum | ||
|
||
|
||
MapStyle = Literal["light", "dark"] | ||
DistanceFormat = Literal["mi", "km"] | ||
TemperatureFormat = Literal["c", "f"] | ||
Format = Literal["json", "csv"] | ||
Seat = Literal[ | ||
"all", | ||
"front_left", | ||
"front_right", | ||
"rear_left", | ||
"rear_center", | ||
"rear_right", | ||
"third_row_left", | ||
"third_row_right", | ||
] | ||
|
||
|
||
class ClimateKeeperMode(Enum): | ||
DISABLE = 0 | ||
KEEP_MODE = 1 | ||
DOG_MODE = 2 | ||
CAMP_MODE = 3 | ||
from typing import Literal | ||
from enum import Enum | ||
|
||
|
||
MapStyle = Literal["light", "dark"] | ||
DistanceFormat = Literal["mi", "km"] | ||
TemperatureFormat = Literal["c", "f"] | ||
Format = Literal["json", "csv"] | ||
Seat = Literal[ | ||
"all", | ||
"front_left", | ||
"front_right", | ||
"rear_left", | ||
"rear_center", | ||
"rear_right", | ||
"third_row_left", | ||
"third_row_right", | ||
] | ||
|
||
|
||
class ClimateKeeperMode(Enum): | ||
DISABLE = 0 | ||
KEEP_MODE = 1 | ||
DOG_MODE = 2 | ||
CAMP_MODE = 3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters