PY-11317 Incorrect type detection for formatter string with java String

Fix return type for formatting operation:

str = "test %s " % str