Skip to content

Commit 65c3d06

Browse files
Keep library in an src/ directory.
1 parent 0c68ed1 commit 65c3d06

File tree

151 files changed

+13
-12
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

151 files changed

+13
-12
lines changed

.github/workflows/test.yaml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,17 +26,17 @@ jobs:
2626
pip list
2727
- name: Run Tests
2828
run: |
29-
flake8 prompt_toolkit
29+
flake8 .
3030
coverage run -m pytest
3131
- name: Type Checker
3232
# Check wheather the imports were sorted correctly.
3333
# When this fails, please run ./tools/sort-imports.sh
3434
run: |
35-
mypy --strict prompt_toolkit --platform win32
36-
mypy --strict prompt_toolkit --platform linux
37-
mypy --strict prompt_toolkit --platform darwin
38-
isort -c --profile black prompt_toolkit examples tests setup.py
39-
black --check prompt_toolkit examples tests setup.py
35+
mypy --strict src/prompt_toolkit --platform win32
36+
mypy --strict src/prompt_toolkit --platform linux
37+
mypy --strict src/prompt_toolkit --platform darwin
38+
isort -c --profile black src examples tests setup.py
39+
black --check src examples tests setup.py
4040
- name: Validate README.md
4141
# Ensure that the README renders correctly (required for uploading to PyPI).
4242
run: |

docs/conf.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -194,11 +194,11 @@
194194

195195
latex_elements = {
196196
# The paper size ('letterpaper' or 'a4paper').
197-
#'papersize': 'letterpaper',
197+
# 'papersize': 'letterpaper',
198198
# The font size ('10pt', '11pt' or '12pt').
199-
#'pointsize': '10pt',
199+
# 'pointsize': '10pt',
200200
# Additional stuff for the LaTeX preamble.
201-
#'preamble': '',
201+
# 'preamble': '',
202202
}
203203

204204
# Grouping the document tree into LaTeX files. List of tuples

setup.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ def get_version(package):
1212
"""
1313
Return package version as listed in `__version__` in `__init__.py`.
1414
"""
15-
path = os.path.join(os.path.dirname(__file__), package, "__init__.py")
15+
path = os.path.join(os.path.dirname(__file__), "src", package, "__init__.py")
1616
with open(path, "rb") as f:
1717
init_py = f.read().decode("utf-8")
1818
return re.search("__version__ = ['\"]([^'\"]+)['\"]", init_py).group(1)
@@ -26,7 +26,8 @@ def get_version(package):
2626
description="Library for building powerful interactive command lines in Python",
2727
long_description=long_description,
2828
long_description_content_type="text/x-rst",
29-
packages=find_packages("."),
29+
packages=find_packages(where="src"),
30+
package_dir={"": "src"},
3031
package_data={"prompt_toolkit": ["py.typed"]},
3132
install_requires=["wcwidth"],
3233
# We require Python 3.6.2 for three reasons:
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)