File: update-asyncio-step2.sh

package info (click to toggle)
python-trollius 2.1~b1-5
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 1,520 kB
  • sloc: python: 21,533; ansic: 1,142; makefile: 176; sh: 44
file content (36 lines) | stat: -rwxr-xr-x 889 bytes parent folder | download | duplicates (3)
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
33
34
35
36
set -e

# Check for merge conflicts
if $(git status --porcelain|grep -q '^.U '); then
    echo "Fix the following conflicts:"
    git status
    exit 1
fi

# Ensure that yield from is not used
if $(git diff|grep -q 'yield from'); then
    echo "yield from present in changed code!"
    git diff | grep 'yield from' -B5 -A3
    exit 1
fi

# Ensure that mock patchs trollius module, not asyncio
if $(grep -q 'patch.*asyncio' tests/*.py); then
    echo "Fix following patch lines in tests/"
    grep 'patch.*asyncio' tests/*.py
    exit 1
fi

# Python 2.6 compatibility
if $(grep -q -E '\{[^0-9].*format' */*.py); then
    echo "Issues with Python 2.6 compatibility:"
    grep -E '\{[^0-9].*format' */*.py
    exit 1
fi
if $(grep -q -F 'super()' */*.py); then
    echo "Issues with Python 2.6 compatibility:"
    grep -F 'super()' */*.py
    exit 1
fi

echo "Now run ./update-tulip-step3.sh"