Skip to content

Commit 252d428

Browse files
committed
add linter and badges
1 parent 2f9813c commit 252d428

File tree

7 files changed

+61
-3
lines changed

7 files changed

+61
-3
lines changed

README.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,8 @@
11
### Hexlet tests and linter status:
2-
[![Actions Status](https://github.com/yng-trouble/python-project-49/actions/workflows/hexlet-check.yml/badge.svg)](https://github.com/yng-trouble/python-project-49/actions)
2+
[![Actions Status](https://github.com/yng-trouble/python-project-49/actions/workflows/hexlet-check.yml/badge.svg)](https://github.com/yng-trouble/python-project-49/actions)
3+
### Bugs badge
4+
[![Bugs](https://sonarcloud.io/api/project_badges/measure?project=yng-trouble_python-project-49&metric=bugs)](https://sonarcloud.io/summary/new_code?id=yng-trouble_python-project-49)
5+
### Code smells badge
6+
[![Code Smells](https://sonarcloud.io/api/project_badges/measure?project=yng-trouble_python-project-49&metric=code_smells)](https://sonarcloud.io/summary/new_code?id=yng-trouble_python-project-49)
7+
### Maintainabilty badge
8+
[![Maintainability Rating](https://sonarcloud.io/api/project_badges/measure?project=yng-trouble_python-project-49&metric=sqale_rating)](https://sonarcloud.io/summary/new_code?id=yng-trouble_python-project-49)

brain_games/cli.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@
33

44
def welcome_user():
55
name = prompt.string('May I have your name? ')
6-
print (f'Hello, {name}')
6+
print(f'Hello, {name}')

brain_games/scripts/brain_games.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,6 @@ def main():
55
print('Welcome to the Brain Games!')
66
welcome_user()
77

8+
89
if __name__ == '__main__':
910
main()

makefile

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,7 @@ build:
88
uv build
99

1010
package-install:
11-
uv tool install dist/*.whl
11+
uv tool install dist/*.whl
12+
13+
lint:
14+
uv run ruff check brain_games

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.13.2",
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"]

uv.lock

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