Skip to content

Codebase Refactor: Localize wildcard imports #2520

@arav-agarwal2

Description

@arav-agarwal2

In general, it's best practice to reduce wildcard imports wherever possible so that it's clear where methods/functions are coming from.

Using ruff's F405 rule, we can see that the following files contain wildcard imports where there are names that are undefined without considering wildcard imports. By specifying what comes from where, we can easily figure out what's important:

retired_benchmarks/translation/gnmt/tensorflow/loadgen_gnmt.py
retired_benchmarks/vision/medical_imaging/3d-unet-brats19/Task043_BraTS_2019.py
tools/submission/submission_checker/checks/accuracy_check.py
tools/submission/submission_checker/checks/compliance_check.py
tools/submission/submission_checker/checks/measurements_checks.py
tools/submission/submission_checker/checks/performance_check.py
tools/submission/submission_checker/checks/power_check.py
tools/submission/submission_checker/checks/system_check.py
tools/submission/submission_checker/loader.py
tools/submission/submission_checker/results.py
tools/submission/submission_checker/utils.py
vision/classification_and_detection/python/backend_ncnn.py
vision/medical_imaging/3d-unet-kits19/base_SUT.py
vision/medical_imaging/3d-unet-kits19/inference_utils.py
vision/medical_imaging/3d-unet-kits19/preprocess.py
vision/medical_imaging/3d-unet-kits19/unet_pytorch_to_onnx.py

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions