Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Flake 6.1 Quality Errors #1156

Merged
merged 1 commit into from
Jul 31, 2023
Merged

Fix Flake 6.1 Quality Errors #1156

merged 1 commit into from
Jul 31, 2023

Conversation

Satrat
Copy link

@Satrat Satrat commented Jul 31, 2023

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 join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants