Skip to content

Commit 0335af0

Browse files
committed
Remove redundant type hints in docstrings
1 parent 8f2b590 commit 0335af0

File tree

4 files changed

+73
-84
lines changed

4 files changed

+73
-84
lines changed

geospatial_tools/raster.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,10 @@ def reproject_raster(
2121
2222
Parameters
2323
----------
24-
source_path
2524
dataset_path
26-
dataset_crs : Union[str, int]
25+
target_crs
2726
EPSG code in string or int format. Can be given in the following ways: 5070 | "5070" | "EPSG:5070"
27+
target_path
2828
logger
2929
3030
Returns

geospatial_tools/stac.py

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,12 @@
2323
PLANETARY_COMPUTER_API = "https://planetarycomputer.microsoft.com/api/stac/v1"
2424

2525

26-
def create_planetary_computer_catalog():
26+
def create_planetary_computer_catalog() -> pystac_client.Client:
2727
"""
2828
Creates a Planetary Computer Catalog Client.
2929
3030
Returns
3131
-------
32-
pystac_client.Client
3332
Planetary computer catalog client
3433
"""
3534
return pystac_client.Client.open(PLANETARY_COMPUTER_API, modifier=planetary_computer.sign_inplace)
@@ -218,26 +217,25 @@ def stac_api_search_for_date_ranges(
218217
219218
Parameters
220219
----------
221-
date_ranges : list[datetime.datetime]
220+
date_ranges
222221
_description_
223-
max_items : int, optional
222+
max_items
224223
_description_, by default None
225-
limit : int, optional
224+
limit
226225
_description_, by default None
227-
collections : str, optional
226+
collections
228227
_description_, by default None
229-
bbox : types.BBoxLike, optional
228+
bbox
230229
_description_, by default None
231230
intersects : types.IntersectsLike | None, optional
232231
_description_, by default None
233-
query : dict, optional
232+
query
234233
_description_, by default None
235-
sortby : Union[list, dict], optional
234+
sortby
236235
_description_, by default None
237236
238237
Returns
239238
-------
240-
list
241239
_description_
242240
"""
243241
results = []

geospatial_tools/utils.py

Lines changed: 11 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,11 @@ def create_logger(logger_name: str) -> logging.Logger:
2323
2424
Parameters
2525
----------
26-
logger_name : str
26+
logger_name
2727
Name of logger
2828
2929
Returns
3030
-------
31-
logging.Logger
3231
Created logger object
3332
"""
3433
logger = logging.getLogger(logger_name)
@@ -46,7 +45,7 @@ def create_logger(logger_name: str) -> logging.Logger:
4645
LOGGER = create_logger(__name__)
4746

4847

49-
def get_yaml_config(yaml_config_file: str, logger=LOGGER) -> dict:
48+
def get_yaml_config(yaml_config_file: str, logger: logging.Logger = LOGGER) -> dict:
5049
"""
5150
This function takes in the path, or name of the file if it can be found in the config/ folder, with of without the
5251
extension, and returns the values of the file in a dictionary format.
@@ -56,10 +55,10 @@ def get_yaml_config(yaml_config_file: str, logger=LOGGER) -> dict:
5655
5756
Parameters
5857
----------
59-
yaml_config_file : str
58+
yaml_config_file
6059
Path to yaml config file. If config file is in the config folder,
6160
you can use the file's name without the extension.
62-
logger : _type_, optional
61+
logger
6362
Logger to handle messaging, by default LOGGER
6463
6564
Returns
@@ -106,14 +105,13 @@ def get_json_config(json_config_file: str, logger=LOGGER) -> dict:
106105
107106
Parameters
108107
----------
109-
json_config_file : str
108+
json_config_file
110109
Path to JSON config file. If config file is in the config folder,
111-
logger : _type_, optional
110+
logger
112111
Logger to handle messaging, by default LOGGER
113112
114113
Returns
115114
-------
116-
dict
117115
Dictionary of JSON configuration values
118116
"""
119117

@@ -148,14 +146,13 @@ def create_crs(dataset_crs: Union[str, int], logger=LOGGER):
148146
149147
Parameters
150148
----------
151-
dataset_crs : Union[str, int]
149+
dataset_crs
152150
EPSG code in string or int format. Can be given in the following ways: 5070 | "5070" | "EPSG:5070"
153151
logger:
154152
Logger instance
155153
156154
Returns
157155
-------
158-
target_crs : str
159156
EPSG code in string format : EPSG:<numerical_code>
160157
161158
"""
@@ -204,18 +201,17 @@ def create_date_range_for_specific_period(
204201
205202
Parameters
206203
----------
207-
start_year : int
204+
start_year
208205
Start year for ranges
209-
end_year : int
206+
end_year
210207
End year for ranges
211-
start_month_range : int
208+
start_month_range
212209
Starting month for each period
213-
end_month_range : int
210+
end_month_range
214211
End month for each period (inclusively)
215212
216213
Returns
217214
-------
218-
list[datatime.datetime]
219215
Dictionary containing datatime data ranges
220216
"""
221217
date_ranges = []

0 commit comments

Comments
 (0)