treewide: fix 'ruff check' errors
This is mostly about unused imports. A couple errors remain, but are fine in my book (using `l` as a variable name, assigning a lambda to a variable).
This commit is contained in:
parent
8618c81b2f
commit
f9fc9fbd6b
|
@ -2,7 +2,7 @@
|
|||
|
||||
import sys
|
||||
from fractions import Fraction
|
||||
from typing import Dict, List, NamedTuple, Optional
|
||||
from typing import List, NamedTuple, Optional
|
||||
|
||||
|
||||
class Point(NamedTuple):
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
#!/usr/bin/env python
|
||||
|
||||
import sys
|
||||
from copy import deepcopy
|
||||
from enum import IntEnum
|
||||
from typing import List, NamedTuple
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@ import sys
|
|||
from copy import deepcopy
|
||||
from dataclasses import dataclass, field
|
||||
from enum import IntEnum
|
||||
from typing import Callable, List, NamedTuple
|
||||
from typing import List, NamedTuple
|
||||
|
||||
|
||||
class ParameterMode(IntEnum):
|
||||
|
|
|
@ -1,11 +1,10 @@
|
|||
#!/usr/bin/env python
|
||||
|
||||
import itertools
|
||||
import sys
|
||||
from copy import deepcopy
|
||||
from dataclasses import dataclass, field
|
||||
from enum import IntEnum
|
||||
from typing import Callable, List, NamedTuple
|
||||
from typing import List, NamedTuple
|
||||
|
||||
|
||||
class ParameterMode(IntEnum):
|
||||
|
|
|
@ -1,11 +1,10 @@
|
|||
#!/usr/bin/env python
|
||||
|
||||
import itertools
|
||||
import sys
|
||||
from copy import deepcopy
|
||||
from dataclasses import dataclass, field
|
||||
from enum import IntEnum
|
||||
from typing import Callable, List, NamedTuple
|
||||
from typing import List, NamedTuple
|
||||
|
||||
|
||||
class ParameterMode(IntEnum):
|
||||
|
|
|
@ -4,7 +4,6 @@ import sys
|
|||
from cmath import phase
|
||||
from itertools import groupby
|
||||
from math import gcd, pi
|
||||
from pprint import pprint
|
||||
from typing import NamedTuple, Set, Tuple
|
||||
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
import sys
|
||||
from dataclasses import dataclass, field
|
||||
from enum import IntEnum
|
||||
from typing import Dict, Iterable, List, NamedTuple, Tuple, TypeVar
|
||||
from typing import Iterable, List, NamedTuple, Tuple, TypeVar
|
||||
|
||||
|
||||
class ParameterMode(IntEnum):
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
import sys
|
||||
from dataclasses import dataclass, field
|
||||
from enum import IntEnum
|
||||
from typing import Dict, Iterable, List, NamedTuple, Tuple, TypeVar
|
||||
from typing import Iterable, List, NamedTuple, Tuple, TypeVar
|
||||
|
||||
|
||||
class ParameterMode(IntEnum):
|
||||
|
|
|
@ -2,8 +2,6 @@
|
|||
|
||||
import sys
|
||||
from functools import reduce
|
||||
from itertools import chain, cycle
|
||||
from typing import Iterable, List
|
||||
|
||||
|
||||
def main() -> None:
|
||||
|
|
|
@ -4,7 +4,7 @@ import sys
|
|||
from copy import deepcopy
|
||||
from dataclasses import dataclass, field
|
||||
from enum import IntEnum
|
||||
from typing import Iterator, List, NamedTuple, Tuple
|
||||
from typing import List, NamedTuple
|
||||
|
||||
|
||||
class ParameterMode(IntEnum):
|
||||
|
|
|
@ -2,8 +2,6 @@
|
|||
|
||||
import re
|
||||
import sys
|
||||
from collections import defaultdict
|
||||
from copy import deepcopy
|
||||
from dataclasses import dataclass
|
||||
from typing import Dict, List, Set, Tuple
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#!/usr/bin/env python
|
||||
|
||||
import sys
|
||||
from typing import Callable, Dict, List
|
||||
from typing import List
|
||||
|
||||
"""
|
||||
E : T [ * T ]*
|
||||
|
|
|
@ -5,7 +5,6 @@ import itertools
|
|||
import math
|
||||
import sys
|
||||
from collections import defaultdict
|
||||
from copy import deepcopy
|
||||
from typing import Dict, Iterator, List, Set, Tuple
|
||||
|
||||
Tile = List[List[str]]
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
import itertools
|
||||
import sys
|
||||
from typing import List, Tuple
|
||||
from typing import List
|
||||
|
||||
|
||||
def solve(circle: List[int]) -> int:
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
import itertools
|
||||
import sys
|
||||
from typing import List, Tuple
|
||||
from typing import List
|
||||
|
||||
|
||||
def solve(circle: List[int]) -> int:
|
||||
|
|
|
@ -3,7 +3,6 @@
|
|||
import itertools
|
||||
import sys
|
||||
from collections import defaultdict
|
||||
from copy import deepcopy
|
||||
from typing import Dict, Iterator, List, Tuple
|
||||
|
||||
Offset = Tuple[int, int]
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
#!/usr/bin/env python
|
||||
|
||||
import itertools
|
||||
import sys
|
||||
from typing import List
|
||||
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
#!/usr/bin/env python
|
||||
|
||||
import itertools
|
||||
import sys
|
||||
from typing import List
|
||||
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
#!/usr/bin/env python
|
||||
|
||||
import itertools
|
||||
import sys
|
||||
from typing import List
|
||||
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
#!/usr/bin/env python
|
||||
|
||||
import itertools
|
||||
import sys
|
||||
from typing import List
|
||||
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
#!/usr/bin/env python
|
||||
|
||||
import itertools
|
||||
import sys
|
||||
from copy import deepcopy
|
||||
from typing import List
|
||||
|
|
|
@ -3,7 +3,6 @@
|
|||
import itertools
|
||||
import sys
|
||||
from collections import Counter
|
||||
from dataclasses import dataclass
|
||||
from typing import Iterator, List, TypeVar
|
||||
|
||||
T = TypeVar("T")
|
||||
|
|
|
@ -3,7 +3,6 @@
|
|||
import itertools
|
||||
import sys
|
||||
from collections import Counter
|
||||
from dataclasses import dataclass
|
||||
from typing import Iterator, List, TypeVar
|
||||
|
||||
T = TypeVar("T")
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
#!/usr/bin/env python
|
||||
|
||||
import itertools
|
||||
import sys
|
||||
from typing import List
|
||||
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
#!/usr/bin/env python
|
||||
|
||||
import itertools
|
||||
import sys
|
||||
from math import ceil, floor
|
||||
from typing import List
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
#!/usr/bin/env python
|
||||
|
||||
import itertools
|
||||
import sys
|
||||
from dataclasses import dataclass
|
||||
from typing import Dict, List, Set
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
#!/usr/bin/env python
|
||||
|
||||
import itertools
|
||||
import sys
|
||||
from typing import Iterator, List, Tuple
|
||||
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
#!/usr/bin/env python
|
||||
|
||||
import itertools
|
||||
import sys
|
||||
from typing import Iterator, List, Tuple
|
||||
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
#!/usr/bin/env python
|
||||
|
||||
import itertools
|
||||
import sys
|
||||
from typing import List, Optional, cast
|
||||
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
#!/usr/bin/env python
|
||||
|
||||
import itertools
|
||||
import sys
|
||||
from typing import Iterator, List, Optional
|
||||
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
|
||||
import itertools
|
||||
import sys
|
||||
from copy import deepcopy
|
||||
from typing import Iterator, List, Set, Tuple
|
||||
|
||||
Grid = List[List[int]]
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
|
||||
import itertools
|
||||
import sys
|
||||
from copy import deepcopy
|
||||
from typing import Iterator, List, Set, Tuple
|
||||
|
||||
Grid = List[List[int]]
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
#!/usr/bin/env python
|
||||
|
||||
import itertools
|
||||
import sys
|
||||
from collections import defaultdict
|
||||
from typing import Dict, List, Set
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
#!/usr/bin/env python
|
||||
|
||||
import itertools
|
||||
import sys
|
||||
from collections import defaultdict
|
||||
from typing import Dict, List, Set
|
||||
|
|
|
@ -1,9 +1,8 @@
|
|||
#!/usr/bin/env python
|
||||
|
||||
import heapq
|
||||
import itertools
|
||||
import sys
|
||||
from typing import Iterator, List, NamedTuple, Set, Tuple
|
||||
from typing import Iterator, List, NamedTuple, Set
|
||||
|
||||
|
||||
class Point(NamedTuple):
|
||||
|
|
|
@ -1,9 +1,8 @@
|
|||
#!/usr/bin/env python
|
||||
|
||||
import heapq
|
||||
import itertools
|
||||
import sys
|
||||
from typing import Iterator, List, NamedTuple, Set, Tuple
|
||||
from typing import Iterator, List, NamedTuple, Set
|
||||
|
||||
|
||||
class Point(NamedTuple):
|
||||
|
|
|
@ -5,7 +5,7 @@ import functools
|
|||
import itertools
|
||||
import sys
|
||||
from dataclasses import dataclass
|
||||
from typing import Iterable, Iterator, List, Tuple, TypeVar
|
||||
from typing import Iterable, Iterator, List, Tuple
|
||||
|
||||
RawPacket = List[bool]
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@ import itertools
|
|||
import math
|
||||
import sys
|
||||
from dataclasses import dataclass
|
||||
from typing import Callable, Dict, Iterable, Iterator, List, Tuple, TypeVar
|
||||
from typing import Callable, Dict, Iterable, Iterator, List, Tuple
|
||||
|
||||
RawPacket = List[bool]
|
||||
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
#!/usr/bin/env python
|
||||
|
||||
import itertools
|
||||
import math
|
||||
import sys
|
||||
from typing import Iterator, List, NamedTuple
|
||||
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
#!/usr/bin/env python
|
||||
|
||||
import itertools
|
||||
import math
|
||||
import sys
|
||||
from typing import Iterator, List, NamedTuple
|
||||
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
#!/usr/bin/env python
|
||||
|
||||
import functools
|
||||
import itertools
|
||||
import sys
|
||||
from copy import deepcopy
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
#!/usr/bin/env python
|
||||
|
||||
import functools
|
||||
import itertools
|
||||
import sys
|
||||
from dataclasses import dataclass
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
#!/usr/bin/env python
|
||||
|
||||
import functools
|
||||
import itertools
|
||||
import sys
|
||||
from dataclasses import dataclass
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
import functools
|
||||
import itertools
|
||||
import sys
|
||||
from typing import Iterator, List, NamedTuple, Optional, Set, Tuple, cast
|
||||
from typing import List, NamedTuple, Optional, Set, Tuple
|
||||
|
||||
|
||||
class Point(NamedTuple):
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
import functools
|
||||
import itertools
|
||||
import sys
|
||||
from typing import Iterator, List, NamedTuple, Optional, Set, Tuple, cast
|
||||
from typing import List, NamedTuple, Optional, Set, Tuple
|
||||
|
||||
|
||||
class Point(NamedTuple):
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
import enum
|
||||
import functools
|
||||
import sys
|
||||
from typing import Iterator, List, NamedTuple, Optional, Tuple, cast
|
||||
from typing import Iterator, List, NamedTuple, Optional, Tuple
|
||||
|
||||
|
||||
class Point(NamedTuple):
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
import enum
|
||||
import functools
|
||||
import sys
|
||||
from typing import Iterator, List, NamedTuple, Optional, Tuple, cast
|
||||
from typing import Iterator, List, NamedTuple, Optional, Tuple
|
||||
|
||||
|
||||
class Point(NamedTuple):
|
||||
|
|
|
@ -1,9 +1,8 @@
|
|||
#!/usr/bin/env python
|
||||
|
||||
import enum
|
||||
import itertools
|
||||
import sys
|
||||
from typing import Iterable, Iterator, List, NamedTuple, Set
|
||||
from typing import List, NamedTuple, Set
|
||||
|
||||
|
||||
class Point(NamedTuple):
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
|
||||
import itertools
|
||||
import sys
|
||||
from collections import deque
|
||||
from collections.abc import Iterator
|
||||
from typing import NamedTuple
|
||||
|
||||
|
|
|
@ -25,7 +25,7 @@ class Operator(str, enum.Enum):
|
|||
|
||||
class Monkey:
|
||||
def get_value(self, monkeys: dict[str, "Monkey"]) -> int:
|
||||
raise NotImplemented
|
||||
raise NotImplementedError
|
||||
|
||||
|
||||
@dataclasses.dataclass
|
||||
|
|
|
@ -93,7 +93,7 @@ class MathObserver:
|
|||
|
||||
class Monkey:
|
||||
def get_value(self, monkeys: dict[str, "Monkey"]) -> Num:
|
||||
raise NotImplemented
|
||||
raise NotImplementedError
|
||||
|
||||
|
||||
@dataclasses.dataclass
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
#!/usr/bin/env python
|
||||
|
||||
import functools
|
||||
import math
|
||||
import operator as op
|
||||
import sys
|
||||
from collections import Counter
|
||||
from enum import StrEnum
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
#!/usr/bin/env python
|
||||
|
||||
import dataclasses
|
||||
import itertools
|
||||
import sys
|
||||
from enum import StrEnum
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
|
||||
import functools
|
||||
import heapq
|
||||
import itertools
|
||||
import sys
|
||||
from collections.abc import Iterator
|
||||
from enum import Enum
|
||||
|
|
Loading…
Reference in a new issue