Skip to content

Commit

Permalink
Enable ruff's flake8-future-annotations (FA) rules (#2855)
Browse files Browse the repository at this point in the history
* Enable ruff's flake8-future-annotations (FA) rules
* Fix FA100 error
* Fix UP007 error
  • Loading branch information
seisman authored Dec 10, 2023
1 parent 1e48282 commit 09f2452
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
6 changes: 4 additions & 2 deletions pygmt/datasets/load_remote_dataset.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
"""
Internal function to load GMT remote datasets.
"""
from typing import NamedTuple, Union
from __future__ import annotations

from typing import NamedTuple

from pygmt.exceptions import GMTInvalidInput
from pygmt.helpers import kwargs_to_strings
Expand Down Expand Up @@ -58,7 +60,7 @@ class GMTRemoteDataset(NamedTuple):
title: str
name: str
long_name: str
units: Union[str, None]
units: str | None
resolutions: dict[str, Resolution]
extra_attributes: dict

Expand Down
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ select = [
"B", # flake8-bugbear
"E", # pycodestyle
"F", # pyflakes
"FA", # flake8-future-annotations
"FLY", # flynt
"I", # isort
"ISC", # flake8-implicit-str-concat
Expand Down

0 comments on commit 09f2452

Please sign in to comment.