pdoc3 / pdoc

:snake: :arrow_right: :scroll: Auto-generate API documentation for Python projects
https://pdoc3.github.io/pdoc/
GNU Affero General Public License v3.0
1.11k stars 143 forks source link

Python 3.10 Static Method Changes #400

Closed tjni closed 1 year ago

tjni commented 2 years ago

The following test fails on Python 3.10:

======================================================================
FAIL: test_text (pdoc.test.CliTest) (package='example_pkg')
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/private/tmp/nix-build-python3.10-pdoc3-0.10.0.drv-0/pdoc3-0.10.0/pdoc/test/__init__.py", line 372, in test_text
    self.assertNotIn(pattern, out)
AssertionError: 'non_callable_routine' unexpectedly found in "Module example_pkg ...

I think this is because, according to documentation:

Changed in version 3.10: Static methods now inherit the method attributes (module, name, qualname, doc and annotations), have a new wrapped attribute, and are now callable as regular functions.

I apologize I don't know enough how to fix this but would be happy to contribute what I can.

tjni commented 1 year ago

Thank you!