Ignore unsed import in dap/__init__.py

flake8 warns about dap/__init__.py because it has a number of unused
imports.  Most of these are intentional: the import is done to ensure
that the a DAP request is registered with the server object.

This patch applies a "noqa" comment to these imports, and also removes
one import that is truly unnecessary.

Approved-By: Simon Marchi <simon.marchi@efficios.com>
This commit is contained in:
Tom Tromey
2024-03-19 10:27:56 -06:00
parent 2fde5149d7
commit a311bd9e2b

View File

@@ -14,25 +14,27 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>. # along with this program. If not, see <http://www.gnu.org/licenses/>.
import os import os
import gdb
# This must come before other DAP imports. # This must come before other DAP imports.
from . import startup from . import startup
# Load modules that define commands. # Load modules that define commands. These imports intentionally
from . import breakpoint # ignore the unused import warning, as these modules are being loaded
from . import bt # for their side effects -- namely, registering DAP commands with the
from . import disassemble # server object. "F401" is the flake8 "imported but unused" code.
from . import evaluate from . import breakpoint # noqa: F401
from . import launch from . import bt # noqa: F401
from . import locations from . import disassemble # noqa: F401
from . import memory from . import evaluate # noqa: F401
from . import modules from . import launch # noqa: F401
from . import next from . import locations # noqa: F401
from . import pause from . import memory # noqa: F401
from . import scopes from . import modules # noqa: F401
from . import sources from . import next # noqa: F401
from . import threads from . import pause # noqa: F401
from . import scopes # noqa: F401
from . import sources # noqa: F401
from . import threads # noqa: F401
from .server import Server from .server import Server