diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index 0f45e676..51be3796 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -5,7 +5,7 @@ on: push jobs: build: - runs-on: ubuntu-18.04 + runs-on: ubuntu-22.04 strategy: fail-fast: false matrix: @@ -29,7 +29,7 @@ jobs: # stop the build if there are Python syntax errors or undefined names # flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics - flake8 . --ignore=E222,E402,E226,E241,E203,E202,E271,E201,E221 --count --max-complexity=10 --max-line-length=200 --statistics + flake8 . --ignore=E222,E402,E226,E241,E203,E202,E271,E201,E221,C901 --count --max-complexity=10 --max-line-length=200 --statistics - name: Test with pytest run: | IS_CI_RUNNER=True pytest diff --git a/examples/image_to_annotations.py b/examples/image_to_annotations.py index 6103daa0..1051b861 100644 --- a/examples/image_to_annotations.py +++ b/examples/image_to_annotations.py @@ -55,7 +55,7 @@ def image_to_annotations(img_fn: str, out_dir: str) -> None: detection_results = json.loads(resp.content) # error check detection_results - if type(detection_results) == dict and 'code' in detection_results.keys() and detection_results['code'] == 404: + if isinstance(detection_results, dict) and 'code' in detection_results.keys() and detection_results['code'] == 404: assert False, f'Error performing detection. Check that drawn_humanoid_detector.mar was properly downloaded. Response: {detection_results}' # order results by score, descending @@ -99,7 +99,7 @@ def image_to_annotations(img_fn: str, out_dir: str) -> None: pose_results = json.loads(resp.content) # error check pose_results - if type(pose_results) == dict and 'code' in pose_results.keys() and pose_results['code'] == 404: + if isinstance(pose_results, dict) and 'code' in pose_results.keys() and pose_results['code'] == 404: assert False, f'Error performing pose estimation. Check that drawn_humanoid_pose_estimator.mar was properly downloaded. Response: {pose_results}' # if more than one skeleton detected, abort diff --git a/setup.py b/setup.py index 632a3ce5..15a547e9 100644 --- a/setup.py +++ b/setup.py @@ -12,7 +12,7 @@ python_requires='>=3.8.13', install_requires=[ 'numpy== 1.23.3', - 'scipy==1.9.3', + 'scipy==1.10.0', 'scikit-image==0.19.3', 'scikit-learn==1.1.2', 'shapely==1.8.5.post1',