TheButlah / vscode-reorder-python-imports

Integrates reorder-python-imports with Visual Studio Code
https://marketplace.visualstudio.com/items?itemName=thebutlah.reorder-python-imports
MIT License
5 stars 2 forks source link

does not work with setting.json #14

Closed azriel1rf closed 2 years ago

azriel1rf commented 2 years ago

I added the following setting to the settings.json.

    "reorder-python-imports.args": [
        "--py310-plus",
        "--add-import 'from __future__ import annotations'",
    ],

image Those lines are highlighted and the message says Unknown Configuration Setting.

The setting does not work.

azriel1rf commented 2 years ago

I found that the implementation of the configuration is newer than v0.1.0 the latest version on the marketplace. Publish it to market place, please. @TheButlah

azriel1rf commented 2 years ago

Or would you mind if add @tetov to the maintainer?

TheButlah commented 2 years ago

Yes, I would be happy to add a maintainer! @azriel1rf just lmk who

tetov commented 2 years ago

I wouldn't mind. Would I need some kind of extra access to update the extension in the gallery?

TheButlah commented 2 years ago

Most likely, yes - I've added you as a maintainer. If you want, you could look into getting an auto-deploy workflow running, if not I can look at this when I have time this weekend.

I'm not really around actively maintaining this, so an auto-deploy workflow would be the best approach I think. Just not sure how to keep my personal private key private :)

tetov commented 2 years ago

If you want, you could look into getting an auto-deploy workflow running, if not I can look at this when I have time this weekend.

I enjoy ci-setup quite a lot. I'll look into it.

I'm not really around actively maintaining this, so an auto-deploy workflow would be the best approach I think. Just not sure how to keep my personal private key private :)

You add your key as an environment secret in the repo that is referenced in the github workflow. Or even better you add a key specific to this repo as a secret. :)

TheButlah commented 2 years ago

Let me know if any permissions need to be granted on your end or any keys/secrets need to be generated for the vscode extension library.

I see a bunch of open PRs I didn't notice before lol - wow I've really not been maintaining this at all, I feel bad :( I had made it in a few days for work, and then my employer never used it lol. So I never got to maintain it, and I've stopped using python since then

Thank you for offering to maintain it :)

tetov commented 2 years ago

Don't worry about it.

I'll merge my PR eventually but first focus on auto-deploy :).

tetov commented 2 years ago

@TheButlah Could you please look over the branch protection settings please? Currently PR's can only be rebase and merged which is fine but the commits needs to be signed which github web UI can't do: image

I can rebase merge (with gpg signatures) from command line but that will get tedious for dependabot alerts..

tetov commented 2 years ago

Also, I've merged my PR's except the one which extends the test suite and runs it in CI.

If there is a good mechanism for releasing a preview version of an extension I'd love to do that. I don't want to release current master before more test, either automated or manual.

TheButlah commented 2 years ago

Currently PR's can only be rebase and merged which is fine but the commits needs to be signed which github web UI can't do

Updated branch protection rules to not require signed commits. Would like to leave the rebase and merge requirement though if thats not going to cause too much trouble

TheButlah commented 2 years ago

If there is a good mechanism for releasing a preview version of an extension I'd love to do that. I don't want to release current master before more test, either automated or manual.

There is a preview flag in the manifest, but I think that would mark the extension as a whole as a preview, instead of making it a beta like you seem to intend to. Honestly marking it as a preview and making it a beta via SemVer is probably the right way.

https://code.visualstudio.com/api/references/extension-manifest

tetov commented 2 years ago

Leaving an update here too:

This issue can be solved in two ways. Either by @TheButlah releasing a pre-release (you can provide normal and pre-release versions from the same plugin now) as described in the readme in #25. Or by doing a "normal" release which anyone with access to push tags to this repo can do (so currently me or @TheButlah) after #25 is closed and access key added to repo.

tetov commented 2 years ago

@azriel1rf I've released v0.2.0 now which includes the settings key. Please try it out :). Please reopen if this issue or create another if you have any problems with 0.2.0.

jahamilton12121 commented 2 years ago

This does not seem to work for me. I am adding this to my settings.json

"[python]": {
        "editor.codeActionsOnSave": {
            "source.organizeImports": false,
            "source.organizeImports.reorder-python-imports": true
        },
    }

Saving does not reorder imports

TheButlah commented 2 years ago

@jahamilton12121 what version of the extension are you using?

jahamilton12121 commented 2 years ago

0.2.0

jahamilton12121 commented 2 years ago

So re-order imports does not work at all actually, only sort imports does

tetov commented 2 years ago

Ok, I'll look into this. Haven't used VSCode in a bit so sorry for not catching it earlier.