Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Nov 28, 2022
1 parent bfd2661 commit e37f044
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
11 changes: 7 additions & 4 deletions python/taichi/lang/misc.py
Original file line number Diff line number Diff line change
Expand Up @@ -358,11 +358,14 @@ def init(arch=None,

if "packed" in kwargs:
if kwargs["packed"] is True:
warnings.warn("Currently packed=True is the default setting and the switch will be removed in v1.4.0.",
DeprecationWarning)
warnings.warn(
"Currently packed=True is the default setting and the switch will be removed in v1.4.0.",
DeprecationWarning)
else:
warnings.warn("The automatic padding mode (packed=False) will no longer exist in v1.4.0. The switch will "
"also be removed then. Make sure your code doesn't rely on it.", DeprecationWarning)
warnings.warn(
"The automatic padding mode (packed=False) will no longer exist in v1.4.0. The switch will "
"also be removed then. Make sure your code doesn't rely on it.",
DeprecationWarning)

if "default_up" in kwargs:
raise KeyError(
Expand Down
3 changes: 1 addition & 2 deletions tests/python/test_deprecation.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,5 @@ def test_deprecated_packed_false():
DeprecationWarning,
match=
r"The automatic padding mode \(packed=False\) will no longer exist in v1.4.0. The switch will "
"also be removed then. Make sure your code doesn't rely on it."
):
"also be removed then. Make sure your code doesn't rely on it."):
ti.init(packed=False)

0 comments on commit e37f044

Please sign in to comment.