autoDocstring icon indicating copy to clipboard operation
autoDocstring copied to clipboard

return len(X) should infer int

Open vict0rsch opened this issue 4 years ago • 0 comments

When a function returns len(whatever), autoDocstringshould infer that return type is int

Versions (please complete the following information):

  • autoDocstring Version: 0.5.1
  • Operating System: macOS
  • Vscode Version: 1.44.2

Original Code (with line to generate on):

    def n_hospitals(self):
        return len(self.hospitals)

Expected Result:

    def n_hospitals(self):
        """
        [summary]

        Returns:
            int: [description]
        """
        return len(self.hospitals)

Actual Result:

    def n_hospitals(self):
        """
        [summary]

        Returns:
            [type]: [description]
        """
        return len(self.hospitals)

vict0rsch avatar May 08 '20 15:05 vict0rsch