Thanks to visit codestin.com
Credit goes to github.com

Skip to content
This repository was archived by the owner on Jun 3, 2025. It is now read-only.

Fix Flake 6.1 Quality Errors#1156

Merged
Satrat merged 1 commit into
mainfrom
fix-quality-check
Jul 31, 2023
Merged

Fix Flake 6.1 Quality Errors#1156
Satrat merged 1 commit into
mainfrom
fix-quality-check

Conversation

@Satrat

@Satrat Satrat commented Jul 31, 2023

Copy link
Copy Markdown

flake8 was updated from 6.0 to 6.1, causing a new error when running make quality. I updated the offending lines to compare types with is/is not rather than ==/!=

Before Change:

(.venv) sadkins@nmgpuserver3:~/deepsparse$ make quality
Running copyright checks
python3 utils/copyright.py quality 'examples/**/*.py' 'scripts/**/*.py' 'src/**/*.py' 'tests/**/*.py' 'utils/**/*.py' setup.py 'docs/**/*.md' 'docs/**/*.rst' 'examples/**/*.md' 'scripts/**/*.md' CODE_OF_CONDUCT.md CONTRIBUTING.md DEVELOPING.md README.md
314 files have copyrights
Running python quality checks
black --check examples tests src utils setup.py;
All done! ✨ 🍰 ✨
249 files would be left unchanged.
isort --check-only examples tests src utils setup.py;
Skipped 6 files
flake8 examples tests src utils setup.py;
src/deepsparse/utils/data.py:104:12: E721 do not compare types, for exact checks use `is` / `is not`, for instance checks use `isinstance()`
tests/deepsparse/pipelines/test_dynamic_batch_pipeline.py:38:12: E721 do not compare types, for exact checks use `is` / `is not`, for instance checks use `isinstance()`

After Change

make quality Completes without errors

Testing

Covered already by existing unit tests

@Satrat Satrat changed the title fix new quality errors Fix Flake 6.1 Quality Errors Jul 31, 2023
@Satrat Satrat merged commit 49a23e7 into main Jul 31, 2023
@Satrat Satrat deleted the fix-quality-check branch July 31, 2023 20:14
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants