From bda2cb107ef6f8391100a09ad186dc794c650d06 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EB=B0=A9=EC=84=B1=EB=B2=94=20=28Bang=20Seongbeom=29?= Date: Sat, 27 Jul 2024 13:37:53 +0000 Subject: [PATCH 1/4] Update README.md --- README.md | 1 - 1 file changed, 1 deletion(-) diff --git a/README.md b/README.md index 85c1dff..85175c5 100644 --- a/README.md +++ b/README.md @@ -28,7 +28,6 @@ py -m pip install urlpattern ```py from urlpattern import URLPattern - pattern = URLPattern("https://example.com/*") print(pattern.test("https://example.com/foo/bar")) # output: True From a4354529cffd09f3d20cb20a29d6512f7fa47248 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EB=B0=A9=EC=84=B1=EB=B2=94=20=28Bang=20Seongbeom=29?= Date: Sat, 27 Jul 2024 13:39:03 +0000 Subject: [PATCH 2/4] Enable type checking and inlay hints --- .vscode/settings.json | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.vscode/settings.json b/.vscode/settings.json index 9b38853..8b30857 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -3,5 +3,11 @@ "tests" ], "python.testing.unittestEnabled": false, - "python.testing.pytestEnabled": true + "python.testing.pytestEnabled": true, + "python.analysis.typeCheckingMode": "basic", + "python.analysis.autoImportCompletions": true, + "python.analysis.inlayHints.callArgumentNames": "partial", + "python.analysis.inlayHints.functionReturnTypes": true, + "python.analysis.inlayHints.pytestParameters": true, + "python.analysis.inlayHints.variableTypes": true } \ No newline at end of file From 3c269519cf01745e0d9911f61cc1b67d20905801 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EB=B0=A9=EC=84=B1=EB=B2=94=20=28Bang=20Seongbeom=29?= Date: Sat, 27 Jul 2024 13:39:53 +0000 Subject: [PATCH 3/4] Fix type checking errors --- tests/test_lib.py | 1 + urlpattern.pyi | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/test_lib.py b/tests/test_lib.py index 720681e..cc21719 100644 --- a/tests/test_lib.py +++ b/tests/test_lib.py @@ -72,4 +72,5 @@ def test(entry): continue else: + assert result assert result[key] == entry["expected_match"][key] diff --git a/urlpattern.pyi b/urlpattern.pyi index 8ca00c3..7d85965 100644 --- a/urlpattern.pyi +++ b/urlpattern.pyi @@ -28,7 +28,7 @@ class URLPattern: @property def hash(self) -> str: ... -class URLPatternInit(TypedDict): +class URLPatternInit(TypedDict, total=False): protocol: str username: str password: str From 3b0d0b66a0a4a8f7363ebb1822a5d1b28b2815f9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EB=B0=A9=EC=84=B1=EB=B2=94=20=28Bang=20Seongbeom=29?= Date: Sat, 27 Jul 2024 13:40:14 +0000 Subject: [PATCH 4/4] v0.1.2 --- Cargo.lock | 2 +- Cargo.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index e9bd2ee..d89b2f6 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -186,7 +186,7 @@ dependencies = [ [[package]] name = "python-urlpattern" -version = "0.1.1" +version = "0.1.2" dependencies = [ "pyo3", "regex", diff --git a/Cargo.toml b/Cargo.toml index 54ab1a3..bc62648 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "python-urlpattern" -version = "0.1.1" +version = "0.1.2" authors = ["방성범 (Bang Seongbeom) "] edition = "2021" description = "An implementation of the URL Pattern Standard for Python written in Rust"