惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

博客园_首页
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
Microsoft Azure Blog
Microsoft Azure Blog
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
Recent Announcements
Recent Announcements
L
Lohrmann on Cybersecurity
Vercel News
Vercel News
P
Palo Alto Networks Blog
P
Proofpoint News Feed
WordPress大学
WordPress大学
Know Your Adversary
Know Your Adversary
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
K
Kaspersky official blog
T
Threat Research - Cisco Blogs
GbyAI
GbyAI
L
LangChain Blog
Y
Y Combinator Blog
T
Tenable Blog
腾讯CDC
T
Tailwind CSS Blog
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
NISL@THU
NISL@THU
A
Arctic Wolf
Security Latest
Security Latest
IT之家
IT之家
Latest news
Latest news
Cisco Talos Blog
Cisco Talos Blog
P
Privacy & Cybersecurity Law Blog
T
Tor Project blog
T
Threatpost
Simon Willison's Weblog
Simon Willison's Weblog
Last Week in AI
Last Week in AI
D
Darknet – Hacking Tools, Hacker News & Cyber Security
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
AWS News Blog
AWS News Blog
月光博客
月光博客
aimingoo的专栏
aimingoo的专栏
量子位
T
Troy Hunt's Blog
Blog — PlanetScale
Blog — PlanetScale
V
Vulnerabilities – Threatpost
I
InfoQ
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
C
Cyber Attacks, Cyber Crime and Cyber Security
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
I
Intezer
爱范儿
爱范儿
C
Cisco Blogs
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org

alexwlchan’s notes

Disable the new message animations in WhatsApp Finding high-churn folders that bother Backblaze Always-on SSH agent forwarding with my Git pushes Managing the caption of a photo with AppleScript (but not PhotoKit) Goodhart’s and Campbell’s Law are different Notes from The Cornishman No. 176 (Spring 2026) Notes from The Cornishman No. 176 (Spring 2026) GitUp can’t diff text files larger than 8MB Home Testing the width of a page on a mobile device using Playwright Disable AirPods charging notifications Start a Caddy server in a subprocess during a Python session Filter a list of JSON object based on a list of tags HOME_GET_ME_HOME is a Citymapper Shortcuts action The FileExistsError exception exposes a filename attribute The red-lined bubble snail Why can’t Python connect to example.com? How to truncate the middle of long command output AirPlay Receiver can interfere with Flask apps What’s the main prefix in SQLite queries? The file(1) command can read SQLite databases My randline project is tested by Crater Drawing an image with Liquid Glass using SwiftUI Previews Road signs in the Soviet union don’t have circular heads Setting up golink in my personal tailnet Create a file atomically in Go Get a map of IP addresses for devices in my tailnet The SQLite command line shell will count your unclosed parentheses Use SQL triggers to prevent overwriting a value Testing date formatting with date-fns-tz and different timezones The “strangler” pattern is named after a tree, not an act of violence Place with the same name, but different etymology
Useful type hints for Python
2026-03-27 · via alexwlchan’s notes
  • Posted

A collection of non-obvious type hints that I couldn’t easily find in documentation or Google searches.

I type check most of my Python code with mypy --strict. This note describes some of the non-obvious type hints that I couldn’t easily find in documentation or Google searches.

pytest parameterised tests

import pytest
from _pytest.mark.structures import ParameterSet

params: list[ParameterSet] = [
    pytest.param("1", id="one"),
    pytest.param("2", id="two"),
    pytest.param("3", id="three"),
]