Skip to content

Commit

Permalink
python style - #21
Browse files Browse the repository at this point in the history
  • Loading branch information
angelobanse committed Nov 28, 2023
1 parent 8d09d53 commit 083742d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
7 changes: 4 additions & 3 deletions tools/output/vehroute2amitranOD.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
import sumolib # noqa
from sumolib.options import ArgumentParser # noqa


def convert(vehRoutes, routeOut, odOut, interval):
routeDict = {}
actorConfig = defaultdict(list) # map type -> list of time slices
Expand Down Expand Up @@ -87,10 +88,10 @@ def convert(vehRoutes, routeOut, odOut, interval):
if __name__ == "__main__":
argParser = ArgumentParser()
argParser.add_argument("-r", "--routes", default='routes.xml', category="input",
help="name of the amitran route file output [default: %(default)s]")
help="name of the amitran route file output [default: %(default)s]")
argParser.add_argument("-o", "--od-file", default='od.xml', category="output",
help="name of the amitran O/D file output [default: %(default)s]")
help="name of the amitran O/D file output [default: %(default)s]")
argParser.add_argument("-i", "--interval", default=3600, type=int,
help="aggregation interval in seconds [default: %(default)s]")
help="aggregation interval in seconds [default: %(default)s]")
(options, args) = argParser.parse_args()
convert(args[0], options.routes, options.od_file, options.interval)
2 changes: 2 additions & 0 deletions tools/traci/exceptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ def alias_param(param, alias, deprecate=True):
subst = [(param, alias)]
else:
subst = list(zip(param, alias))


def decorator(func):
@functools.wraps(func)
def wrapper(*args, **kwargs):
Expand Down

0 comments on commit 083742d

Please sign in to comment.