Skip to content

Commit 7337012

Browse files
add ruff.toml and fixed files
1 parent c141055 commit 7337012

File tree

6 files changed

+54
-1
lines changed

6 files changed

+54
-1
lines changed

Makefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,5 @@ build:
66
uv build
77
package-install:
88
uv tool install dist/*.whl
9+
make lint:
10+
uv run ruff check brain_games

brain_games/cli.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
import prompt
2+
3+
24
def welcome_user():
35
print("Welcome to the Brain Games!")
46
name = prompt.string('May I have your name? ')

brain_games/scripts/brain_games.py

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

3+
34
def main():
45
welcome_user()
56

7+
68
if __name__ == "__main__":
79
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.8.6",
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 & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)