Skip to content

Commit

Permalink
Bump ruff from 0.1.9 to 0.1.11 (#201)
Browse files Browse the repository at this point in the history
* Bump ruff from 0.1.9 to 0.1.11

Bumps [ruff](https://github.com/astral-sh/ruff) from 0.1.9 to 0.1.11.
- [Release notes](https://github.com/astral-sh/ruff/releases)
- [Changelog](https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md)
- [Commits](astral-sh/ruff@v0.1.9...v0.1.11)

---
updated-dependencies:
- dependency-name: ruff
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>

* make pre-commit prettier

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Simon Hörrle <[email protected]>
  • Loading branch information
dependabot[bot] and CM000n authored Jan 8, 2024
1 parent b20b38d commit 142b5fe
Show file tree
Hide file tree
Showing 11 changed files with 299 additions and 148 deletions.
63 changes: 31 additions & 32 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@ name: "CodeQL"

on:
push:
branches: [ "main", "master" ]
branches: ["main", "master"]
pull_request:
# The branches below must be a subset of the branches above
branches: [ "master" ]
branches: ["master"]
schedule:
- cron: '35 19 * * 2'
- cron: "35 19 * * 2"

jobs:
analyze:
Expand All @@ -38,45 +38,44 @@ jobs:
strategy:
fail-fast: false
matrix:
language: [ 'python' ]
language: ["python"]
# CodeQL supports [ 'c-cpp', 'csharp', 'go', 'java-kotlin', 'javascript-typescript', 'python', 'ruby', 'swift' ]
# Use only 'java-kotlin' to analyze code written in Java, Kotlin or both
# Use only 'javascript-typescript' to analyze code written in JavaScript, TypeScript or both
# Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support

steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Checkout repository
uses: actions/checkout@v4

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.

# For more details on CodeQL's query packs, refer to: https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
# queries: security-extended,security-and-quality
# For more details on CodeQL's query packs, refer to: https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
# queries: security-extended,security-and-quality

# Autobuild attempts to build any compiled languages (C/C++, C#, Go, Java, or Swift).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v3

# Autobuild attempts to build any compiled languages (C/C++, C#, Go, Java, or Swift).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v3
# ℹ️ Command-line programs to run using the OS shell.
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun

# ℹ️ Command-line programs to run using the OS shell.
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
# If the Autobuild fails above, remove it and uncomment the following three lines.
# modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance.

# If the Autobuild fails above, remove it and uncomment the following three lines.
# modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance.
# - run: |
# echo "Run, Build Application using script"
# ./location_of_script_within_repo/buildscript.sh

# - run: |
# echo "Run, Build Application using script"
# ./location_of_script_within_repo/buildscript.sh

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
with:
category: "/language:${{matrix.language}}"
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
with:
category: "/language:${{matrix.language}}"
96 changes: 79 additions & 17 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,27 +1,89 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
- repo: local
hooks:
- id: check-added-large-files
- id: check-yaml
- id: check-json
name: "✅ Check JSON files"
language: system
types: [json]
entry: poetry run check-json
- id: check-toml
- id: check-xml
name: "✅ Check TOML files"
language: system
types: [toml]
entry: poetry run check-toml
- id: check-yaml
name: "✅ Check YAML files"
language: system
types: [yaml]
entry: poetry run check-yaml
- id: check-json
name: "📁 Check for large files"
language: system
entry: poetry run check-added-large-files
- id: check-json
name: "🐛 Check for forgotten debug statemens"
language: system
types: [python]
entry: poetry run debug-statement-hook
- id: check-merge-conflict
- id: debug-statements
name: "💥 Check for merge conflicts"
language: system
types: [text]
entry: poetry run check-merge-conflict
- id: check-symlinks
name: "🔗 Check for broken symlinks"
language: system
types: [symlink]
entry: poetry run check-symlinks
- id: codespell
name: "💭 Check for code spelling"
entry: poetry run codespell --write-changes --skip="./*"
language: system
pass_filenames: false
always_run: true
- id: end-of-file-fixer
- id: trailing-whitespace
- id: no-commit-to-branch
args: ['--branch', 'main', '--branch', 'master']
- repo: local
hooks:
- id: ruff format
name: ruff format
entry: poetry run ruff format
name: "🔚 Fix End of Files"
language: system
types: [text]
entry: poetry run end-of-file-fixer
stages: [commit, push, manual]
- id: end-of-file-fixer
name: "⬜ Fix trailing whitespaces"
language: system
types: [text]
entry: poetry run end-of-file-fixer
stages: [commit, push, manual]
- id: ruff-check
name: "🐶 Ruff Linter"
language: system
types: [python]
- id: ruff lint
name: ruff lint
entry: poetry run ruff
entry: poetry run ruff check --fix
require_serial: true
stages: [commit, push, manual]
- id: ruff-format
name: "🐶 Ruff Formatter"
language: system
types: [python]
entry: poetry run ruff format
require_serial: true
stages: [commit, push, manual]
- id: poetry pyproject check
name: "📜 Check pyproject with Poetry"
language: system
entry: poetry check
pass_filenames: false
always_run: true
- id: no-commit-to-branch
name: "🛑 Don't commit to main branch"
language: system
entry: poetry run no-commit-to-branch
pass_filenames: false
always_run: true
args:
- --branch=master
- --branch=main
- repo: https://github.com/pre-commit/mirrors-prettier
rev: v2.7.1
hooks:
- id: prettier
name: 🎨 Format using prettier
2 changes: 1 addition & 1 deletion custom_components/toyota/translations/ca.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
"name": "Current year statistics"
}
},
"binary_sensor" :{
"binary_sensor": {
"over_all_status": {
"name": "Over all status"
},
Expand Down
2 changes: 1 addition & 1 deletion custom_components/toyota/translations/da.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
"name": "Statistik for dette år"
}
},
"binary_sensor" :{
"binary_sensor": {
"over_all_status": {
"name": "Status"
},
Expand Down
2 changes: 1 addition & 1 deletion custom_components/toyota/translations/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
"name": "Current year statistics"
}
},
"binary_sensor" :{
"binary_sensor": {
"over_all_status": {
"name": "Over all status"
},
Expand Down
2 changes: 1 addition & 1 deletion custom_components/toyota/translations/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
"name": "Estadísticas de este año"
}
},
"binary_sensor" :{
"binary_sensor": {
"over_all_status": {
"name": "Estado general"
},
Expand Down
2 changes: 1 addition & 1 deletion custom_components/toyota/translations/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
"name": "Statistiques année en cours"
}
},
"binary_sensor" :{
"binary_sensor": {
"over_all_status": {
"name": "Situation globale"
},
Expand Down
2 changes: 1 addition & 1 deletion custom_components/toyota/translations/nb.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
"name": "Current year statistics"
}
},
"binary_sensor" :{
"binary_sensor": {
"over_all_status": {
"name": "Over all status"
},
Expand Down
2 changes: 1 addition & 1 deletion custom_components/toyota/translations/nl.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
"name": "Current year statistics"
}
},
"binary_sensor" :{
"binary_sensor": {
"over_all_status": {
"name": "Over all status"
},
Expand Down
Loading

0 comments on commit 142b5fe

Please sign in to comment.