Skip to content

Commit eb96d54

Browse files
committed
добален файл cli с функцией приветсвия, обновление пакета
1 parent 082e035 commit eb96d54

File tree

6 files changed

+27
-2
lines changed

6 files changed

+27
-2
lines changed
440 Bytes
Binary file not shown.

brain_games/cli.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
import prompt
2+
3+
def welcome_user():
4+
name = prompt.string('May I have your name? ')
5+
print(f'Hello, {name}!')
90 Bytes
Binary file not shown.

brain_games/scripts/brain_games.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
11
def greet():
22
print('Welcome to the Brain Games!')
33

4+
from brain_games.cli import welcome_user
5+
46
def main():
57
greet()
8+
welcome_user()
69

710
if __name__ == '__main__':
811
main()

pyproject.toml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@ version = "0.1.0"
44
description = "Add your description here"
55
readme = "README.md"
66
requires-python = ">=3.12"
7-
dependencies = []
7+
dependencies = [
8+
"prompt>=0.4.1",
9+
]
810

911
[build-system]
1012
requires = ["hatchling"]
@@ -14,4 +16,4 @@ build-backend = "hatchling.build"
1416
packages = ["brain_games"]
1517

1618
[project.scripts]
17-
brain-games = "brain_games.scripts.brain_games:main"
19+
brain-games = "brain_games.scripts.brain_games:main"

uv.lock

Lines changed: 15 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)