This is an archive of the discontinued LLVM Phabricator instance.

Fix all unused imports flake8 warnings
ClosedPublic

Authored by thopre on Jan 14 2021, 6:54 AM.

Details

Summary

lnt/lnttool/main.py:

  • ignore flask.current_app and flask.g unused import warnings since they are used through locals() below

lnt/lnttool/__init__.py:

  • ignore main.main unused import warning since it is LNT's entry point

tests/testing/cPerf.py:

  • ignore lnt.testing.profile.cPerf import warning since the import is used to avoid a failing test if cPerf is not available

lnt/server/ui/views.py and lnt/server/ui/regression_views.py:

lnt/server/ui/globals.py:

lnt/server/ui/decorators.py:

lnt/server/db/v4db.py:

lnt/server/db/testsuitedb.py:

lnt/server/db/migrations/upgrade_2_to_3.py,
lnt/server/db/migrations/upgrade_7_to_8.py,
lnt/server/db/migrations/upgrade_8_to_9.py and
lnt/server/db/migrations/upgrade_10_to_11.py:

  • remove sqlalchemy.orm.relation unused import which was never needed

lnt/server/db/migrations/upgrade_12_to_13.py:

lnt/server/db/migrations/upgrade_14_to_15.py:

  • remove lnt.server.db.migrations.util.rename_table unused import which was never needed

lnt/server/db/rules/rule_update_profile_stats.py:

  • remove datetime unused import which was never needed

tests/testing/cPerf.py:

  • remove time, threading and json unused import which were never needed

tests/server/db/search.py:

tests/server/db/CreateV4TestSuite.py:

  • remove sys unused import which was never needed

tests/server/db/CreateV4TestSuiteInstance.py:

Event Timeline

thopre created this revision.Jan 14 2021, 6:54 AM
thopre requested review of this revision.Jan 14 2021, 6:54 AM

Could you put your analysis of why the noqa is needed in the noqa comments, so that it will be easy to understand from looking at the code?

thopre updated this revision to Diff 316747.Jan 14 2021, 12:33 PM

Explain reason for noqa inline

thopre updated this revision to Diff 316759.Jan 14 2021, 12:59 PM

Rebase on top of D94715

cmatthews accepted this revision.Jan 14 2021, 12:59 PM
This revision is now accepted and ready to land.Jan 14 2021, 12:59 PM
thopre closed this revision.Jan 14 2021, 1:51 PM