dsi-clinic / cocoa

Clinic Opinionated Codebase Oversight and Analysis
1 stars 0 forks source link

Importing modules #30

Closed NickRoss closed 4 months ago

NickRoss commented 4 months ago

@ridhi96 reports that the output is saying that there are missing modules. Can we get a working reproducible example to fix and diagnose?

NickRoss commented 4 months ago

These are from IE Project

Picture2 Picture1

timhannifan commented 4 months ago

There were 2 issues here: 1) False Pylint warnings for import-error (E0401). Since we are running pylint outside of the environment the repository uses, we get pylint warnings for every package that cannot be found. This is incorrect. I resolved the issue by ignoring this type of error in the reported warnings. 2) True Pylint warnings for no-name-in-module (E0611). I was able to resolve this by using a different style of import path for the local modules. For example in utils/processing.py, rather than from utils import abs_fixed_avail, use from utils.utils import abs_fixed_avail.