-
-
Notifications
You must be signed in to change notification settings - Fork 470
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix
rye add
and rye remove
to create proper tool.rye section on -…
…-dev and --exclude flags (#1256) Hey! This is to address issue #1249 Closes #1249 Looks like the `[tool.rye]` section in `pyproject.toml` is not created properly if it was not already presented in the file. This was due to the it not being created as a table. Tested it like that: - Have `pyproject.toml` without `[tool.rye]` table: ``` [project] authors = [{ name = "xxx", email = "xxx@xxx.com" }] name = "rye-test" version = "0.1.0" description = "wasm sample use py2wasm, rust, wasmer, gowasm, wasmedge" readme = "README.md" requires-python = ">=3.11.7" [build-system] requires = ["hatchling"] build-backend = "hatchling.build" ``` - ``` $ rye add --dev ipython ``` results in `pyproject.toml` ``` [project] authors = [{ name = "xxx", email = "xxx@xxx.com" }] name = "rye-test" version = "0.1.0" description = "wasm sample use py2wasm, rust, wasmer, gowasm, wasmedge" readme = "README.md" requires-python = ">=3.11.7" [build-system] requires = ["hatchling"] build-backend = "hatchling.build" [tool.rye] dev-dependencies = [ "ipython>=8.26.0", ] ``` Before fix it was: `pyproject.toml` ``` tool = { rye = { dev-dependencies = [ "ipython>=8.26.0", ] } } [project] authors = [{ name = "xxx", email = "xxx@xxx.com" }] name = "rye-test" version = "0.1.0" description = "wasm sample use py2wasm, rust, wasmer, gowasm, wasmedge" readme = "README.md" requires-python = ">=3.11.7" [build-system] requires = ["hatchling"] build-backend = "hatchling.build" ```
- Loading branch information
1 parent
09b67c4
commit 57b7c08
Showing
2 changed files
with
103 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters