PyZMQ (https://github.com/zeromq/pyzmq) has the following bit of code in zmq.utils.strtypes (src):
# give short 'b' alias for cast_bytes, so that we can use fake b'stuff'
# to simulate b'stuff'
b = asbytes = cast_bytes
u = cast_unicode
The aliased functions (cast_bytes and cast_unicode) are fully typed.
But pyrefly report lists these as follows:
{
"kind": "attr",
"name": "zmq.utils.strtypes.b",
"n_typable": 1,
"n_typed": 0,
"n_any": 0,
"n_untyped": 1,
"location": {
"line": 52,
"column": 1
}
},
{
"kind": "attr",
"name": "zmq.utils.strtypes.asbytes",
"n_typable": 1,
"n_typed": 0,
"n_any": 0,
"n_untyped": 1,
"location": {
"line": 52,
"column": 5
}
},
{
"kind": "attr",
"name": "zmq.utils.strtypes.u",
"n_typable": 0,
"n_typed": 0,
"n_any": 0,
"n_untyped": 0,
"location": {
"line": 53,
"column": 1
}
},
For u it's not marked as typable (i.e. ignored), so that works as intended.
However, for the two-for-one alias (b = asbytes = cast_bytes), pyrefly reports both b and asbytes as typable (and untyped).
PyZMQ (https://github.com/zeromq/pyzmq) has the following bit of code in
zmq.utils.strtypes(src):The aliased functions (
cast_bytesandcast_unicode) are fully typed.But
pyrefly reportlists these as follows:{ "kind": "attr", "name": "zmq.utils.strtypes.b", "n_typable": 1, "n_typed": 0, "n_any": 0, "n_untyped": 1, "location": { "line": 52, "column": 1 } }, { "kind": "attr", "name": "zmq.utils.strtypes.asbytes", "n_typable": 1, "n_typed": 0, "n_any": 0, "n_untyped": 1, "location": { "line": 52, "column": 5 } }, { "kind": "attr", "name": "zmq.utils.strtypes.u", "n_typable": 0, "n_typed": 0, "n_any": 0, "n_untyped": 0, "location": { "line": 53, "column": 1 } },For
uit's not marked as typable (i.e. ignored), so that works as intended.However, for the two-for-one alias (
b = asbytes = cast_bytes), pyrefly reports bothbandasbytesas typable (and untyped).