Skip to content

Commit e77b9b8

Browse files
committed
completed step four
1 parent adc42bd commit e77b9b8

File tree

8 files changed

+60
-1
lines changed

8 files changed

+60
-1
lines changed

Makefile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,7 @@ package-install:
88
uv tool install dist/*.whl
99
reinstall:
1010
uv tool install --force-reinstall dist/*.whl
11+
lint:
12+
uv run ruff check brain_games
13+
lint-fix:
14+
uv run ruff check brain_games --fix

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
11
### Hexlet tests and linter status:
2-
[![Actions Status](https://github.com/P-Solod/python-project-49/actions/workflows/hexlet-check.yml/badge.svg)](https://github.com/P-Solod/python-project-49/actions)
2+
[![Actions Status](https://github.com/P-Solod/python-project-49/actions/workflows/hexlet-check.yml/badge.svg)](https://github.com/P-Solod/python-project-49/actions)
3+
4+
[![Maintainability](https://api.codeclimate.com/v1/badges/e9fd145072b912372b3e/maintainability)](https://codeclimate.com/github/P-Solod/python-project-50/maintainability)

brain_games/cli.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import prompt
22

3+
34
def welcome_user():
45
name = prompt.string('May I have your name? ')
56
print(f'Hello, {name}!')

brain_games/scripts/brain_games.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
from brain_games.cli import welcome_user
22

3+
34
def main():
45
print('Welcome to the Brain Games!')
56
welcome_user()
67

8+
79
if __name__ == "__main__":
810
main()

pyproject.toml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,10 @@ build-backend = "hatchling.build"
1515
[tool.hatch.build.targets.wheel]
1616
packages = ["brain_games"]
1717

18+
[dependency-groups]
19+
dev = [
20+
"ruff>=0.9.5",
21+
]
22+
1823
[project.scripts]
1924
brain-games = "brain_games.scripts.brain_games:main"

ruff.toml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
line-length = 80
2+
3+
[lint.per-file-ignores]
4+
# init modules can contain the local imports, logic, unused imports
5+
"__init__.py" = ["F401"]
6+
7+
[lint]
8+
preview = true
9+
select = ["E", "F", "I", "C90"]

ruff.toml:Zone.Identifier

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[ZoneTransfer]
2+
ZoneId=3
3+
HostUrl=https://github.com/

uv.lock

Lines changed: 33 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)