Skip to content

Commit

Permalink
fix another
Browse files Browse the repository at this point in the history
  • Loading branch information
JelleZijlstra committed Oct 11, 2024
1 parent 4f5374b commit 737724c
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion pyanalyze/test_arg_spec.py
Original file line number Diff line number Diff line change
Expand Up @@ -210,10 +210,19 @@ def test_get_argspec():
Composite(KnownValue(ClassWithCall)),
) == asc.get_argspec(ClassWithCall.pure_async_classmethod)

# This behaves differently in 3.9 through 3.12 than in earlier and later
# versions. The behavior change was made in
# https://github.com/python/cpython/issues/63272
# and undone in https://github.com/python/cpython/issues/89519
if hasattr(ClassWithCall.classmethod_before_async, "decorator"):
callable = ClassWithCall.classmethod_before_async.decorator.fn
else:
callable = ClassWithCall.classmethod_before_async.__func__.fn

assert BoundMethodSignature(
Signature.make(
[SigParameter("cls"), SigParameter("ac")],
callable=ClassWithCall.classmethod_before_async.decorator.fn,
callable=callable,
is_asynq=True,
),
Composite(KnownValue(ClassWithCall)),
Expand Down

0 comments on commit 737724c

Please sign in to comment.