diff --git a/.github/workflows/pre-commit.yml b/.github/workflows/pre-commit.yml new file mode 100644 index 000000000..7002d2d0a --- /dev/null +++ b/.github/workflows/pre-commit.yml @@ -0,0 +1,15 @@ +name: pre-commit + +on: [push, pull_request] + +jobs: + pre-commit: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-python@v2 + - name: Install pre-commit + run: | + python -m pip install --upgrade pip + python -m pip install --upgrade pre-commit + - run: pre-commit run --verbose --all-files --show-diff-on-failure diff --git a/machine_learning/scoring_functions.py b/machine_learning/scoring_functions.py old mode 100755 new mode 100644 diff --git a/maths/sum_of_arithmetic_series.py b/maths/sum_of_arithmetic_series.py old mode 100755 new mode 100644 diff --git a/scheduling/round_robin.py b/scheduling/round_robin.py old mode 100755 new mode 100644 diff --git a/web_programming/instagram_crawler.py b/web_programming/instagram_crawler.py index 38e383648..c81635bd3 100644 --- a/web_programming/instagram_crawler.py +++ b/web_programming/instagram_crawler.py @@ -15,7 +15,7 @@ def extract_user_profile(script) -> dict: May raise json.decoder.JSONDecodeError """ data = script.contents[0] - info = json.loads(data[data.find('{"config"'): -1]) + info = json.loads(data[data.find('{"config"') : -1]) return info["entry_data"]["ProfilePage"][0]["graphql"]["user"]