Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions DEVELOPMENT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Development

## Installing plugin to debug

Build wheels and install them with a shortcut script:

```bash
./scripts/install_plugin.sh
```

## Publishing

Increment the package version, build the distribution and publish the latest version:

```bash
bump-my-version bump patch
uv build
UV_PUBLISH_TOKEN=<pypi token> uv publish
```
23 changes: 23 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ dev = [
"pytest-stub>=1.1.0",
"pytest>=8.3.5",
"pytest-virtualenv>=1.8.1",
"bump-my-version>=1.1.4",
]

[build-system]
Expand Down Expand Up @@ -83,3 +84,25 @@ name = "testpypi"
url = "https://test.pypi.org/simple/"
publish-url = "https://test.pypi.org/legacy/"
explicit = true

[tool.bumpversion]
current_version = "0.1.3"
parse = "(?P<major>\\d+)\\.(?P<minor>\\d+)\\.(?P<patch>\\d+)"
serialize = ["{major}.{minor}.{patch}"]
search = "{current_version}"
replace = "{new_version}"
regex = false
ignore_missing_version = false
ignore_missing_files = false
tag = true
sign_tags = false
tag_name = "v{new_version}"
tag_message = "Bump version: {current_version} → {new_version}"
allow_dirty = false
commit = true
message = "Bump version: {current_version} → {new_version}"
moveable_tags = []
commit_args = ""
setup_hooks = []
pre_commit_hooks = []
post_commit_hooks = []
10 changes: 10 additions & 0 deletions scripts/install_plugin.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#~/bin/bash
pipx uninject python-lsp-server starkiller
echo "Removed old Starkiller"

uv build
echo "New version ready"

WHEEL=`ls ./dist/starkiller-*-none-any.whl | sort -V | tail -1`
pipx inject python-lsp-server ${WHEEL}[pylsp] -f
echo "Installed ${WHEEL}"
2 changes: 1 addition & 1 deletion starkiller/project.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ def _find_definitions_follow_import(
inames: set[ImportedName],
find_definitions: set[str]
) -> set[str]:
module_short_name = module_name.split(".")[-1]
module_short_name = module_name.rsplit(".", maxsplit=1)[-1]
found_definitions: set[str] = set()

is_star = any(iname.name == "*" for iname in inames)
Expand Down
Empty file added starkiller/py.typed
Empty file.