autotyping icon indicating copy to clipboard operation
autotyping copied to clipboard

Infer `"x" % ...` as being a string

Open JelleZijlstra opened this issue 2 years ago • 1 comments

We already do this for str.format: https://github.com/JelleZijlstra/autotyping/blob/master/autotyping/autotyping.py#L536

JelleZijlstra avatar Feb 11 '22 20:02 JelleZijlstra

Similarly, we can infer that the following always return a bool:

  • UnaryOp with not
  • BinOp with in, not in, is, is not. (But not == which can return an arbitrary object.)

JelleZijlstra avatar Feb 11 '22 20:02 JelleZijlstra