Skip to content

Commit 89c53fa

Browse files
committed
chore: improvements
1 parent a8b33dc commit 89c53fa

10 files changed

Lines changed: 4 additions & 328 deletions

File tree

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ license = "MIT"
1919
name = "litestar-start"
2020
readme = "README.md"
2121
requires-python = ">=3.10"
22-
version = "0.1.0a4"
22+
version = "0.1.0a5"
2323

2424
[project.scripts]
2525
litestar-start = "litestar_start.cli:main"

src/litestar_start/backends/base.py

Lines changed: 0 additions & 75 deletions
Original file line numberDiff line numberDiff line change
@@ -109,78 +109,3 @@ def _copy_template_files(backend_dir: Path, context: GeneratorContext) -> None:
109109
ensure_dir(tests_dir)
110110
for test_file in tests_template_dir.glob("*.py"):
111111
shutil.copy2(test_file, tests_dir / test_file.name)
112-
113-
@staticmethod
114-
def _create_pyproject_content(
115-
project_name: str,
116-
dependencies: list[str],
117-
dev_dependencies: list[str] | None = None,
118-
) -> str:
119-
"""Create pyproject.toml content.
120-
121-
Args:
122-
project_name: Project name.
123-
dependencies: List of dependencies.
124-
dev_dependencies: Optional list of dev dependencies.
125-
126-
Returns:
127-
Pyproject.toml content as string.
128-
129-
"""
130-
dev_dependencies = dev_dependencies or [
131-
"pytest>=8.0.0",
132-
"pytest-cov>=4.1.0",
133-
"pytest-asyncio>=0.23.0",
134-
"ruff>=0.4.0",
135-
"mypy>=1.9.0",
136-
]
137-
138-
deps_str = "\n".join(f' "{dep}",' for dep in dependencies)
139-
dev_deps_str = "\n".join(f' "{dep}",' for dep in dev_dependencies)
140-
141-
return f"""[project]
142-
name = "{project_name}-backend"
143-
version = "0.1.0"
144-
description = "Backend for {project_name}"
145-
readme = "README.md"
146-
requires-python = ">=3.11"
147-
dependencies = [
148-
{deps_str}
149-
]
150-
151-
[project.optional-dependencies]
152-
dev = [
153-
{dev_deps_str}
154-
]
155-
156-
[build-system]
157-
requires = ["hatchling"]
158-
build-backend = "hatchling.build"
159-
160-
[tool.uv]
161-
dev-dependencies = [
162-
{dev_deps_str}
163-
]
164-
165-
[tool.ruff]
166-
line-length = 120
167-
target-version = "py311"
168-
169-
[tool.ruff.lint]
170-
select = ["E", "F", "I", "UP", "B", "SIM"]
171-
ignore = ["E501"]
172-
173-
[tool.pytest.ini_options]
174-
asyncio_mode = "auto"
175-
testpaths = ["tests"]
176-
python_files = "test_*.py"
177-
python_classes = "Test*"
178-
python_functions = "test_*"
179-
180-
[tool.mypy]
181-
python_version = "3.11"
182-
strict = true
183-
warn_return_any = true
184-
warn_unused_configs = true
185-
disallow_untyped_defs = true
186-
"""

src/litestar_start/backends/litestar/templates/app/main.py.jinja

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ from litestar import Litestar, get
33
from litestar.config.cors import CORSConfig
44

55
from app.config import settings
6-
from app.controllers.base import base_controller
6+
from app.controllers import BaseController
77
{% endblock %}
88

99
{% block routes %}

src/litestar_start/backends/templates/.dockerignore

Lines changed: 0 additions & 42 deletions
This file was deleted.

src/litestar_start/backends/templates/.gitignore

Lines changed: 0 additions & 55 deletions
This file was deleted.

src/litestar_start/backends/templates/Dockerfile

Lines changed: 0 additions & 35 deletions
This file was deleted.

src/litestar_start/backends/templates/README.md

Lines changed: 0 additions & 116 deletions
This file was deleted.

src/litestar_start/core/templates.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ def _build_environment(self) -> Environment:
102102

103103
env = Environment(
104104
loader=PrefixLoader(loaders, delimiter=":"),
105-
autoescape=False, # We're generating code, not HTML
105+
autoescape=False, # We're generating code, not HTML # noqa: S701
106106
keep_trailing_newline=True,
107107
trim_blocks=True,
108108
lstrip_blocks=True,

src/litestar_start/generators/project.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,6 @@ def _generate_gitignore(self) -> None:
8989
.venv/
9090
ENV/
9191
.env
92-
uv.lock
9392
9493
# Node
9594
node_modules/

uv.lock

Lines changed: 1 addition & 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)