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

Extend common_statements #159

Closed
Jasha10 opened this issue Nov 18, 2021 · 3 comments · Fixed by #160
Closed

Extend common_statements #159

Jasha10 opened this issue Nov 18, 2021 · 3 comments · Fixed by #160
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@Jasha10
Copy link
Contributor

Jasha10 commented Nov 18, 2021

Description

I'd like to request the ability to extend the common_statements dict.

Possible Solution

One idea is to allow user configuration (via e.g. pyproject.toml or .autoimport.ini or CLI arguments), so that the user can add their own common statements

Additional context

As an example, I find myself typing from numpy import typing as npt quite a bit. It would be nice to automate this with autoimport.

Thanks!

@lyz-code
Copy link
Owner

Hi @Jasha10 , thank you for taking the time to open an issue.

This should be really easy to implement thanks to @dbatten5 as he already started implementing the support to read from pyproject.toml. It's not finished because the cli is not using yet the Config class. He planned to do it though to solve the #148 issue.

Now I've got the head elsewhere, but PRs are really welcome. If you need further guidance on how to code it, we can discuss it in this issue.

Thanks :)

@lyz-code lyz-code added good first issue Good for newcomers enhancement New feature or request labels Nov 19, 2021
@lyz-code
Copy link
Owner

I've just seen that he has created the maison package to do exactly what we want. We could remove the code from autoimport and add maison as a requirement

@lyz-code
Copy link
Owner

It's available since 0.8.0, super awesome contribution :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants