Skip to content

Commit acaeb22

Browse files
dhruvmanilacclauss
andauthored
Add GitHub action for pre-commit (TheAlgorithms#2515)
* Add GitHub action file for pre-commit * Fix errors exposed by pre-commit hook: - Remove executable bit from files without shebang. I checked those file and it was not needed. - Fix with black * Apply suggestions from code review Co-authored-by: Christian Clauss <[email protected]> Co-authored-by: Christian Clauss <[email protected]>
1 parent ae65f55 commit acaeb22

File tree

5 files changed

+16
-1
lines changed

5 files changed

+16
-1
lines changed

.github/workflows/pre-commit.yml

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
name: pre-commit
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
pre-commit:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- uses: actions/checkout@v2
10+
- uses: actions/setup-python@v2
11+
- name: Install pre-commit
12+
run: |
13+
python -m pip install --upgrade pip
14+
python -m pip install --upgrade pre-commit
15+
- run: pre-commit run --verbose --all-files --show-diff-on-failure

machine_learning/scoring_functions.py

100755100644
File mode changed.

maths/sum_of_arithmetic_series.py

100755100644
File mode changed.

scheduling/round_robin.py

100755100644
File mode changed.

web_programming/instagram_crawler.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ def extract_user_profile(script) -> dict:
1515
May raise json.decoder.JSONDecodeError
1616
"""
1717
data = script.contents[0]
18-
info = json.loads(data[data.find('{"config"'): -1])
18+
info = json.loads(data[data.find('{"config"') : -1])
1919
return info["entry_data"]["ProfilePage"][0]["graphql"]["user"]
2020

2121

0 commit comments

Comments
 (0)