TYP: Add type hints support for pygmt.datasets.load_sample_data#2859
Merged
TYP: Add type hints support for pygmt.datasets.load_sample_data#2859
Conversation
7 tasks
Comment on lines
+300
to
+314
| def load_sample_data( | ||
| name: Literal[ | ||
| "bathymetry", | ||
| "earth_relief_holes", | ||
| "fractures", | ||
| "hotspots", | ||
| "japan_quakes", | ||
| "mars_shape", | ||
| "maunaloa_co2", | ||
| "notre_dame_topography", | ||
| "ocean_ridge_points", | ||
| "rock_compositions", | ||
| "usgs_quakes", | ||
| ], | ||
| ): |
Member
There was a problem hiding this comment.
So far in line 313 (currently) or 324 (after this PR):
pygmt/pygmt/datasets/samples.py
Lines 311 to 315 in 09f2452
was not changed to
name
Analogous as done for data_source in PR #2849.
pygmt/pygmt/datasets/earth_relief.py
Lines 77 to 81 in 09f2452
Or was this intended because the list of available input names is a bit longer?
Member
Author
There was a problem hiding this comment.
Fixed in 10a7ce4. Now it looks like:
Yes, it's a little bit longer, but I feel it's still acceptable.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description of proposed changes
Address #2812.
Preview: https://pygmt-dev--2859.org.readthedocs.build/en/2859/api/generated/pygmt.datasets.load_sample_data.html#pygmt.datasets.load_sample_data
Reminders
make formatandmake checkto make sure the code follows the style guide.doc/api/index.rst.Slash Commands
You can write slash commands (
/command) in the first line of a comment to performspecific operations. Supported slash commands are:
/format: automatically format and lint the code/test-gmt-dev: run full tests on the latest GMT development version