Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions dash/_callback_context.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,7 @@ def outputs_list(self):
warnings.warn(
"outputs_list is deprecated, use outputs_grouping instead",
DeprecationWarning,
stacklevel=2,
)

return getattr(_get_context_value(), "outputs_list", [])
Expand All @@ -188,6 +189,7 @@ def inputs_list(self):
warnings.warn(
"inputs_list is deprecated, use args_grouping instead",
DeprecationWarning,
stacklevel=2,
)

return getattr(_get_context_value(), "inputs_list", [])
Expand All @@ -199,6 +201,7 @@ def states_list(self):
warnings.warn(
"states_list is deprecated, use args_grouping instead",
DeprecationWarning,
stacklevel=2,
)
return getattr(_get_context_value(), "states_list", [])

Expand Down
3 changes: 2 additions & 1 deletion dash/dash.py
Original file line number Diff line number Diff line change
Expand Up @@ -643,7 +643,8 @@ def __init__( # pylint: disable=too-many-statements
if self.__class__.__name__ == "JupyterDash":
warnings.warn(
"JupyterDash is deprecated, use Dash instead.\n"
"See https://dash.plotly.com/dash-in-jupyter for more details."
"See https://dash.plotly.com/dash-in-jupyter for more details.",
stacklevel=2,
)
self.setup_startup_routes()

Expand Down
3 changes: 2 additions & 1 deletion dash/development/_jl_components_generation.py
Original file line number Diff line number Diff line change
Expand Up @@ -468,7 +468,8 @@ def generate_class_string(name, props, description, project_shortname, prefix):
(
'WARNING: prop "{}" in component "{}" is a Julia keyword'
" - REMOVED FROM THE JULIA COMPONENT"
).format(item, name)
).format(item, name),
stacklevel=2,
)

default_paramtext += ", ".join(":{}".format(p) for p in prop_keys)
Expand Down
3 changes: 2 additions & 1 deletion dash/development/_r_components_generation.py
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,8 @@ def generate_class_string(name, props, project_shortname, prefix):
(
'WARNING: prop "{}" in component "{}" is an R keyword'
" - REMOVED FROM THE R COMPONENT"
).format(item, name)
).format(item, name),
stacklevel=2,
)

default_argtext += ", ".join("{}=NULL".format(p) for p in prop_keys)
Expand Down
2 changes: 1 addition & 1 deletion dash/development/base_component.py
Original file line number Diff line number Diff line change
Expand Up @@ -451,7 +451,7 @@ def _validate_deprecation(self):
_ns = getattr(self, "_namespace", "")
deprecation_message = _deprecated_components.get(_ns, {}).get(_type)
if deprecation_message:
warnings.warn(DeprecationWarning(textwrap.dedent(deprecation_message)))
warnings.warn(DeprecationWarning(textwrap.dedent(deprecation_message)), stacklevel=2)


ComponentSingleType = typing.Union[str, int, float, Component, None]
Expand Down
3 changes: 2 additions & 1 deletion dash/resources.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,8 @@ def _filter_resources(
"or `app.css.append_css`, use `external_scripts` "
"or `external_stylesheets` instead.\n"
"See https://dash.plotly.com/external-resources"
)
),
stacklevel=2,
)
continue
else:
Expand Down
2 changes: 1 addition & 1 deletion dash/testing/browser.py
Original file line number Diff line number Diff line change
Expand Up @@ -624,7 +624,7 @@ def get_logs(self):
for entry in self.driver.get_log("browser")
if entry["timestamp"] > self._last_ts
]
warnings.warn("get_logs always return None with webdrivers other than Chrome")
warnings.warn("get_logs always return None with webdrivers other than Chrome", stacklevel=2)
return None

def reset_log_timestamp(self):
Expand Down