Skip to content

Commit

Permalink
fixed linter issues
Browse files Browse the repository at this point in the history
  • Loading branch information
Jesse Smith committed Sep 8, 2023
1 parent a6005c2 commit 3466433
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
4 changes: 2 additions & 2 deletions examples/image_to_annotations.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 3466433

Please sign in to comment.