Skip to content

Commit 9c500a1

Browse files
authored
Merge pull request #714 from Fortran-FOSS-Programmers/fix-314
Fix use of `get_type_hints`
2 parents d9daaca + 7ea5aa6 commit 9c500a1

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

.github/workflows/test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ jobs:
88
strategy:
99
fail-fast: false
1010
matrix:
11-
python-version: ["3.8", "3.9", "3.10", "3.11"]
11+
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13", "3.14"]
1212

1313
steps:
1414
- uses: actions/checkout@v3

ford/settings.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ class ProjectSettings:
213213
def __post_init__(self):
214214
self.relative = self.project_url == ""
215215

216-
field_types = get_type_hints(self)
216+
field_types = get_type_hints(ProjectSettings)
217217

218218
for key, value in asdict(self).items():
219219
default_type = field_types[key]
@@ -270,7 +270,7 @@ def normalise_paths(self, directory=None):
270270
if directory is None:
271271
directory = Path.cwd()
272272
self.directory = Path(directory).absolute()
273-
field_types = get_type_hints(self)
273+
field_types = get_type_hints(ProjectSettings)
274274

275275
if self.favicon == FAVICON_PATH:
276276
self.favicon = Path(__file__).parent / FAVICON_PATH

ford/sourceform.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -432,7 +432,9 @@ def markdown(self, md: MetaMarkdown):
432432
)
433433

434434
if self.meta.summary is not None:
435-
self.meta.summary = md.convert(" ".join(self.meta.summary.split()), context=self)
435+
self.meta.summary = md.convert(
436+
" ".join(self.meta.summary.split()), context=self
437+
)
436438
elif paragraph := PARA_CAPTURE_RE.search(self.doc):
437439
# If there is no stand-alone webpage for this item, e.g.
438440
# an internal routine, make the whole doc blob appear,

0 commit comments

Comments
 (0)