forked from mirrors/thatmattlove-hyperglass
fixed CI branch issue, fixed regex issue for pylint badge
This commit is contained in:
parent
d119e6b606
commit
b2cdfb8e8f
2 changed files with 3 additions and 2 deletions
|
|
@ -55,8 +55,7 @@ def pylint_badge(int_only):
|
|||
pylint_output = pylint_stdout.getvalue()
|
||||
click.secho(pylint_output, fg="red")
|
||||
pylint_score = re.search(
|
||||
r"Your code has been rated at (\d+\.\d+)\/10 \(previous run:.*",
|
||||
pylint_output,
|
||||
r"Your code has been rated at (\d+\.\d+)\/10.*", pylint_output
|
||||
).group(1)
|
||||
if not pylint_score == "10.00":
|
||||
raise RuntimeError(f"Pylint score {pylint_score} not acceptable.")
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@ setup_git() {
|
|||
|
||||
check_format() {
|
||||
black hyperglass
|
||||
git checkout origin/master
|
||||
git add hyperglass/ *.py
|
||||
git commit --message "Black Formatting - travis #$TRAVIS_BUILD_NUMBER"
|
||||
echo "Completed Black Formatting"
|
||||
|
|
@ -17,6 +18,7 @@ check_pylint() {
|
|||
echo "Pylint score: $PYLINT_SCORE"
|
||||
if [ "$PYLINT_SCORE" == "10.00" ]
|
||||
then
|
||||
git checkout origin/master
|
||||
git add pylint.svg
|
||||
git commit --message "Pylint Badge - travis #$TRAVIS_BUILD_NUMBER"
|
||||
echo "Completed Pylint Check & Badge Creation"
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue