Skip to content

Commit 20054a1

Browse files
authored
Enable ruff's flake8-comprehensions (C4) rules (#2887)
1 parent 53a9272 commit 20054a1

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

examples/gallery/seismology/meca.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929

3030
# Store focal mechanism parameters in a dictionary based on the Aki & Richards
3131
# convention
32-
focal_mechanism = dict(strike=330, dip=30, rake=90, magnitude=3)
32+
focal_mechanism = {"strike": 330, "dip": 30, "rake": 90, "magnitude": 3}
3333

3434
# Pass the focal mechanism data through the spec parameter. In addition provide
3535
# scale, event location, and event depth

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,7 @@ select = [
102102
"A", # flake8-builtins
103103
"B", # flake8-bugbear
104104
"BLE", # flake8-blind-except
105+
"C4", # flake8-comprehensions
105106
"E", # pycodestyle
106107
"F", # pyflakes
107108
"FA", # flake8-future-annotations

0 commit comments

Comments
 (0)