Rule Definition
Software that does not follow the principles of reuse requires more maintenance effort in order to propagate changes to all instances of duplicated code
Remediation
Avoid using wildcard (*) imports. Either import the full module. A direct import would bind to the same name as that of another object. Second way is to make the import statement more specific.
Violation Code Sample
>>> from math import *
>>> from numpy import *
Fixed Code Sample
>>> from math import floor
>>> from numpy import floor as np_floor
>>> values = array([2.3, 8.7])
>>> np_floor(values)
Related Technologies
Technical Criterion
Programming Practices - Unexpected Behavior
About CAST Appmarq
CAST Appmarq is by far the biggest repository of data about real IT systems. It's built on thousands of analyzed applications, made of 35 different technologies, by over 300 business organizations across major verticals. It provides IT Leaders with factual key analytics to let them know if their applications are on track.