Skip to content

Commit

Permalink
Allow modern type hints for older Python
Browse files Browse the repository at this point in the history
  • Loading branch information
hugovk committed Feb 9, 2024
1 parent 2cc2364 commit 0e705cd
Show file tree
Hide file tree
Showing 10 changed files with 19 additions and 0 deletions.
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -61,4 +61,5 @@ version.source = "vcs"
local_scheme = "no-local-version"

[tool.isort]
add_imports = "from __future__ import annotations"
profile = "black"
2 changes: 2 additions & 0 deletions src/stravavis/__main__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
from __future__ import annotations

from . import cli

if __name__ == "__main__":
Expand Down
2 changes: 2 additions & 0 deletions src/stravavis/cli.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
from __future__ import annotations

import argparse
import glob
import os.path
Expand Down
2 changes: 2 additions & 0 deletions src/stravavis/plot_calendar.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
from __future__ import annotations

import calmap
import matplotlib.pyplot as plt
import pandas as pd
Expand Down
2 changes: 2 additions & 0 deletions src/stravavis/plot_dumbbell.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
from __future__ import annotations

import pandas as pd
from plotnine import (
aes,
Expand Down
2 changes: 2 additions & 0 deletions src/stravavis/plot_elevations.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
from __future__ import annotations

import math

import matplotlib.pyplot as plt
Expand Down
2 changes: 2 additions & 0 deletions src/stravavis/plot_facets.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
from __future__ import annotations

import math

import matplotlib.pyplot as plt
Expand Down
2 changes: 2 additions & 0 deletions src/stravavis/plot_landscape.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
from __future__ import annotations

import matplotlib.pyplot as plt
import pandas as pd
from rich.progress import track
Expand Down
2 changes: 2 additions & 0 deletions src/stravavis/plot_map.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
from __future__ import annotations

from math import log, pi, tan

import matplotlib.pyplot as plt
Expand Down
2 changes: 2 additions & 0 deletions src/stravavis/process_activities.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
from __future__ import annotations

import pandas as pd


Expand Down

0 comments on commit 0e705cd

Please sign in to comment.