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
4 changes: 3 additions & 1 deletion docs/cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,9 @@ my-package

* `--name`: Set the resulting package name.
* `--src`: Use the src layout for the project.
* `--readme`: Specify the readme file format. One of `md` (default) or `rst`.
* `--readme`: Specify the readme file extension. Default is `md`. If you intend to publish to PyPI
keep the [recommendations for a PyPI-friendly README](https://packaging.python.org/en/latest/guides/making-a-pypi-friendly-readme/)
in mind.


## init
Expand Down
8 changes: 0 additions & 8 deletions src/poetry/layouts/layout.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,6 @@


class Layout:
ACCEPTED_README_FORMATS = {"md", "rst"}

def __init__(
self,
project: str,
Expand All @@ -64,12 +62,6 @@ def __init__(
self._description = description

self._readme_format = readme_format.lower()
if self._readme_format not in self.ACCEPTED_README_FORMATS:
accepted_readme_formats = ", ".join(self.ACCEPTED_README_FORMATS)
raise ValueError(
f"Invalid readme format '{readme_format}', use one of"
f" {accepted_readme_formats}."
)

self._license = license
self._python = python
Expand Down
2 changes: 1 addition & 1 deletion tests/console/commands/test_new.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ def test_command_new(
verify_project_directory(path, package_name, package_path, include_from)


@pytest.mark.parametrize(("fmt",), [(None,), ("md",), ("rst",)])
@pytest.mark.parametrize(("fmt",), [(None,), ("md",), ("rst",), ("adoc",), ("creole",)])
def test_command_new_with_readme(fmt: str | None, tester: CommandTester, tmp_dir: str):
package = "package"
path = Path(tmp_dir) / package
Expand Down