Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deprecate is_StringMonoidElement, ... #38280

Merged
Merged
Changes from all commits
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
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_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_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_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_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
Loading