Skip to content

Commit 9533792

Browse files
authored
migrate to uv-build (#14)
1 parent adfc584 commit 9533792

File tree

5 files changed

+11
-6
lines changed

5 files changed

+11
-6
lines changed

.github/workflows/workflow.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,6 @@ jobs:
1515
ci:
1616
uses: community-of-python/community-workflow/.github/workflows/preset.yml@main
1717
with:
18-
python-version: '["3.10", "3.12","3.13"]'
18+
python-version: '["3.10","3.11","3.12","3.13"]'
19+
os: '["ubuntu-latest"]'
1920
secrets: inherit

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,4 @@ uv.lock
55
.mypy_cache
66
.ruff_cache
77
__pycache__
8+
.idea

Justfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,5 +21,6 @@ test *args:
2121

2222
publish:
2323
rm -rf dist
24+
uv version $GITHUB_REF_NAME
2425
uv build
2526
uv publish --token $PYPI_TOKEN

pyproject.toml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ classifiers = [
1313
"Typing :: Typed",
1414
]
1515
authors = [{ name = "community-of-python" }]
16-
dynamic = ["version"]
16+
version = "0"
1717
requires-python = ">=3.10"
1818
dependencies = [
1919
"httpx",
@@ -31,11 +31,12 @@ dev = ["anyio", "faker", "pytest", "pytest-cov"]
3131
lint = [{ include-group = "dev" }, "auto-typing-final", "mypy", "ruff"]
3232

3333
[build-system]
34-
requires = ["hatchling", "hatch-vcs"]
35-
build-backend = "hatchling.build"
34+
requires = ["uv_build"]
35+
build-backend = "uv_build"
3636

37-
[tool.hatch.version]
38-
source = "vcs"
37+
[tool.uv.build-backend]
38+
module-name = "safe_s3_storage"
39+
module-root = ""
3940

4041
[tool.ruff]
4142
fix = true

safe_s3_storage/file_validator.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ def _validate_mime_type(self, *, file_name: str, file_content: bytes) -> str:
6060
mime_type = "text/plain"
6161
if mime_type in self.allowed_mime_types:
6262
return mime_type
63+
6364
raise exceptions.NotAllowedMimeTypeError(
6465
file_name=file_name, mime_type=mime_type, allowed_mime_types=self.allowed_mime_types
6566
)

0 commit comments

Comments
 (0)