Skip to content

Commit 08fbe07

Browse files
committed
[2018] Remove Python 2.7 support
1 parent b0b290f commit 08fbe07

File tree

25 files changed

+11
-66
lines changed

25 files changed

+11
-66
lines changed

2018/day01/day01.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@
44
https://adventofcode.com/2018/day/1
55
"""
66

7-
from __future__ import print_function
8-
97
from functools import reduce
108

119

2018/day02/day02.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@
44
https://adventofcode.com/2018/day/2
55
"""
66

7-
from __future__ import print_function
8-
97
from collections import Counter, defaultdict
108
from functools import reduce
119

2018/day03/day03.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@
44
https://adventofcode.com/2018/day/3
55
"""
66

7-
from __future__ import print_function
8-
97
import re
108
from collections import defaultdict
119
from functools import reduce

2018/day04/day04.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@
44
https://adventofcode.com/2018/day/4
55
"""
66

7-
from __future__ import print_function
8-
97
import re
108
from collections import defaultdict
119

2018/day05/day05.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@
44
https://adventofcode.com/2018/day/5
55
"""
66

7-
from __future__ import print_function
8-
97
from string import ascii_lowercase
108

119

2018/day06/day06.py

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,9 @@
44
https://adventofcode.com/2018/day/6
55
"""
66

7-
from __future__ import print_function
8-
97
import sys
108
from functools import reduce
119

12-
_MIN_INT = -sys.maxsize - 1
13-
1410

1511
class Point:
1612
"""Represents a point in 2D space."""
@@ -37,10 +33,10 @@ class Rect:
3733
@staticmethod
3834
def bounding_box(points):
3935
"""Returns a rectangle which forms the boundary of all points"""
40-
min_x = sys.maxsize
41-
min_y = sys.maxsize
42-
max_x = _MIN_INT
43-
max_y = _MIN_INT
36+
min_x = float('inf')
37+
min_y = float('inf')
38+
max_x = float('-inf')
39+
max_y = float('-inf')
4440

4541
for point in points:
4642
min_x = min(min_x, point.coord_x)

2018/day07/day07.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@
44
https://adventofcode.com/2018/day/7
55
"""
66

7-
from __future__ import print_function
8-
97
import re
108
from collections import defaultdict
119

2018/day08/day08.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@
44
https://adventofcode.com/2018/day/8
55
"""
66

7-
from __future__ import print_function
8-
97

108
class TreeNode: # pylint: disable=too-few-public-methods
119
"""Represents a single node in the tree."""

2018/day09/day09.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@
44
https://adventofcode.com/2018/day/9
55
"""
66

7-
from __future__ import print_function
8-
97
import re
108
from collections import defaultdict
119

2018/day10/day10.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@
44
https://adventofcode.com/2018/day/10
55
"""
66

7-
from __future__ import print_function
8-
97
import re
108

119
_ENTRY_REGEX = re.compile(

0 commit comments

Comments
 (0)