roboflow / inference

A fast, easy-to-use, production-ready inference server for computer vision supporting deployment of many popular model architectures and fine-tuned models.
https://inference.roboflow.com
Other
1.12k stars 84 forks source link

Optimize some imports #496

Closed iurisilvio closed 3 days ago

iurisilvio commented 4 days ago

Description

It fixes a few import issues, found with ruff check --select="TCH" . and with importtime-waterfall lib.

Type of change

Please delete options that are not relevant.

How has this change been tested, please provide a testcase or example of how you tested the change?

CI should pass.

iurisilvio commented 3 days ago

I think it is good to remove extra imports, it is easy to lose control of imports and it cause some overhead.

But if we don't have tooling to find errors caused by conditional imports, it is not a good thing to do. We can do that with flake8 or ruff later.