diff --git a/environments/make-env-files.py b/environments/make-env-files.py index 440ac43f..65f84f7b 100644 --- a/environments/make-env-files.py +++ b/environments/make-env-files.py @@ -68,10 +68,6 @@ def make_file(env: dict[str, Any]) -> None: ---------- env An environment configuration dictionary. - - Returns - ------- - None """ depends_on = [] output_path = Path(env["output_path"]) diff --git a/osmnx/_http.py b/osmnx/_http.py index 18c320de..2ab749ba 100644 --- a/osmnx/_http.py +++ b/osmnx/_http.py @@ -50,10 +50,6 @@ def _save_to_cache( The JSON response from the server. ok A `requests.response.ok` value. - - Returns - ------- - None """ if settings.use_cache: if not ok: # pragma: no cover @@ -251,10 +247,6 @@ def _config_dns(url: str) -> None: ---------- url The URL to consistently resolve the IP address of. - - Returns - ------- - None """ hostname = _hostname_from_url(url) try: diff --git a/osmnx/_osm_xml.py b/osmnx/_osm_xml.py index b64f0ad0..932adc22 100644 --- a/osmnx/_osm_xml.py +++ b/osmnx/_osm_xml.py @@ -202,10 +202,6 @@ def _save_graph_xml( attribute will be assigned the value of the first edge of the way. encoding The character encoding of the saved OSM XML file. - - Returns - ------- - None """ # default "oneway" value used to fill this tag where missing ONEWAY = False @@ -291,10 +287,6 @@ def _add_nodes_xml( The XML parent element. gdf_nodes A GeoDataFrame of graph nodes. - - Returns - ------- - None """ node_tags = set(settings.useful_tags_node) node_attrs = {"id", "lat", "lon"}.union(ATTR_DEFAULTS) @@ -336,10 +328,6 @@ def _add_ways_xml( aggregate graph edge attribute values into single OSM way values. If None, or if some tag's key does not exist in the dict, the way attribute will be assigned the value of the first edge of the way. - - Returns - ------- - None """ way_tags = set(settings.useful_tags_way) way_attrs = list({"id"}.union(ATTR_DEFAULTS)) diff --git a/osmnx/convert.py b/osmnx/convert.py index 234ce725..a70c9e73 100644 --- a/osmnx/convert.py +++ b/osmnx/convert.py @@ -223,10 +223,6 @@ def _validate_node_edge_gdfs( GeoDataFrame of graph nodes uniquely indexed by `osmid`. gdf_edges GeoDataFrame of graph edges uniquely multi-indexed by `(u, v, key)`. - - Returns - ------- - None """ # ensure gdf_nodes contains x and y columns representing node geometries if not ("x" in gdf_nodes.columns and "y" in gdf_nodes.columns): # pragma: no cover @@ -505,6 +501,7 @@ def _is_same_geometry(ls1: LineString, ls2: LineString) -> bool: Returns ------- is_same + True if geometries are the same in either direction, otherwise False. """ # extract coordinates from each LineString geometry geom1 = [tuple(coords) for coords in ls1.xy] diff --git a/osmnx/graph.py b/osmnx/graph.py index 124f5ad5..3f1ec6e6 100644 --- a/osmnx/graph.py +++ b/osmnx/graph.py @@ -823,10 +823,6 @@ def _add_paths( Iterable of paths' `tag:value` attribute data dicts. bidirectional If True, create bidirectional edges for one-way streets. - - Returns - ------- - None """ # the values OSM uses in its 'oneway' tag to denote True, and to denote # travel can only occur in the opposite direction of the node order. see: diff --git a/osmnx/io.py b/osmnx/io.py index e169de58..d0201a58 100644 --- a/osmnx/io.py +++ b/osmnx/io.py @@ -46,10 +46,6 @@ def save_graph_geopackage( True, save one edge for each directed edge in the graph. encoding The character encoding of the saved GeoPackage file. - - Returns - ------- - None """ # default filepath if none was provided filepath = Path(settings.data_folder) / "graph.gpkg" if filepath is None else Path(filepath) @@ -95,10 +91,6 @@ def save_graphml( interpretation of the GraphML specification. encoding The character encoding of the saved GraphML file. - - Returns - ------- - None """ # default filepath if none was provided filepath = Path(settings.data_folder) / "graph.graphml" if filepath is None else Path(filepath) @@ -292,10 +284,6 @@ def save_graph_xml( attribute will be assigned the value of the first edge of the way. encoding The character encoding of the saved OSM XML file. - - Returns - ------- - None """ _osm_xml._save_graph_xml(G, filepath, way_tag_aggs, encoding) diff --git a/osmnx/plot.py b/osmnx/plot.py index fdc92ed9..6839b50a 100644 --- a/osmnx/plot.py +++ b/osmnx/plot.py @@ -1061,13 +1061,7 @@ def _get_fig_ax( def _verify_mpl() -> None: - """ - Verify that matplotlib is installed and imported. - - Returns - ------- - None - """ + """Verify that matplotlib is installed and imported.""" if not mpl_available: # pragma: no cover msg = "matplotlib must be installed as an optional dependency for visualization." raise ImportError(msg) diff --git a/osmnx/routing.py b/osmnx/routing.py index 68ae581d..bf3ec768 100644 --- a/osmnx/routing.py +++ b/osmnx/routing.py @@ -465,10 +465,6 @@ def _verify_edge_attribute(G: nx.MultiDiGraph, attr: str) -> None: Input graph. attr Name of the edge attribute to verify. - - Returns - ------- - None """ try: values_float = (np.array(tuple(G.edges(data=attr)))[:, 2]).astype(float) diff --git a/osmnx/utils.py b/osmnx/utils.py index 4d7dfa4f..19d938ec 100644 --- a/osmnx/utils.py +++ b/osmnx/utils.py @@ -25,10 +25,6 @@ def citation(style: str = "bibtex") -> None: style {"apa", "bibtex", "ieee"} The citation format, either APA or BibTeX or IEEE. - - Returns - ------- - None """ if style == "apa": msg = ( @@ -116,10 +112,6 @@ def log( filename The name of the log file, without file extension. If None, set to `settings.log_filename` value. - - Returns - ------- - None """ if level is None: level = settings.log_level diff --git a/pyproject.toml b/pyproject.toml index 909c7905..f51adbe9 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -70,7 +70,7 @@ warn_no_return = true warn_unreachable = true [tool.numpydoc_validation] -checks = ["all", "ES01", "EX01", "GL08", "PR04", "RT03", "SA01"] +checks = ["all", "ES01", "EX01", "GL08", "PR04", "SA01"] [tool.ruff] cache-dir = "~/.cache/pre-commit/ruff"