8000 Make compatible with python2 CI · DataDog/datadog-lambda-python@d1c9b48 · GitHub
[go: up one dir, main page]

Skip to content

Commit d1c9b48

Browse files
committed
Make compatible with python2 CI
1 parent daaf191 commit d1c9b48

File tree

3 files changed

+17
-9
lines changed

3 files changed

+17
-9
lines changed

.circleci/config.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,7 @@ jobs:
3636
name: Check Formatting
3737
command: |
3838
source venv/bin/activate
39-
black --check datadog_lambda/
40-
black --check tests
39+
./scripts/check_format.sh
4140
4241
- save_cache:
4342
paths:

scripts/check_format.sh

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
#!/bin/sh
2+
set -e
3+
4+
PYTHON_VERSION=$(python -c 'import sys; print sys.version_info.major')
5+
if [ "$PYTHON_VERSION" = "2" ]; then
6+
echo "Skipping formatting, black not compatible with python 2"
7+
exit 0
8+
fi
9+
pip install -Iv black==19.10b0
10+
11+
python -m black --check datadog_lambda/
12+
python -m black --check tests
13+
14+
15+

setup.py

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,6 @@
3535
"setuptools==42.0.2",
3636
],
3737
extras_require={
38-
"dev": [
39-
"nose2==0.9.1",
40-
"black==19.10b0",
41-
"flake8==3.7.9",
42-
"requests==2.22.0",
43-
"boto3==1.10.33",
44-
]
38+
"dev": ["nose2==0.9.1", "flake8==3.7.9", "requests==2.22.0", "boto3==1.10.33"]
4539
},
4640
)

0 commit comments

Comments
 (0)
0