Skip to content

Commit ec0b729

Browse files
authored
feat: simplify pre-commit hook (#559)
* update: adds .vscode/settings.json to gitignore * update: simplifies black config - uses extend-exclude to use pre-configured black exclusions * feat: sets up pre-commit - Does not run pylint/pyright since they can't be used in pre-commit directly - TODO: migrate branch restrictions if required * feat: move branch checks to pre-commit * update: adds hook to prevent commits to master * update: use pre-commit to set up hooks * refactor: moves configs to pyproject.toml - Removes random `lib64` symlink - Updates makefile with new commands * lint: ruff + import sorting * feat: update ruff configs * lint: more ruff * lint: pyright * refactor: consolidates workflows * refactor: use matrix for running lint workflow * update: split check into a different step for clarity * fix: adds venv activation to steps * update: reduce workflow runs for lint jobs - Remove trigger for PR edits * update: ignore .ruff_cache * fix: broken test due to line change * update: move pyright to run on explicit request - Avoids issues with IDE integration - Already checked in workflows - Keeps hooks fast * update: handle PR branch checks * fix: target branch checks * lint: formatting
1 parent 968c756 commit ec0b729

File tree

440 files changed

+2579
-2184
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

440 files changed

+2579
-2184
lines changed

.circleci/authReactDjango.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,4 +105,4 @@ else
105105
echo "test failed for auth-react tests... exiting!"
106106
exit 1
107107
fi
108-
fi
108+
fi

.circleci/authReactFastApi.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,4 +100,4 @@ else
100100
echo "test failed for auth-react tests... exiting!"
101101
exit 1
102102
fi
103-
fi
103+
fi

.circleci/authReactFlask.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,4 +102,4 @@ else
102102
echo "test failed for auth-react tests... exiting!"
103103
exit 1
104104
fi
105-
fi
105+
fi

.circleci/config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,4 +61,4 @@ workflows:
6161
filters:
6262
branches:
6363
only:
64-
- master
64+
- master

.circleci/installJava.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
wget https://download.java.net/java/GA/jdk15.0.1/51f4f36ad4ef43e39d0dfdbaf6549e32/9/GPL/openjdk-15.0.1_linux-x64_bin.tar.gz
44
mkdir /usr/java
5-
mv openjdk-15.0.1_linux-x64_bin.tar.gz /usr/java
5+
mv openjdk-15.0.1_linux-x64_bin.tar.gz /usr/java
66
cd /usr/java
77
tar -xzvf openjdk-15.0.1_linux-x64_bin.tar.gz
88
rm openjdk-15.0.1_linux-x64_bin.tar.gz

.circleci/markAsSuccess.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,4 +36,4 @@ if [ $responseStatus -ne "200" ]
3636
then
3737
echo "patch api failed"
3838
exit 1
39-
fi
39+
fi

.circleci/markDevTagAsTestNotPassed.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,4 +37,4 @@ then
3737
echo "failed core PUT API status code: $responseStatus. Exiting!"
3838
cat out.bin
3939
exit 1
40-
fi
40+
fi

.circleci/setupAndTestBackendSDKWithFreeCore.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,4 +83,3 @@ fi
8383

8484
# kill test-server
8585
kill $(lsof -t -i:$API_PORT)
86-

.circleci/setupAndTestWithAuthReact.sh

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -58,16 +58,16 @@ git checkout $2
5858
npm run init > /dev/null
5959
(cd ./examples/for-tests && npm run link) # this is there because in linux machine, postinstall in npm doesn't work..
6060
cd ./test/server/
61-
npm i git+https://github.com:supertokens/supertokens-node.git#$3
62-
npm i
61+
npm i git+https://github.com:supertokens/supertokens-node.git#$3
62+
npm i
6363
cd ../../../project/tests/auth-react/fastapi-server
6464
export PYTHONPATH="${PYTHONPATH}:/root/project"
6565
uvicorn app:app --host 0.0.0.0 --port 8083 &
6666
pid=$!
6767
cd ../../../../supertokens-auth-react/
6868

69-
# When testing with supertokens-auth-react for version >= 0.18 the SKIP_OAUTH
70-
# flag will not be checked because Auth0 is used as a provider so that the Thirdparty tests can run reliably.
69+
# When testing with supertokens-auth-react for version >= 0.18 the SKIP_OAUTH
70+
# flag will not be checked because Auth0 is used as a provider so that the Thirdparty tests can run reliably.
7171
# In versions lower than 0.18 Github is used as the provider.
7272

7373
# SKIP_OAUTH=true npm run test-with-non-node
@@ -143,4 +143,4 @@ fi
143143
echo "all tests passed, killing processes: $pid"
144144
kill -9 $pid
145145
rm -rf ./test/server/node_modules/supertokens-node
146-
git checkout HEAD -- ./test/server/package.json
146+
git checkout HEAD -- ./test/server/package.json

.circleci/setupAndTestWithAuthReactWithDjango.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,16 +60,16 @@ git checkout $2
6060
npm run init > /dev/null
6161
(cd ./examples/for-tests && npm run link) # this is there because in linux machine, postinstall in npm doesn't work..
6262
cd ./test/server/
63-
npm i git+https://github.com:supertokens/supertokens-node.git#$3
63+
npm i git+https://github.com:supertokens/supertokens-node.git#$3
6464
npm i
6565
cd ../../../project/tests/auth-react/django3x
6666
export PYTHONPATH="${PYTHONPATH}:/root/project"
6767
uvicorn mysite.asgi:application --port 8083 &
6868
pid=$!
6969
cd ../../../../supertokens-auth-react/
7070

71-
# When testing with supertokens-auth-react for version >= 0.18 the SKIP_OAUTH
72-
# flag will not be checked because Auth0 is used as a provider so that the Thirdparty tests can run reliably.
71+
# When testing with supertokens-auth-react for version >= 0.18 the SKIP_OAUTH
72+
# flag will not be checked because Auth0 is used as a provider so that the Thirdparty tests can run reliably.
7373
# In versions lower than 0.18 Github is used as the provider.
7474

7575
# SKIP_OAUTH=true npm run test-with-non-node

0 commit comments

Comments
 (0)