diff --git a/python/taichi/lang/misc.py b/python/taichi/lang/misc.py index 365201637c3f5..0ff541f659e58 100644 --- a/python/taichi/lang/misc.py +++ b/python/taichi/lang/misc.py @@ -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( diff --git a/tests/python/test_deprecation.py b/tests/python/test_deprecation.py index 93555ee9fd3d0..2c56b02277670 100644 --- a/tests/python/test_deprecation.py +++ b/tests/python/test_deprecation.py @@ -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)