forked from mihail8531/faststream
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstatic-pre-commit.sh
More file actions
executable file
·32 lines (26 loc) · 926 Bytes
/
Copy pathstatic-pre-commit.sh
File metadata and controls
executable file
·32 lines (26 loc) · 926 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#!/usr/bin/env bash
# taken from: https://jaredkhan.com/blog/mypy-pre-commit
# A script for running mypy,
# with all its dependencies installed.
set -o errexit
# Change directory to the project root directory.
cd "$(dirname "$0")"/..
# Install the dependencies into the mypy env.
# Note that this can take seconds to run.
# In my case, I need to use a custom index URL.
# Avoid pip spending time quietly retrying since
# likely cause of failure is lack of VPN connection.
pip install --editable ".[dev]" \
--retries 1 \
--no-input \
--quiet
# Run on all files,
# ignoring the paths passed to this script,
# so as not to miss type errors.
# My repo makes use of namespace packages.
# Use the namespace-packages flag
# and specify the package to run on explicitly.
# Note that we do not use --ignore-missing-imports,
# as this can give us false confidence in our results.
# mypy faststream
./scripts/static-analysis.sh