aboutsummaryrefslogtreecommitdiff
path: root/deb_patches/python3-remove-variable-annotations.patch
blob: 308a298ab1f2224c3310713ae8a7dafe679d0fc6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
Description: remove variable annotations that require Python 3.6 (https://docs.python.org/3/whatsnew/3.6.html#whatsnew36-pep526)
Author: Olivier Tilloy <olivier.tilloy@canonical.com>

--- a/xpcom/ds/tools/incremental_dafsa.py
+++ b/xpcom/ds/tools/incremental_dafsa.py
@@ -14,12 +14,6 @@ from typing import List, Dict, Optional,
 
 
 class Node:
-    children: Dict[str, "Node"]
-    parents: Dict[str, List["Node"]]
-    character: str
-    is_root_node: bool
-    is_end_node: bool
-
     def __init__(self, character, is_root_node=False, is_end_node=False):
         self.children = {}
         self.parents = {}
@@ -156,9 +150,6 @@ class Node:
 
 
 class SuffixCursor:
-    index: int  # Current position of the cursor within the DAFSA.
-    node: Node
-
     def __init__(self, index, node):
         self.index = index
         self.node = node
@@ -227,15 +218,6 @@ class DafsaAppendStateMachine:
     The next suffix node we'll attempt to find is at index "9".
     """
 
-    root_node: Node
-    prefix_index: int
-    suffix_cursor: SuffixCursor
-    stack: List[Node]
-    word: str
-    suffix_overlaps_prefix: bool
-    first_fork_index: Optional[int]
-    _state: Callable
-
     def __init__(self, word, root_node, end_node):
         self.root_node = root_node
         self.prefix_index = 0
@@ -471,9 +453,6 @@ def _duplicate_fork_nodes(stack, fork_in
 
 
 class Dafsa:
-    root_node: Node
-    end_node: Node
-
     def __init__(self):
         self.root_node = Node(None, is_root_node=True)
         self.end_node = Node(None, is_end_node=True)
bgstack15