Skip to content

Commit

Permalink
style: 🎨 update pre-commit by using ruff
Browse files Browse the repository at this point in the history
  • Loading branch information
thomashbrnrd committed Sep 13, 2024
1 parent 714487f commit 44f296d
Show file tree
Hide file tree
Showing 7 changed files with 50 additions and 43 deletions.
7 changes: 7 additions & 0 deletions .github/workflows/main-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,13 @@ on:
- develop

jobs:
pre-commit-check:
name: Check pre-commit hooks
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: pip install pre-commit && pre-commit run --all-files

build-backend:
name: Build Backend
runs-on: ubuntu-latest
Expand Down
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,5 @@ temp/
*.secrets*
version.txt
*.crt
*.pem
*.pem
.ruff_cache
22 changes: 11 additions & 11 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
repos:
- repo: https://github.com/psf/black
rev: 22.10.0
hooks:
- id: black
- repo: https://github.com/PyCQA/isort
rev: 5.12.0
hooks:
- id: isort
args: ["--profile", "black"]
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.6.4
hooks:
# Run ruff with isort formatter
- id: ruff
args: [ "--select", "I", "--fix" ]
# Run ruff
- id: ruff
args: [ "--fix" ]
# Run the formatter.
- id: ruff-format
- repo: local
hooks:
- id: prettier
Expand Down
1 change: 0 additions & 1 deletion backend/src/router.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
from user_agents import parse

from .config import APP_VERSION, S3_PREFIX, TYPOLOGIES_MEASURED, get_base_logs
from .models import EmailData
from .utils import get_current_user, send_mail, upload_image

router = APIRouter(prefix="/api")
Expand Down
1 change: 1 addition & 0 deletions backend/src/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

import jwt
from fastapi import Depends, HTTPException, status

from src.config import SMTPClient

from .config import OAUTH2_SCHEME, PUBLIC_KEY, S3, S3_BUCKET_NAME
Expand Down
1 change: 0 additions & 1 deletion backend/tests/test_auth.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import jwt
import pytest
from fastapi.testclient import TestClient
from src.config import PUBLIC_KEY
from src.main import app
Expand Down
58 changes: 29 additions & 29 deletions frontend/src/components.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,35 +5,35 @@
// Read more: https://github.com/vuejs/core/pull/3399
export {}

declare module 'vue' {
declare module "vue" {
export interface GlobalComponents {
AskingExpert: typeof import('./components/AskingExpert.vue')['default']
AuthCallback: (typeof import("./components/authentication/AuthCallback.vue"))["default"]
AuthRedirect: (typeof import("./components/authentication/AuthRedirect.vue"))["default"]
ContactExpert: typeof import('./components/ContactExpert.vue')['default']
copy: (typeof import("./components/authentification/AuthRedirect copy.vue"))["default"]
DsfrAlert: typeof import('@gouvminint/vue-dsfr')['DsfrAlert']
DsfrButton: typeof import('@gouvminint/vue-dsfr')['DsfrButton']
DsfrCheckbox: typeof import('@gouvminint/vue-dsfr')['DsfrCheckbox']
DsfrFileUpload: typeof import('@gouvminint/vue-dsfr')['DsfrFileUpload']
DsfrHeader: typeof import('@gouvminint/vue-dsfr')['DsfrHeader']
DsfrInput: typeof import('@gouvminint/vue-dsfr')['DsfrInput']
DsfrModal: typeof import('@gouvminint/vue-dsfr')['DsfrModal']
DsfrPicture: (typeof import("@gouvminint/vue-dsfr"))["DsfrPicture"]
DsfrRadioButton: (typeof import("@gouvminint/vue-dsfr"))["DsfrRadioButton"]
DsfrSelect: typeof import('@gouvminint/vue-dsfr')['DsfrSelect']
DsfrTag: (typeof import("@gouvminint/vue-dsfr"))["DsfrTag"]
HeaderMain: typeof import('./components/HeaderMain.vue')['default']
MissingCardAlert: typeof import('./components/MissingCardAlert.vue')['default']
OnboardingSwiper: typeof import('./components/OnboardingSwiper.vue')['default']
PopupContact: typeof import('./components/PopupContact.vue')['default']
PopupVideo: typeof import('./components/PopupVideo.vue')['default']
ResultPage: typeof import('./components/ResultPage.vue')['default']
RouterLink: typeof import('vue-router')['RouterLink']
RouterView: typeof import('vue-router')['RouterView']
SnackbarAlert: typeof import('./components/SnackbarAlert.vue')['default']
StepsGuide: typeof import('./components/StepsGuide.vue')['default']
User: (typeof import("./components/authentication/User.vue"))["default"]
VIcon: typeof import('oh-vue-icons')['OhVueIcon']
AskingExpert: (typeof import("./components/AskingExpert.vue"))["default"];
AuthCallback: (typeof import("./components/authentication/AuthCallback.vue"))["default"];
AuthRedirect: (typeof import("./components/authentication/AuthRedirect.vue"))["default"];
ContactExpert: (typeof import("./components/ContactExpert.vue"))["default"];
copy: (typeof import("./components/authentification/AuthRedirect copy.vue"))["default"];
DsfrAlert: (typeof import("@gouvminint/vue-dsfr"))["DsfrAlert"];
DsfrButton: (typeof import("@gouvminint/vue-dsfr"))["DsfrButton"];
DsfrCheckbox: (typeof import("@gouvminint/vue-dsfr"))["DsfrCheckbox"];
DsfrFileUpload: (typeof import("@gouvminint/vue-dsfr"))["DsfrFileUpload"];
DsfrHeader: (typeof import("@gouvminint/vue-dsfr"))["DsfrHeader"];
DsfrInput: (typeof import("@gouvminint/vue-dsfr"))["DsfrInput"];
DsfrModal: (typeof import("@gouvminint/vue-dsfr"))["DsfrModal"];
DsfrPicture: (typeof import("@gouvminint/vue-dsfr"))["DsfrPicture"];
DsfrRadioButton: (typeof import("@gouvminint/vue-dsfr"))["DsfrRadioButton"];
DsfrSelect: (typeof import("@gouvminint/vue-dsfr"))["DsfrSelect"];
DsfrTag: (typeof import("@gouvminint/vue-dsfr"))["DsfrTag"];
HeaderMain: (typeof import("./components/HeaderMain.vue"))["default"];
MissingCardAlert: (typeof import("./components/MissingCardAlert.vue"))["default"];
OnboardingSwiper: (typeof import("./components/OnboardingSwiper.vue"))["default"];
PopupContact: (typeof import("./components/PopupContact.vue"))["default"];
PopupVideo: (typeof import("./components/PopupVideo.vue"))["default"];
ResultPage: (typeof import("./components/ResultPage.vue"))["default"];
RouterLink: (typeof import("vue-router"))["RouterLink"];
RouterView: (typeof import("vue-router"))["RouterView"];
SnackbarAlert: (typeof import("./components/SnackbarAlert.vue"))["default"];
StepsGuide: (typeof import("./components/StepsGuide.vue"))["default"];
User: (typeof import("./components/authentication/User.vue"))["default"];
VIcon: (typeof import("oh-vue-icons"))["OhVueIcon"];
}
}

0 comments on commit 44f296d

Please sign in to comment.