static analysis

This commit is contained in:
burnettk 2022-06-10 17:48:36 -04:00
parent 0006182ead
commit 80522c12a6
3 changed files with 15 additions and 10 deletions

View File

@ -24,11 +24,11 @@ jobs:
name: Print event
runs-on: ubuntu-latest
steps:
- name: Dump GitHub context
env:
GITHUB_CONTEXT: ${{ toJson(github) }}
run: |
echo "$GITHUB_CONTEXT"
- name: Dump GitHub context
env:
GITHUB_CONTEXT: ${{ toJson(github) }}
run: |
echo "$GITHUB_CONTEXT"
dependabot:
runs-on: ubuntu-latest
@ -40,7 +40,7 @@ jobs:
###### GET PR NUMBER
# we saved the pr_number in tests.yml. fetch it so we can merge the correct PR.
# https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#workflow_run
- name: 'Download artifact'
- name: "Download artifact"
uses: actions/github-script@v6
with:
script: |
@ -60,7 +60,7 @@ jobs:
});
let fs = require('fs');
fs.writeFileSync(`${process.env.GITHUB_WORKSPACE}/pr_number.zip`, Buffer.from(download.data));
- name: 'Unzip artifact'
- name: "Unzip artifact"
run: unzip pr_number.zip
###########

View File

@ -4,7 +4,6 @@ import json
import connexion
from flask import Blueprint
from flask import g
from flask import request
from flask import Response
from flask_bpmn.api.api_error import ApiError
@ -237,7 +236,9 @@ def process_instance_list(process_model_id, page=1, per_page=100):
}
return Response(json.dumps(response_json), status=200, mimetype="application/json")
def get_file_from_request():
"""Get_file_from_request."""
request_file = connexion.request.files.get("file")
if not request_file:
raise ApiError(

View File

@ -156,7 +156,9 @@ def test_process_group_update(app, client: FlaskClient, with_bpmn_file_cleanup):
print("test_process_group_update")
def test_process_model_file_update_fails_if_no_file_given(app, client: FlaskClient, with_bpmn_file_cleanup):
def test_process_model_file_update_fails_if_no_file_given(
app, client: FlaskClient, with_bpmn_file_cleanup
):
"""Test_process_model_file_update."""
create_spec_file(app, client)
@ -175,7 +177,9 @@ def test_process_model_file_update_fails_if_no_file_given(app, client: FlaskClie
assert response.json["code"] == "no_file_given"
def test_process_model_file_update_fails_if_contents_is_empty(app, client: FlaskClient, with_bpmn_file_cleanup):
def test_process_model_file_update_fails_if_contents_is_empty(
app, client: FlaskClient, with_bpmn_file_cleanup
):
"""Test_process_model_file_update."""
create_spec_file(app, client)