Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#1548 'Undefined variable from import: format' on imported string

open
Editor (491)
5
2013-01-06
2013-01-06
Roy Rothenberg
No

When calling format() by dot-notation on a string imported from another module/package, code analysis raises error "Undefined variable from import: format".

for example:
===== module a.py =====
string_for_formatting = 'Format me {format_content}'
====================

===== module b.py =====
import a
format_content = 'please'
a.string_for_formatting.format(format_content=format_content) # Error here - "Undefined variable from import: format"
====================

Thanks!

Discussion

  • Roy Rothenberg
    Roy Rothenberg
    2013-01-06

    • summary: Undefined variable from import: format on imported string --> 'Undefined variable from import: format' on imported string