Skip to content

Commit aaa02a4

Browse files
committed
fix ty and remove python 3.9 and 3.10
1 parent 56de9dd commit aaa02a4

File tree

8 files changed

+7
-17
lines changed

8 files changed

+7
-17
lines changed

.github/workflows/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ jobs:
2929
runs-on: ubuntu-latest
3030
strategy:
3131
matrix:
32-
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
32+
python-version: ["3.11", "3.12", "3.13"]
3333
fail-fast: false
3434
defaults:
3535
run:

README.md

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,6 @@ json_mime = MimeType.APPLICATION_JSON
4040
print(json_mime) # "application/json"
4141
print(json_mime.extensions) # ("json",)
4242

43-
# Perfect for type hints and IDE support
44-
def set_content_type(mime: MimeType) -> str:
45-
return f"Content-Type: {mime}"
4643
```
4744

4845
### Flexible String Parsing

docs/index.md

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,6 @@ json_mime = MimeType.APPLICATION_JSON
4040
print(json_mime) # "application/json"
4141
print(json_mime.extensions) # ("json",)
4242

43-
# Perfect for type hints and IDE support
44-
def set_content_type(mime: MimeType) -> str:
45-
return f"Content-Type: {mime}"
4643
```
4744

4845
### Flexible String Parsing

pyproject.toml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,11 @@ description = "Type-safe MIME type enumeration for Python"
55
authors = [{ name = "Florian Maas", email = "[email protected]" }]
66
readme = "README.md"
77
keywords = ['mime', 'mime-type', 'file-extension', 'content-type', 'enum']
8-
requires-python = ">=3.9,<4.0"
8+
requires-python = ">=3.11,<4.0"
99
classifiers = [
1010
"Intended Audience :: Developers",
1111
"Programming Language :: Python",
1212
"Programming Language :: Python :: 3",
13-
"Programming Language :: Python :: 3.9",
14-
"Programming Language :: Python :: 3.10",
1513
"Programming Language :: Python :: 3.11",
1614
"Programming Language :: Python :: 3.12",
1715
"Programming Language :: Python :: 3.13",
@@ -47,7 +45,7 @@ packages = ["src/mime_enum"]
4745

4846
[tool.ty.environment]
4947
python = "./.venv"
50-
python-version = "3.9"
48+
python-version = "3.11"
5149

5250
[tool.pytest.ini_options]
5351
testpaths = ["tests"]

src/mime_enum/mimetype.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Auto-generated by scripts/generate_mimetypes.py — DO NOT EDIT.
22
from __future__ import annotations
33

4-
from enum import StrEnum
4+
from enum import StrEnum # ty: ignore[unresolved-import]
55

66

77
class MimeType(StrEnum):

tests/test_mimetypes.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ def test_extensions_are_tuples_not_strings():
2424
Guard-rail: the generator must emit tuples like ('ez',) not ('ez').
2525
If it emits plain strings, this will fail.
2626
"""
27-
for mt in MimeType:
27+
for mt in MimeType: # ty: ignore[not-iterable]
2828
assert isinstance(mt.extensions, tuple), f"{mt} .extensions should be tuple, got {type(mt.extensions)}"
2929

3030

tox.ini

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
11
[tox]
22
skipsdist = true
3-
envlist = py39, py310, py311, py312, py313
3+
envlist = py311, py312, py313
44

55
[gh-actions]
66
python =
7-
3.9: py39
8-
3.10: py310
97
3.11: py311
108
3.12: py312
119
3.13: py313

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)