Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
python-poetry
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
open
python-poetry
Commits
3ee8584c
Unverified
Commit
3ee8584c
authored
May 29, 2022
by
Stephan Spindler
Committed by
GitHub
May 29, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Allow any file extension for README file (#5357)
Co-authored-by: Bjorn Neergaard <bjorn@neersighted.com>
parent
27034d61
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
10 deletions
+4
-10
docs/cli.md
+3
-1
src/poetry/layouts/layout.py
+0
-8
tests/console/commands/test_new.py
+1
-1
No files found.
docs/cli.md
View file @
3ee8584c
...
@@ -103,7 +103,9 @@ my-package
...
@@ -103,7 +103,9 @@ my-package
*
`--name`
: Set the resulting package name.
*
`--name`
: Set the resulting package name.
*
`--src`
: Use the src layout for the project.
*
`--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
## init
...
...
src/poetry/layouts/layout.py
View file @
3ee8584c
...
@@ -41,8 +41,6 @@ BUILD_SYSTEM_MAX_VERSION: str | None = None
...
@@ -41,8 +41,6 @@ BUILD_SYSTEM_MAX_VERSION: str | None = None
class
Layout
:
class
Layout
:
ACCEPTED_README_FORMATS
=
{
"md"
,
"rst"
}
def
__init__
(
def
__init__
(
self
,
self
,
project
:
str
,
project
:
str
,
...
@@ -64,12 +62,6 @@ class Layout:
...
@@ -64,12 +62,6 @@ class Layout:
self
.
_description
=
description
self
.
_description
=
description
self
.
_readme_format
=
readme_format
.
lower
()
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
.
_license
=
license
self
.
_python
=
python
self
.
_python
=
python
...
...
tests/console/commands/test_new.py
View file @
3ee8584c
...
@@ -157,7 +157,7 @@ def test_command_new(
...
@@ -157,7 +157,7 @@ def test_command_new(
verify_project_directory
(
path
,
package_name
,
package_path
,
include_from
)
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
):
def
test_command_new_with_readme
(
fmt
:
str
|
None
,
tester
:
CommandTester
,
tmp_dir
:
str
):
package
=
"package"
package
=
"package"
path
=
Path
(
tmp_dir
)
/
package
path
=
Path
(
tmp_dir
)
/
package
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment