Skip to content

Commit

Permalink
Upgrade container and linting
Browse files Browse the repository at this point in the history
  • Loading branch information
toreamun committed Jul 18, 2024
1 parent 24c0c94 commit 94c4676
Show file tree
Hide file tree
Showing 18 changed files with 169 additions and 375 deletions.
41 changes: 41 additions & 0 deletions .devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
// See https://aka.ms/vscode-remote/devcontainer.json for format details.
{
"image": "mcr.microsoft.com/devcontainers/python:3.12",
"postCreateCommand": "scripts/setup",
"forwardPorts": [
8123
],
"portsAttributes": {
"8123": {
"label": "Home Assistant",
"onAutoForward": "notify"
}
},
"customizations": {
"vscode": {
"extensions": [
"charliermarsh.ruff",
"ms-python.python",
"ms-python.vscode-pylance",
"github.vscode-pull-request-github"
],
"settings": {
"files.eol": "\n",
"editor.tabSize": 4,
"editor.formatOnPaste": true,
"editor.formatOnSave": true,
"editor.formatOnType": false,
"files.trimTrailingWhitespace": true,
"terminal.integrated.shell.linux": "/bin/bash",
"python.analysis.typeCheckingMode": "basic",
"python.analysis.autoImportCompletions": true,
"python.defaultInterpreterPath": "/usr/local/bin/python",
"[python]": {
"editor.defaultFormatter": "charliermarsh.ruff"
}
}
}
},
"remoteUser": "vscode",
"features": {}
}
43 changes: 0 additions & 43 deletions .devcontainer/README.md

This file was deleted.

15 changes: 0 additions & 15 deletions .devcontainer/configuration.yaml

This file was deleted.

32 changes: 0 additions & 32 deletions .devcontainer/devcontainer.json

This file was deleted.

1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* text=auto eol=lf
32 changes: 32 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: "Lint"

on:
push:
branches:
- "main"
pull_request:
branches:
- "main"

jobs:
ruff:
name: "Ruff"
runs-on: "ubuntu-latest"
steps:
- name: "Checkout the repository"
uses: "actions/checkout@v4.1.7"

- name: "Set up Python"
uses: actions/setup-python@v5.1.0
with:
python-version: "3.12"
cache: "pip"

- name: "Install requirements"
run: python3 -m pip install -r requirements.txt

- name: "Lint"
run: python3 -m ruff check .

- name: "Format"
run: python3 -m ruff format . --check
35 changes: 0 additions & 35 deletions .github/workflows/pull.yml

This file was deleted.

38 changes: 0 additions & 38 deletions .github/workflows/push.yml

This file was deleted.

Loading

0 comments on commit 94c4676

Please sign in to comment.