Skip to content

Commit 8727de5

Browse files
authored
Merge pull request #22 from EnderModuBot/bug/21-pre-commit-end-of-file-fixer-verändert-requirementstxt-und-das-mag-pip-nicht-end
Füge Setup-Skripte für Windows und Unix hinzu und aktualisiere Pre-Co…
2 parents 728e41f + ca54e49 commit 8727de5

5 files changed

Lines changed: 39 additions & 0 deletions

File tree

.pre-commit-config.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ repos:
33
rev: v5.0.0
44
hooks:
55
- id: end-of-file-fixer
6+
exclude: (^|/)requirements.*\.txt$
67
- id: trailing-whitespace
78
- id: check-yaml
89
- id: check-added-large-files

requirements-dev.txt

-317 Bytes
Binary file not shown.

requirements.txt

-1 Bytes
Binary file not shown.

setup.bat

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
@echo off
2+
3+
IF NOT EXIST .venv (
4+
python -m venv .venv
5+
)
6+
7+
CALL .venv\Scripts\activate.bat
8+
9+
pip install --upgrade pip
10+
pip install pre-commit
11+
12+
IF EXIST requirements.txt (
13+
pip install -r requirements.txt
14+
)
15+
16+
pre-commit install
17+
18+
ECHO Setup complete

setup.sh

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
#!/bin/bash
2+
3+
set -e
4+
5+
if [ ! -d ".venv" ]; then
6+
python3 -m venv .venv
7+
fi
8+
9+
source .venv/bin/activate
10+
11+
pip install --upgrade pip
12+
pip install pre-commit
13+
14+
if [ -f "requirements.txt" ]; then
15+
pip install -r requirements.txt
16+
fi
17+
18+
pre-commit install
19+
20+
echo "Setup complete"

0 commit comments

Comments
 (0)