Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .git-blame-ignore-revs
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ bb473f6ff4a23e4fd5205eacdef713db15decadf
7cb7b365c51ab20d92745e5eefb95690e3ba2e14
67c4efab4e3ec1dc16c18b9ab8c5cd5f375040e0
8d00b416689c428b2bafdaad61ed3ec660ca06c2
d6b447cab8c40aa47dc675a0f4349ae254e8b3ce
6 changes: 3 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,16 +26,16 @@ repos:
args: [--prose-wrap=preserve]

- repo: https://github.com/MarcoGorelli/cython-lint
rev: 582556b052c898dc484a981bea48de3284a4b8ee # frozen: v0.16.0
rev: 9247866fce7128f2c0eaf4a09f437880397d4689 # frozen: v0.16.2
hooks:
- id: cython-lint
args: [--no-pycodestyle, --max-line-length=88]

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: c0bff48397a5119af3fadb07c507dd09ac9e2aa8 # frozen: v0.3.6
rev: f8a3f8c471fb698229face5ed7640a64900b781e # frozen: v0.4.4
hooks:
- id: ruff
args: [--fix, --exit-non-zero-on-fix]
args: ["--fix", "--show-fixes", "--exit-non-zero-on-fix"]
- id: ruff-format

- repo: https://github.com/codespell-project/codespell
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@
def super_fmt(value):
if value > 1:
if np.abs(int(value) - value) < 0.1:
out = "$10^{%.1i}$" % value
out = f"$10^{{{int(value):d}}}$"
else:
out = "$10^{%.1f}$" % value
out = f"$10^{{{value:.1f}}}$"
else:
value = np.exp(value - 0.01)
if value > 0.1:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
plt.plot(sorted_max_speeds, cprob, "o")
plt.plot(fitted_max_speeds, nprob, "g--")
plt.plot([fifty_wind], [fifty_prob], "o", ms=8.0, mfc="y", mec="y")
plt.text(30, 0.05, r"$V_{50} = %.2f \, m/s$" % fifty_wind)
plt.text(30, 0.05, rf"$V_{{50}} = {fifty_wind:.2f} \, m/s$")
plt.plot([fifty_wind, fifty_wind], [plt.axis()[2], fifty_prob], "k--")
plt.xlabel("Annual wind speed maxima [$m/s$]")
plt.ylabel("Cumulative probability")
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ def gumbell_dist(arr):
plt.plot(fitted_max_speeds, nprob, "g--")
plt.plot([fifty_wind], [fifty_prob], "o", ms=8.0, mfc="y", mec="y")
plt.plot([fifty_wind, fifty_wind], [plt.axis()[2], fifty_prob], "k--")
plt.text(35, -1, r"$V_{50} = %.2f \, m/s$" % fifty_wind)
plt.text(35, -1, rf"$V_{{50}} = {fifty_wind:.2f} \, m/s$")
plt.xlabel("Annual wind speed maxima [$m/s$]")
plt.ylabel("Gumbell cumulative probability")
plt.show()