Skip to content

Commit

Permalink
Lazy load difflib
Browse files Browse the repository at this point in the history
  • Loading branch information
CalebBell committed Jul 6, 2022
1 parent 9c681de commit 4802666
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions ht/insulation.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,6 @@
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.'''

try:
import difflib
except:
pass
from fluids.numerics import interp
from ht.conduction import R_to_k

Expand Down Expand Up @@ -613,6 +609,7 @@ def nearest_material(name, complete=False):
.. [3] Gesellschaft, V. D. I., ed. VDI Heat Atlas. 2nd edition.
Berlin; New York:: Springer, 2010.
'''
import difflib
if complete:
hits = difflib.get_close_matches(name, materials_dict.keys(), n=1000, cutoff=0)
for hit in hits:
Expand Down

0 comments on commit 4802666

Please sign in to comment.