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

Fix deprecation warnings due to invalid escape sequences. #19

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion callee/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ class Matcher(BaseMatcher):
for better error messages.
"""
def __repr__(self):
"""Provides a default ``repr``\ esentation for custom matchers.
r"""Provides a default ``repr``\ esentation for custom matchers.

This representation will include matcher class name
and the values of its public attributes.
Expand Down
2 changes: 1 addition & 1 deletion callee/collections.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ def __init__(self):


class Generator(BaseMatcher):
"""Matches an iterable that's a generator.
r"""Matches an iterable that's a generator.

A generator can be a generator expression ("comprehension")
or an invocation of a generator function (one that ``yield``\ s objects).
Expand Down
6 changes: 3 additions & 3 deletions callee/numbers.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ class Number(NumericMatcher):


class Complex(NumericMatcher):
"""Matches any complex number.
r"""Matches any complex number.

This *includes* all real, rational, and integer numbers as well,
which in Python translates to `float`\ s, fractions, and `int`\ egers.
Expand All @@ -57,7 +57,7 @@ class Complex(NumericMatcher):


class Real(NumericMatcher):
"""Matches any real number.
r"""Matches any real number.

This includes all rational and integer numbers as well, which in Python
translates to fractions, and `int`\ egers.
Expand All @@ -72,7 +72,7 @@ class Float(NumericMatcher):


class Rational(NumericMatcher):
"""Matches a rational number.
r"""Matches a rational number.
This includes all `int`\ eger numbers as well.
"""
CLASS = numbers.Rational
Expand Down
4 changes: 2 additions & 2 deletions callee/operators.py
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ class Shorter(LengthMatcher):


class ShorterOrEqual(LengthMatcher):
"""Matches values that are shorter than,
r"""Matches values that are shorter than,
or equal in ``len``\ gth to (as per ``<=`` operator), given object.
"""
OP = operator.le
Expand All @@ -203,7 +203,7 @@ class Longer(LengthMatcher):


class LongerOrEqual(LengthMatcher):
"""Matches values that are longer than,
r"""Matches values that are longer than,
or equal in ``len``\ gth to (as per ``>=`` operator), given object.
"""
OP = operator.ge
Expand Down
6 changes: 3 additions & 3 deletions callee/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class TypeMatcher(BaseMatcher):
This class shouldn't be used directly.
"""
def __init__(self, type_):
""":param type\ _: Type to match against"""
r""":param type\ _: Type to match against"""
if not isinstance(type_, type):
raise TypeError("%s requires a type, got %r" % (
self.__class__.__name__, type_))
Expand All @@ -32,7 +32,7 @@ class InstanceOf(TypeMatcher):
(as per `isinstance`).
"""
def __init__(self, type_, exact=False):
"""
r"""
:param type\ _: Type to match against
:param exact:

Expand All @@ -58,7 +58,7 @@ class SubclassOf(TypeMatcher):
(as per `issubclass`).
"""
def __init__(self, type_, strict=False):
"""
r"""
:param type\ _: Type to match against
:param strict:

Expand Down