deshaw / pyflyby

A set of productivity tools for Python
https://deshaw.github.io/pyflyby/
Other
348 stars 52 forks source link

Typo in log statement in _imports2s.py (PyInf#8957) #219

Closed dshivashankar1994 closed 1 year ago

dshivashankar1994 commented 1 year ago

In the below lines of code, there is an extra comma causing TypeError

                    # We found nothing in the target module.  This probably
                    # means that module itself is just importing things from
                    # other modules.  Currently we intentionally exclude those
                    # imports since usually we don't want them.  TODO: do
                    # something better here.
                    logger.warning("%s: found nothing to import from %s, ",
                                   "leaving unchanged: '%s'",
                                   filename, module, imp)

Extra comma at end of to import from %s, ",

> tidy-imports --replace-star-imports test_pyflyby.py
--- Logging error ---
...
TypeError: not all arguments converted during string formatting
...
Message: '%s: found nothing to import from %s, '
Arguments: ("leaving unchanged: '%s'", Filename('/u/shiva/test_pyflyby.py'), ModuleHandle('math.ufunc.extension'), Import('from math.ufunc.extension import *'))