Skip to content

Commit 2518983

Browse files
committed
more small docstring formatting tweaks
1 parent ca50801 commit 2518983

File tree

3 files changed

+9
-8
lines changed

3 files changed

+9
-8
lines changed

src/bedrock_ge/gi/concatenate.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ def concatenate_databases(
2020
db2 (Dict[str, pd.DataFrame]): A dictionary of pandas DataFrames, i.e. a database.
2121
2222
Returns:
23-
dict: A dictionary of concatenated pandas DataFrames.
23+
concatenated_dict (Dict[str, pd.DataFrame]): A dictionary of concatenated pandas DataFrames.
2424
"""
2525
# Create a new dict to store the concatenated dataframes
2626
concatenated_dict = {key: df.dropna(axis=1, how="all") for key, df in db1.items()}

src/bedrock_ge/gi/gis_geometry.py

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ def calculate_location_gis_geometry(
156156

157157
def calculate_wgs84_coordinates(
158158
from_crs: CRS, easting: float, northing: float, elevation: Union[float, None] = None
159-
) -> Tuple:
159+
) -> tuple[float, float, (float | None)]:
160160
"""Transforms coordinates from an arbitrary Coordinate Reference System (CRS) to the WGS84 CRS, which is the standard for geodetic coordinates.
161161
162162
Args:
@@ -167,9 +167,10 @@ def calculate_wgs84_coordinates(
167167
transform. Defaults to None.
168168
169169
Returns:
170-
tuple: A tuple containing the longitude, latitude and WGS84 height of the
171-
transformed point, in that order. The height is None if no elevation was
172-
given, or if the provided CRS doesn't have a proper datum defined.
170+
tuple[float, float, (float | None)]: A tuple containing the longitude, latitude
171+
and WGS84 height of the transformed point, in that order.
172+
The height is None if no elevation was given, or if the provided CRS doesn't
173+
have a proper datum defined.
173174
"""
174175
transformer = Transformer.from_crs(from_crs, 4326, always_xy=True)
175176
if elevation:
@@ -178,7 +179,7 @@ def calculate_wgs84_coordinates(
178179
lon, lat = transformer.transform(easting, northing)
179180
wgs84_height = None
180181

181-
return lon, lat, wgs84_height
182+
return (lon, lat, wgs84_height)
182183

183184

184185
def create_lon_lat_height_table(
@@ -198,7 +199,7 @@ def create_lon_lat_height_table(
198199
crs (CRS): The Coordinate Reference System of the GI locations.
199200
200201
Returns:
201-
GeoDataFrame: The 'LonLatHeight' GeoDataFrame.
202+
gpd.GeoDataFrame: The 'LonLatHeight' GeoDataFrame.
202203
"""
203204
lon_lat_height = gpd.GeoDataFrame(
204205
brgi_location[

src/bedrock_ge/gi/validate.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ def check_no_gis_brgi_database(
9797
and values are the corresponding data tables (DataFrame or GeoDataFrame).
9898
9999
Returns:
100-
is_valid (bool): True if all tables are valid and relationships are properly maintained.
100+
bool: True if all tables are valid and relationships are properly maintained.
101101
102102
Example:
103103
```python

0 commit comments

Comments
 (0)