Skip to content

Comments

chore: cleanup pre-commit a bit#1080

Merged
henryiii merged 1 commit intopypa:mainfrom
henryiii:henryiii/chore/pcup
Feb 10, 2026
Merged

chore: cleanup pre-commit a bit#1080
henryiii merged 1 commit intopypa:mainfrom
henryiii:henryiii/chore/pcup

Conversation

@henryiii
Copy link
Contributor

@henryiii henryiii commented Feb 4, 2026

Small things I found to clean up. I was trying out ty, and noticed this cleanup while testing it.

Diff to try out ty
diff --git a/noxfile.py b/noxfile.py
index 046ec14..7505b8e 100644
--- a/noxfile.py
+++ b/noxfile.py
@@ -118,6 +118,18 @@ def docs(session: nox.Session) -> None:
         )


+@nox.session(default=False)
+def mypy(session: nox.Session) -> None:
+    session.install("--group=typing", "mypy", "orjson")
+    session.run("mypy")
+
+
+@nox.session(default=False)
+def ty(session: nox.Session) -> None:
+    session.install("--group=typing", "ty")
+    session.run("ty", "check")
+
+
 @nox.session(default=False)
 def release(session: nox.Session) -> None:
     """
diff --git a/pyproject.toml b/pyproject.toml
index de92ac7..a5c4c8a 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -50,6 +50,14 @@ docs = [
     "sphinx-toolbox",
     "typing-extensions>=4.1.0; python_version < '3.9'",
 ]
+typing = [
+  "nox",
+  "pytest<9",
+  "tomli",
+  "tomli_w",
+  "types-invoke",
+  "httpx",
+]


 [tool.flit.sdist]
@@ -96,6 +104,13 @@ files = ["src", "tests", "noxfile.py"]
 module = ["_manylinux", "pretend", "progress.*", "pkg_resources"]
 ignore_missing_imports = true

+
+[tool.ty]
+rules.unused-ignore-comment = "ignore"
+analysis.allowed-unresolved-imports = ["_manylinux", "pretend", "progress.*", "pkg_resources"]
+src.exclude = ["tasks/check.py"]
+
+
 [tool.ruff]
 extend-exclude = [
     "src/packaging/licenses/_spdx.py"

Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
@henryiii henryiii force-pushed the henryiii/chore/pcup branch from 6756b9c to a67173b Compare February 10, 2026 19:03
@henryiii henryiii merged commit 42d1a7b into pypa:main Feb 10, 2026
44 checks passed
@henryiii henryiii deleted the henryiii/chore/pcup branch February 10, 2026 19:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants