Returning unnamed tuple from function as a code smell

Please follow this template to help us specify this new rule:

  • Returning from a function multiple values in an unnamed way, makes it harder to understand the function signature and the meaning of each value
  • snippet of Noncompliant Code
    def foo():
      return 1, 2
  • snippet of Compilant Code (fixing the above noncompliant code)
from collections import namedtuple

Point = namedtuple('Point',['x','y'])

def foo():
  return Point(1, 2)