Skip to content

Commit 52d4054

Browse files
committed
chore(lint): format files
1 parent 1cc9d10 commit 52d4054

File tree

5 files changed

+13
-10
lines changed

5 files changed

+13
-10
lines changed

datastructures/lists/is_sorted_how/__init__.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,7 @@ def is_sorted_and_how_2(arr):
1515
return (
1616
"yes, ascending"
1717
if is_sorted_with(arr, operator.le)
18-
else "yes, descending"
19-
if is_sorted_with(arr, operator.ge)
20-
else "no"
18+
else "yes, descending" if is_sorted_with(arr, operator.ge) else "no"
2119
)
2220

2321

machine_learning/soccer_predictions/features.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,9 @@
7878
ON cur.matchid = opp.matchid
7979
WHERE cur.teamid != opp.teamid
8080
ORDER BY cur.matchid, cur.teamid
81-
""" % {"team_game_summary": match_stats.team_game_summary_query()}
81+
""" % {
82+
"team_game_summary": match_stats.team_game_summary_query()
83+
}
8284

8385

8486
def get_match_history(history_size):
@@ -284,7 +286,9 @@ def get_wc_history_query(history_size):
284286
return """
285287
SELECT * FROM (%(history_query)s) WHERE competitionid = 4
286288
ORDER BY timestamp DESC, matchid, is_home
287-
""" % {"history_query": get_history_query(history_size)}
289+
""" % {
290+
"history_query": get_history_query(history_size)
291+
}
288292

289293

290294
def get_wc_features(history_size):

machine_learning/soccer_predictions/match_stats.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,9 @@
6565
WHERE dist < 40)
6666
GROUP BY matchid, teamid
6767
ORDER BY matchid, teamid
68-
""" % {"touch_table": _TOUCH_TABLE}
68+
""" % {
69+
"touch_table": _TOUCH_TABLE
70+
}
6971

7072
# Subquery to compute raw number of goals scored. Does not take
7173
# into account own-goals (i.e. if a player scores an own-goal against

puzzles/poker/__init__.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,7 @@ def hand_rank(hand):
4848
else (
4949
2
5050
if counts == (2, 2, 1)
51-
else 1
52-
if counts == (2, 1, 1, 1)
53-
else 0
51+
else 1 if counts == (2, 1, 1, 1) else 0
5452
)
5553
)
5654
)

utils/file_system/__init__.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,8 @@ def obtain_dir_basenames(self):
4141
:return: dict with the key as the directory name and value as the base name
4242
"""
4343
return {
44-
"Dir: " + os.path.dirname(self.make_absolute_path()): "Base"
44+
"Dir: "
45+
+ os.path.dirname(self.make_absolute_path()): "Base"
4546
+ os.path.basename(self.make_absolute_path())
4647
}
4748

0 commit comments

Comments
 (0)