Repository: PlasmaPy/PlasmaPy

Issue:
Fix linkcheck GitHub Action along with minor updates to workflows
#2490 ended up disabling the workflow dispatch option for doing a linkcheck.  This PR reverts some of #2490 so that the linkcheck workflow does not attempt to run in PRs, and instead adds a workflow step for CI that does the linkcheck.

I also took a moment to make the formatting of workflow files a bit more consistent, as well as some other minor updates.  


Discussion:
## [Codecov](https://app.codecov.io/gh/PlasmaPy/PlasmaPy/pull/2492?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=PlasmaPy) Report
All modified and coverable lines are covered by tests :white_check_mark:
> Comparison is base [(`c6497f2`)](https://app.codecov.io/gh/PlasmaPy/PlasmaPy/commit/c6497f2d07b7694a4743d5ef3514eae4549ebc18?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=PlasmaPy) 97.37% compared to head [(`9e720dc`)](https://app.codecov.io/gh/PlasmaPy/PlasmaPy/pull/2492?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=PlasmaPy) 97.37%.
> Report is 9 commits behind head on main.


<details><summary>Additional details and impacted files</summary>


```diff
@@            Coverage Diff             @@
##             main    #2492      +/-   ##
==========================================
- Coverage   97.37%   97.37%   -0.01%     
==========================================
  Files         104      104              
  Lines        9401     9400       -1     
==========================================
- Hits         9154     9153       -1     
  Misses        247      247              
```



</details>

[:umbrella: View full report in Codecov by Sentry](https://app.codecov.io/gh/PlasmaPy/PlasmaPy/pull/2492?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=PlasmaPy).   
:loudspeaker: Have feedback on the report? [Share it here](https://about.codecov.io/codecov-pr-comment-feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=PlasmaPy).

Merging this so I can test that it works.

Resolving patch:
diff --git a/src/plasmapy/utils/decorators/validators.py b/src/plasmapy/utils/decorators/validators.py
--- a/src/plasmapy/utils/decorators/validators.py
+++ b/src/plasmapy/utils/decorators/validators.py
@@ -177,7 +177,7 @@ def __call__(self, f):
             wrapped function of ``f``
         """
         self.f = f
-        wrapped_sign = inspect.signature(f)
+        wrapped_sign = inspect.signature(f, eval_str=True)
 
         @preserve_signature
         @functools.wraps(f)


Test patch:
diff --git a/tests/utils/decorators/test_validate_quantities_annotations.py b/tests/utils/decorators/test_validate_quantities_annotations.py
new file mode 100644
--- /dev/null
+++ b/tests/utils/decorators/test_validate_quantities_annotations.py
@@ -0,0 +1,17 @@
+"""Test that @validate_quantities works with postponed evaluation of annotations."""
+
+from __future__ import annotations
+
+import astropy.units as u
+
+from plasmapy.utils.decorators.validators import validate_quantities
+
+
+@validate_quantities  # type: ignore[misc]
+def annotated_function(mass: u.Quantity[u.g]) -> u.Quantity[u.kg]:
+    return mass
+
+
+def test_validate_quantities_postponed_annotations() -> None:
+    result = annotated_function(1 * u.g)
+    assert result.unit == u.kg