Skip to content

Commit

Permalink
added deprecation warning for inflows (#141)
Browse files Browse the repository at this point in the history
  • Loading branch information
AboudyKreidieh authored and eugenevinitsky committed Sep 13, 2018
1 parent 32fd868 commit 272e518
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions flow/core/params.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import logging
from flow.utils.flow_warnings import deprecation_warning
import warnings


class SumoParams:
Expand Down Expand Up @@ -166,6 +167,7 @@ class NetParams:
def __init__(self,
no_internal_links=True,
inflows=None,
in_flows=None,
osm_path=None,
netfile=None,
additional_params=None):
Expand Down Expand Up @@ -200,6 +202,14 @@ def __init__(self,
self.osm_path = osm_path
self.netfile = netfile
self.additional_params = additional_params or {}
if in_flows is not None:
warnings.simplefilter("always", PendingDeprecationWarning)
warnings.warn(
"in_flows will be deprecated in a future release, use "
"inflows instead.",
PendingDeprecationWarning
)
self.inflows = in_flows


class InitialConfig:
Expand Down

0 comments on commit 272e518

Please sign in to comment.