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

[feature]: Auto typing #18

Open
aemonge opened this issue Jun 27, 2024 · 1 comment
Open

[feature]: Auto typing #18

aemonge opened this issue Jun 27, 2024 · 1 comment
Labels
question Further information is requested

Comments

@aemonge
Copy link

aemonge commented Jun 27, 2024

Why not also include an auto-typing generation? pyright usually detects typing pretty well, and inlay hints it too, but there is nothing that I've seen to add types automatically.

making:

def hello():
  pass

to

def hello() -> None:
  pass

With pyright hints, is extremely useful.

@relastle
Copy link
Owner

relastle commented Jul 4, 2024

@aemonge
The reason why the feature is not included is that the core concept of this plugins is to minimize the effort of importing or of removing import of python scripts.

However, is this need is a very general one, I might consier it developed.
Is there any linter that suggest

def hello():
    pass

to

def hello() -> None:
    pass

in this way?

Since this plugins fixes the code automatically with the aid of existing linter's output (such as ruff, pyflakes and etc),
automatic fixed like the above would be impossible if there is no such linter.

@relastle relastle added the question Further information is requested label Jul 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants