Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

There should be a rule to disallow untyped function parameters but allow return type inference #15799

Closed
minenwerfer opened this issue Aug 1, 2023 · 2 comments
Labels

Comments

@minenwerfer
Copy link

Feature

A no-untyped-parameters rule which will output an error if the signature of a function has untyped parameters but will allow inferring this function return type. It is somewhat how TypeScript's noImplicityAny currently works. Existing function signature rules will require parameters to be annotated but also the return type.

The following should give an error (parameter a isn't typed):

def fn(a): ...

The following shouldn't, and the return type should be inferred as int:

def fn(a: int): return a
@erictraut
Copy link

I think this is a duplicate of #10149.

@AlexWaygood
Copy link
Member

I think this is a duplicate of #10149.

yes

@AlexWaygood AlexWaygood closed this as not planned Won't fix, can't repro, duplicate, stale Aug 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants