Skip to content

Commit

Permalink
src/sage/monoids/string_monoid_element.py: Deprecate is_StringMonoidE…
Browse files Browse the repository at this point in the history
…lement etc.
  • Loading branch information
Matthias Koeppe committed Jun 26, 2024
1 parent ab24dac commit 3623227
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions src/sage/monoids/string_monoid_element.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,20 @@
def is_StringMonoidElement(x):
r"""
"""
from sage.misc.superseded import deprecation
deprecation(38280,

Check warning on line 36 in src/sage/monoids/string_monoid_element.py

View check run for this annotation

Codecov / codecov/patch

src/sage/monoids/string_monoid_element.py#L35-L36

Added lines #L35 - L36 were not covered by tests
"The function is_StringMonoidElement is deprecated; "
"use 'isinstance(..., StringMonoidElement)' instead.")
return isinstance(x, StringMonoidElement)


def is_AlphabeticStringMonoidElement(x):
r"""
"""
from sage.misc.superseded import deprecation
deprecation(38280,

Check warning on line 46 in src/sage/monoids/string_monoid_element.py

View check run for this annotation

Codecov / codecov/patch

src/sage/monoids/string_monoid_element.py#L45-L46

Added lines #L45 - L46 were not covered by tests
"The function is_AlphabeticStringMonoidElement is deprecated; "
"use 'isinstance(..., StringMonoidElement) and isinstance(x.parent(), AlphabeticStringMonoid)' instead.")
from .string_monoid import AlphabeticStringMonoid
return isinstance(x, StringMonoidElement) and \
isinstance(x.parent(), AlphabeticStringMonoid)
Expand All @@ -46,6 +54,10 @@ def is_AlphabeticStringMonoidElement(x):
def is_BinaryStringMonoidElement(x):
r"""
"""
from sage.misc.superseded import deprecation
deprecation(38280,

Check warning on line 58 in src/sage/monoids/string_monoid_element.py

View check run for this annotation

Codecov / codecov/patch

src/sage/monoids/string_monoid_element.py#L57-L58

Added lines #L57 - L58 were not covered by tests
"The function is_BinaryStringMonoidElement is deprecated; "
"use 'isinstance(..., StringMonoidElement) and isinstance(x.parent(), BinaryStringMonoid)' instead.")
from .string_monoid import BinaryStringMonoid
return isinstance(x, StringMonoidElement) and \
isinstance(x.parent(), BinaryStringMonoid)
Expand All @@ -54,6 +66,10 @@ def is_BinaryStringMonoidElement(x):
def is_OctalStringMonoidElement(x):
r"""
"""
from sage.misc.superseded import deprecation
deprecation(38280,

Check warning on line 70 in src/sage/monoids/string_monoid_element.py

View check run for this annotation

Codecov / codecov/patch

src/sage/monoids/string_monoid_element.py#L69-L70

Added lines #L69 - L70 were not covered by tests
"The function is_OctalStringMonoidElement is deprecated; "
"use 'isinstance(..., StringMonoidElement) and isinstance(x.parent(), OctalStringMonoid)' instead.")
from .string_monoid import OctalStringMonoid
return isinstance(x, StringMonoidElement) and \
isinstance(x.parent(), OctalStringMonoid)
Expand All @@ -62,6 +78,10 @@ def is_OctalStringMonoidElement(x):
def is_HexadecimalStringMonoidElement(x):
r"""
"""
from sage.misc.superseded import deprecation
deprecation(38280,

Check warning on line 82 in src/sage/monoids/string_monoid_element.py

View check run for this annotation

Codecov / codecov/patch

src/sage/monoids/string_monoid_element.py#L81-L82

Added lines #L81 - L82 were not covered by tests
"The function is_HexadecimalStringMonoidElement is deprecated; "
"use 'isinstance(..., StringMonoidElement) and isinstance(x.parent(), HexadecimalStringMonoid)' instead.")
from .string_monoid import HexadecimalStringMonoid
return isinstance(x, StringMonoidElement) and \
isinstance(x.parent(), HexadecimalStringMonoid)
Expand All @@ -70,6 +90,10 @@ def is_HexadecimalStringMonoidElement(x):
def is_Radix64StringMonoidElement(x):
r"""
"""
from sage.misc.superseded import deprecation
deprecation(38280,

Check warning on line 94 in src/sage/monoids/string_monoid_element.py

View check run for this annotation

Codecov / codecov/patch

src/sage/monoids/string_monoid_element.py#L93-L94

Added lines #L93 - L94 were not covered by tests
"The function is_Radix64StringMonoidElement is deprecated; "
"use 'isinstance(..., StringMonoidElement) and isinstance(x.parent(), Radix64StringMonoid)' instead.")
from .string_monoid import Radix64StringMonoid
return isinstance(x, StringMonoidElement) and \
isinstance(x.parent(), Radix64StringMonoid)
Expand Down

0 comments on commit 3623227

Please sign in to comment.