Skip to content

Commit 83a7d8c

Browse files
author
Gonzalo Diaz
committed
[BUGFIX] Sonarcloud code smell: Use the "type" parameter syntax to declare this generic class.
Generic classes should be defined using the type parameter syntax python:S6792
1 parent 400a0c9 commit 83a7d8c

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/projecteuler/lib/binary_node.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@
44
T = TypeVar("T")
55

66

7+
# Recommended way to define Generics in python >= 3.12:
8+
# https://peps.python.org/pep-0695/
9+
# https://docs.python.org/3.12/whatsnew/3.12.html#pep-695-type-parameter-syntax
710
class BinaryNode(Generic[T]):
811
def __init__(
912
self,

0 commit comments

Comments
 (0)