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

Pass --application-directories #4

Closed
paw-lu opened this issue May 26, 2021 · 4 comments
Closed

Pass --application-directories #4

paw-lu opened this issue May 26, 2021 · 4 comments

Comments

@paw-lu
Copy link

paw-lu commented May 26, 2021

As a cli, I usually run

reorder-python-imports --application-directories=src

when the project uses an src/ directory.

Is there a way to pass a value to the --application-directories arg through the extension?


Thanks for the extension, it's been really useful!

@tetov
Copy link
Collaborator

tetov commented Aug 9, 2021

@paw-lu There is now after #5, through a general args parameter.

Would it be of interest to add more parameters? Like having a configuration value named
"Application directories": {value} where which is passed like this: reorder-python-imports --application-directories={value}?

Having a general args conf makes the vscode plugin easier to maintain, but maybe it's worth it?

@paw-lu
Copy link
Author

paw-lu commented Aug 9, 2021

@paw-lu There is now after #5, through a general args parameter.

Awesome. Thank you so much! This is really appreciated.

Would it be of interest to add more parameters?

Hard call. I think the general args—like you said—is a general solution that is flexible and more future proof. Plus it's in line with what VSCode does for other Python linting tools.

{
    "python.linting.flake8Args": [],
    "python.linting.black8Args": [],
    "python.testing.pytestArgs": []
}

Having individual config settings would definitley be nice—as you can directly point out the options to the user and use hints for the valid parameters—but might not be worth the upkeep costs to keep it in sync with the main tool. In addition you'll add some additional complexity as args can conflict with the individual parameter values.

@tetov
Copy link
Collaborator

tetov commented Aug 9, 2021

After some more thinking I remembered this comment from @asotille. It isn't technically applicable here because vscode handles the settings API for us but the sentiment resonates with me. args is enough, as long as the extension can run the command correctly everything is fine.

@paw-lu
Copy link
Author

paw-lu commented Aug 29, 2021

Going to close this issue as @tetov addressed the core issue.

@paw-lu paw-lu closed this as completed Aug 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants