precommit
This commit is contained in:
parent
1657fdf67d
commit
998354293b
16
.pre-commit-config.yaml
Normal file
16
.pre-commit-config.yaml
Normal file
@ -0,0 +1,16 @@
|
||||
repos:
|
||||
- repo: https://github.com/astral-sh/ruff-pre-commit
|
||||
rev: v0.5.2
|
||||
hooks:
|
||||
- id: ruff
|
||||
- id: ruff-format
|
||||
|
||||
- repo: https://github.com/psf/black
|
||||
rev: 24.4.2
|
||||
hooks:
|
||||
- id: black
|
||||
|
||||
- repo: https://github.com/pycqa/isort
|
||||
rev: 5.13.2
|
||||
hooks:
|
||||
- id: isort
|
||||
12
README.md
12
README.md
@ -51,3 +51,15 @@ streamlit run main.py
|
||||
ruff check .
|
||||
ruff format .
|
||||
```
|
||||
|
||||
## Pre-commit
|
||||
|
||||
```bash
|
||||
pre-commit install
|
||||
pre-commit run --all-files
|
||||
```
|
||||
|
||||
Используются хуки:
|
||||
- `black`
|
||||
- `isort`
|
||||
- `ruff` и `ruff-format`
|
||||
|
||||
@ -2,7 +2,6 @@ from __future__ import annotations
|
||||
|
||||
from typing import Any, Protocol
|
||||
|
||||
from app.config import get_location
|
||||
|
||||
from .mock_provider import get_jwt_token as get_jwt_token_local
|
||||
from .mock_provider import protect_application as protect_application_local
|
||||
|
||||
@ -2,3 +2,6 @@ streamlit==1.46.1
|
||||
raisa-streamlit-oauth==1.0.3
|
||||
python-dotenv==1.0.1
|
||||
ruff==0.5.2
|
||||
black==24.4.2
|
||||
isort==5.13.2
|
||||
pre-commit==3.7.1
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user