Taken from upstream: https://github.com/pdoc3/pdoc/commit/4aa70de2221a34a3003a7e5f52a9b91965f0e359.patch. From 4aa70de2221a34a3003a7e5f52a9b91965f0e359 Mon Sep 17 00:00:00 2001 From: Spencer Baugh Date: Thu, 23 Sep 2021 09:00:25 -0400 Subject: [PATCH] TST: use explicit ClassWithNew instead of typing.Generic typing.Generic doesn't have a __new__ method in 3.9. Fixes https://github.com/pdoc3/pdoc/issues/355 --- pdoc/test/__init__.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/pdoc/test/__init__.py b/pdoc/test/__init__.py index e8c3d94..8b67ab7 100644 --- a/pdoc/test/__init__.py +++ b/pdoc/test/__init__.py @@ -1043,16 +1043,20 @@ class C2: self.assertEqual(pdoc.Class('C2', mod, C2).params(), ['a', 'b', 'c=None', '*', 'd=1', 'e']) - class G(typing.Generic[T]): + class ClassWithNew: + def __new__(self, arg): + pass + + class G(ClassWithNew): def __init__(self, a, b, c=100): pass self.assertEqual(pdoc.Class('G', mod, G).params(), ['a', 'b', 'c=100']) - class G2(typing.Generic[T]): + class G2(ClassWithNew): pass - self.assertEqual(pdoc.Class('G2', mod, G2).params(), ['*args', '**kwds']) + self.assertEqual(pdoc.Class('G2', mod, G2).params(), ['arg']) def test_url(self): mod = pdoc.Module(EXAMPLE_MODULE) 675531b400cd'>diff
path: root/gnu/machine
AgeCommit message (Expand)Author
2024-08-11gnu: Replace (almost) all uses of /run/setuid-programs....Tobias Geerinckx-Rice
2024-06-04file-systems: Add support for mounting CIFS file systems...Richard Sent
2024-02-19machine/ssh: Refresh parameterization of %CURRENT-SYSTEM....Ricardo Wurmus
2023-08-08system: Do not check initrd modules for pseudo file systems....Ludovic Courtès
2022-11-17machine: ssh: Validate 'system' field....Ludovic Courtès
2022-11-09machine/digital-ocean: Pull operating system definition out of string....Ricardo Wurmus
2022-11-09machine/digital-ocean: Set load path to Guile 3.0 directories....Ricardo Wurmus
2022-11-09machine/digital-ocean: Use static-networking-service-type....Ricardo Wurmus
2022-11-09machine/digital-ocean: Use nightly Guix....Ricardo Wurmus
2022-10-17guix: Fix typos....Julien Lepiller
2022-09-26machine: ssh: Parameterize '%current-system' early on....Ludovic Courtès
2022-09-04Fix misspelling of GUIX_DIGITAL_OCEAN_TOKEN....Matthew James Kraai
2022-03-01initrd: Use non-hyphenated kernel command-line parameter names....Maxim Cournoyer
2022-01-16machine: ssh: Add 'safety-checks?' field....Ludovic Courtès
2022-01-09machine: ssh: Open a single SSH session per machine....Ludovic Courtès
2021-08-29Migrate to the new 'targets' field of bootloader-configuration....Maxim Cournoyer