AI 帮我重新上架了 Chrome 插件:Copy Unlock
2025 4 17 11:15 AM 0 条评论 141 次查看
分类:Google Chrome 标签:CSS, Google Chrome, JavaScript
这几天交接工作比较清闲,正好又被 CSDN 的复制限制给恶心到,于是准备重做这个插件。
をつあおにまで GFW!
2025 4 17 11:15 AM 0 条评论 141 次查看
分类:Google Chrome 标签:CSS, Google Chrome, JavaScript
2025 4 11 05:16 PM 0 条评论 23 次查看
ctx.QueryArgs().Peek("foo")
。紧随其后的是 atreugo,写法也是类似:ctx.UserValue("foo").(string)
。2025 1 26 05:32 PM 0 条评论 66 次查看
2024 12 26 11:13 PM 0 条评论 95 次查看
boto3
)来进行调用,没有异步实现。2024 12 23 05:41 PM 0 条评论 42 次查看
QNetworkRequest
来创建网络连接的,没有写任何代理相关的代码。由于我是用 SOCKS5/HTTP 代理翻墙,并没有采用 VPN 这种全局代理的方式,因此只能另找方法让它使用代理。2024 9 30 05:19 PM 0 条评论 122 次查看
2024 9 4 12:30 AM 3 条评论 744 次查看
分类:无 标签:无
2024 8 9 12:26 AM 0 条评论 465 次查看
2024 7 14 11:11 PM 0 条评论 465 次查看
2024 5 29 07:45 PM 0 条评论 317 次查看
ProxiesTypes
:URLTypes = Union["URL", str]
ProxyTypes = Union[URLTypes, "Proxy"]
ProxiesTypes = Union[ProxyTypes, Dict[URLTypes, Union[None, ProxyTypes]]]
可以看出,dict[str, str]
应该是符合它的参数签名的,然而我传入一个 dict[str, str]
参数后,Pylance 却会报错,这让我大为不解。from typing import Mapping
a: dict[int, int] = {}
b: dict[int, int | str] = a # error:
# Expression of type "dict[int, int]" is incompatible with declared type "dict[int, int | str]"
# "dict[int, int]" is incompatible with "dict[int, int | str]"
# Type parameter "_VT@dict" is invariant, but "int" is not the same as "int | str"
# Consider switching from "dict" to "Mapping" which is covariant in the value type
c: Mapping[int, int | str] = a
d: Mapping[int | str, int] = a # error:
# Expression of type "dict[int, int]" is incompatible with declared type "Mapping[int | str, int]"
# "dict[int, int]" is incompatible with "Mapping[int | str, int]"
# Type parameter "_KT@Mapping" is invariant, but "int" is not the same as "int | str"
是不是很奇怪,为啥 dict[int, int]
和 dict[int, int | str]
或 Mapping[int | str, int]
都不兼容,而与 Mapping[int, int | str]
兼容?