mirror of
https://github.com/element-hq/synapse.git
synced 2024-11-21 17:15:38 +03:00
62b1ce8539
The CI appears to use the latest version of isort, which is a problem when isort gets a major version bump. Rather than try to pin the version, I've done the necessary to make isort5 happy with synapse.
21 lines
387 B
Bash
Executable file
21 lines
387 B
Bash
Executable file
#!/bin/sh
|
|
#
|
|
# Runs linting scripts over the local Synapse checkout
|
|
# isort - sorts import statements
|
|
# black - opinionated code formatter
|
|
# flake8 - lints and finds mistakes
|
|
|
|
set -e
|
|
|
|
if [ $# -ge 1 ]
|
|
then
|
|
files=$*
|
|
else
|
|
files="synapse tests scripts-dev scripts"
|
|
fi
|
|
|
|
echo "Linting these locations: $files"
|
|
isort $files
|
|
python3 -m black $files
|
|
./scripts-dev/config-lint.sh
|
|
flake8 $files
|