@@ -19,14 +19,14 @@ def detect_encoding(source: str | Path | IO[str] | IO[bytes] | bytes) -> str:
1919 """Detect the character encoding of various input types.
2020
2121 Args:
22- source (str | Path | IO[str] | IO[bytes] | bytes) : The source to detect encoding from.
22+ source: The source to detect encoding from.
2323 - str or Path: File path.
2424 - IO[str]: Already decoded text stream (returns `DEFAULT_ENCODING`)
2525 - IO[bytes]: Binary stream to detect encoding from
2626 - bytes: Binary data to detect encoding from
2727
2828 Returns:
29- str: The detected encoding name (e.g., 'utf-8', 'iso-8859-1', 'ascii', etc.)
29+ The detected encoding name (e.g., 'utf-8', 'iso-8859-1', 'ascii', etc.)
3030
3131 Raises:
3232 TypeError: If the source type is unsupported
@@ -122,15 +122,15 @@ def open_text_data_source(
122122 """Opens or wraps a given source for reading AGS (text-based) data.
123123
124124 Args:
125- source (str | Path | IO[str] | IO[bytes] | bytes) : The source to read from.
125+ source: The source to read from.
126126 - str or Path: File path or direct string content.
127127 - IO[str]: A file-like text stream.
128128 - IO[bytes]: Byte stream
129129 - bytes: Binary content or stream (will be decoded).
130130 encoding (str | None): Encoding to use for decoding bytes. Default is None.
131131
132132 Returns:
133- ContextManager[TextIOBase]: A context manager yielding a text stream.
133+ A context manager yielding a text stream.
134134
135135 Raises:
136136 TypeError: If the source type is unsupported or binary streams are not decoded.
@@ -177,15 +177,14 @@ def coerce_string(string: str) -> None | bool | float | str:
177177 """Converts a string to an appropriate Python data type.
178178
179179 Args:
180- string (str) : The input string to be converted.
180+ string: The input string to be converted.
181181
182182 Returns:
183- None: If the string is 'none', 'null', or empty.
184- bool: If the string is 'true' or 'false' (case insensitive).
185- int: If the string can be converted to a float and has no decimal part.
186- float: If the string can be converted to a float with a decimal part.
187- str: If the string cannot be converted to any of the above types.
188-
183+ None if the string is 'none', 'null', or empty.
184+ bool if the string is 'true' or 'false' (case insensitive).
185+ int if the string can be converted to a float and has no decimal part.
186+ float if the string can be converted to a float with a decimal part.
187+ str if the string cannot be converted to any of the above types.
189188 """
190189 if string .lower () in {"none" , "null" , "" }:
191190 return None
@@ -210,12 +209,11 @@ def brgi_db_to_dfs(
210209 """Converts a Bedrock GI (geospatial) database to a dictionary of DataFrames.
211210
212211 Args:
213- brgi_db (BedrockGIDatabase | BedrockGIGeospatialDatabase) : The Bedrock GI (geospatial) database.
212+ brgi_db: The Bedrock GI (geospatial) database.
214213
215214 Returns:
216- dict[str, pd.DataFrame | gpd.GeoDataFrame]: A dictionary where the keys are
217- the Bedrock GI table names and the values are the DataFrames that contain
218- the data for each table.
215+ A dictionary where the keys are the Bedrock GI table names and the values are
216+ the DataFrames that contain the data for each table.
219217 """
220218 dict_of_dfs = {
221219 "Project" : brgi_db .Project ,
@@ -254,8 +252,7 @@ def convert_object_col_content_to_string(
254252 in_place: Whether to modify the DataFrame in-place (default) or return a new DataFrame.
255253
256254 Returns:
257- pd.DataFrame: The modified DataFrame with object dtypes converted to string dtypes.
258-
255+ The modified DataFrame with object dtypes converted to string dtypes.
259256 """
260257 if not in_place :
261258 df = df .copy ()
0 commit comments