Skip to content

Commit 7230a00

Browse files
committed
Better flags management
1 parent 5e7c43f commit 7230a00

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

utils/get_osm_data.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
The place is passed as a command line argument.
44
55
Example:
6-
python get_osm_data.py --place "Bologna, Emilia-Romagna, Italy" --exclude-residential True
6+
python get_osm_data.py --place "Bologna, Emilia-Romagna, Italy" --exclude-residential
77
88
The output files are:
99
- nodes.csv
@@ -219,14 +219,12 @@ def simplify_graph(graph_original: nx.DiGraph) -> nx.DiGraph:
219219
)
220220
parser.add_argument(
221221
"--exclude-motorway",
222-
required=False,
223-
default=False,
222+
action="store_true",
224223
help="Exclude motorways from the data",
225224
)
226225
parser.add_argument(
227226
"--exclude-residential",
228-
required=False,
229-
default=False,
227+
action="store_true",
230228
help="Exclude residential roads from the data",
231229
)
232230
parser = parser.parse_args()

0 commit comments

Comments
 (0)