Skip to content

Commit

Permalink
build_common.py -> add appropriate stacklevel for warning
Browse files Browse the repository at this point in the history
  • Loading branch information
jdegenstein authored Aug 29, 2024
1 parent 07c7f4e commit f071915
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/build123d/build_common.py
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@ def __exit__(self, exception_type, exception_value, traceback):
"Transferring object(s) to %s", type(self.builder_parent).__name__
)
if self._obj is None and not sys.exc_info()[1]:
warnings.warn(f"{self._obj_name} is None - {self._tag} didn't create anything")
warnings.warn(f"{self._obj_name} is None - {self._tag} didn't create anything", stacklevel=2)
self.builder_parent._add_to_context(self._obj, mode=self.mode)

self.exit_workplanes = WorkplaneList._get_context().workplanes
Expand Down

0 comments on commit f071915

Please sign in to comment.