OiO.lk Community platform!

Oio.lk is an excellent forum for developers, providing a wide range of resources, discussions, and support for those in the developer community. Join oio.lk today to connect with like-minded professionals, share insights, and stay updated on the latest trends and technologies in the development field.
  You need to log in or register to access the solved answers to this problem.
  • You have reached the maximum number of guest views allowed
  • Please register below to remove this limitation

How to Remove Wildcard Imports from a Large Python Repository?

  • Thread starter Thread starter Kfir Ettinger
  • Start date Start date
K

Kfir Ettinger

Guest
I am working on a large python project that contains many thousands of files, includes a mix of independent scripts (many with main functions) and common modules. Unfortunately, in my project there is extense usage of wildcard imports (e.g., from module import *). This causes me to not be able to do automatic optimize for unused imports.

My goal is to replace these wildcard imports with explicit imports, but every time I start, I encounter hundreds of unresolved reference errors all over my project. I am looking for a systematic approach to tackle this task efficiently.

The codebase is quite large, making manual resolution impractical.

Has anyone here ever encountered and solved such a frustrating task? Where Should I Start? What are the best practices for systematically identifying and replacing wildcard imports in a large repository?
<p>I am working on a large python project that contains many thousands of files, includes a mix of independent scripts (many with main functions) and common modules.
Unfortunately, in my project there is extense usage of wildcard imports (e.g., from module import *).
This causes me to not be able to do automatic optimize for unused imports.</p>
<p>My goal is to replace these wildcard imports with explicit imports, but every time I start, I encounter hundreds of unresolved reference errors all over my project. I am looking for a systematic approach to tackle this task efficiently.</p>
<p>The codebase is quite large, making manual resolution impractical.</p>
<p>Has anyone here ever encountered and solved such a frustrating task?
Where Should I Start? What are the best practices for systematically identifying and replacing wildcard imports in a large repository?</p>
 

Latest posts

A
Replies
0
Views
1
Abraham Zsombor Nagy
A
A
Replies
0
Views
1
Abraham Zsombor Nagy
A
Top