Skip to content

Commit 4cc91bf

Browse files
committed
Enable SIM rules
1 parent 1c1797a commit 4cc91bf

File tree

2 files changed

+2
-5
lines changed

2 files changed

+2
-5
lines changed

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ select = [
6565
# Quality and style
6666
"B", # flake8-bugbear
6767
"Q", # flake8-quotes
68-
# "SIM", # flake8-simplify
68+
"SIM", # flake8-simplify
6969
"FLY", # flynt
7070
# "PERF", # Perflint
7171

src/streetview/search.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -60,10 +60,7 @@ def extract_panoramas(text: str) -> list[Panorama]:
6060

6161
raw_panos = subset[3][0]
6262

63-
if len(subset) < 9 or subset[8] is None:
64-
raw_dates = []
65-
else:
66-
raw_dates = subset[8]
63+
raw_dates = [] if (len(subset) < 9 or subset[8] is None) else subset[8]
6764

6865
# For some reason, dates do not include a date for each panorama.
6966
# the n dates match the last n panos. Here we flip the arrays

0 commit comments

Comments
 (0)