diff options
author | shadchin <shadchin@yandex-team.ru> | 2022-02-10 16:44:30 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:44:30 +0300 |
commit | 2598ef1d0aee359b4b6d5fdd1758916d5907d04f (patch) | |
tree | 012bb94d777798f1f56ac1cec429509766d05181 /contrib/python/PyHamcrest/src | |
parent | 6751af0b0c1b952fede40b19b71da8025b5d8bcf (diff) | |
download | ydb-2598ef1d0aee359b4b6d5fdd1758916d5907d04f.tar.gz |
Restoring authorship annotation for <shadchin@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'contrib/python/PyHamcrest/src')
4 files changed, 16 insertions, 16 deletions
diff --git a/contrib/python/PyHamcrest/src/hamcrest/__init__.py b/contrib/python/PyHamcrest/src/hamcrest/__init__.py index 3a751d44f62..544c9c1ec9f 100644 --- a/contrib/python/PyHamcrest/src/hamcrest/__init__.py +++ b/contrib/python/PyHamcrest/src/hamcrest/__init__.py @@ -2,7 +2,7 @@ from __future__ import absolute_import from hamcrest.core import * from hamcrest.library import * -__version__ = "1.9.0" +__version__ = "1.9.0" __author__ = "Chris Rose" -__copyright__ = "Copyright 2015 hamcrest.org" +__copyright__ = "Copyright 2015 hamcrest.org" __license__ = "BSD, see License.txt" diff --git a/contrib/python/PyHamcrest/src/hamcrest/core/core/isinstanceof.py b/contrib/python/PyHamcrest/src/hamcrest/core/core/isinstanceof.py index f8eb4a2fd10..6f2a72b4c2f 100644 --- a/contrib/python/PyHamcrest/src/hamcrest/core/core/isinstanceof.py +++ b/contrib/python/PyHamcrest/src/hamcrest/core/core/isinstanceof.py @@ -11,26 +11,26 @@ class IsInstanceOf(BaseMatcher): def __init__(self, expected_type): if not is_matchable_type(expected_type): - raise TypeError('IsInstanceOf requires type or a tuple of classes and types') + raise TypeError('IsInstanceOf requires type or a tuple of classes and types') self.expected_type = expected_type def _matches(self, item): return isinstance(item, self.expected_type) def describe_to(self, description): - try: - type_description = self.expected_type.__name__ - except AttributeError: - type_description = "one of %s" % ",".join(str(e) for e in self.expected_type) + try: + type_description = self.expected_type.__name__ + except AttributeError: + type_description = "one of %s" % ",".join(str(e) for e in self.expected_type) description.append_text('an instance of ') \ - .append_text(type_description) + .append_text(type_description) def instance_of(atype): """Matches if object is an instance of, or inherits from, a given type. - :param atype: The type to compare against as the expected type or a tuple - of types. + :param atype: The type to compare against as the expected type or a tuple + of types. This matcher checks whether the evaluated object is an instance of ``atype`` or an instance of any class that inherits from ``atype``. diff --git a/contrib/python/PyHamcrest/src/hamcrest/core/core/raises.py b/contrib/python/PyHamcrest/src/hamcrest/core/core/raises.py index 878e2af87aa..c9bb09db000 100644 --- a/contrib/python/PyHamcrest/src/hamcrest/core/core/raises.py +++ b/contrib/python/PyHamcrest/src/hamcrest/core/core/raises.py @@ -99,7 +99,7 @@ class DeferredCallable(object): self.kwargs = {} def __call__(self): - return self.func(*self.args, **self.kwargs) + return self.func(*self.args, **self.kwargs) def with_args(self, *args, **kwargs): self.args = args diff --git a/contrib/python/PyHamcrest/src/hamcrest/core/helpers/wrap_matcher.py b/contrib/python/PyHamcrest/src/hamcrest/core/helpers/wrap_matcher.py index a5b506fb395..f3083a5e0a0 100644 --- a/contrib/python/PyHamcrest/src/hamcrest/core/helpers/wrap_matcher.py +++ b/contrib/python/PyHamcrest/src/hamcrest/core/helpers/wrap_matcher.py @@ -28,9 +28,9 @@ def is_matchable_type(expected_type): if isinstance(expected_type, six.class_types): return True - if isinstance(expected_type, tuple) and \ - expected_type and \ - all(map(is_matchable_type, expected_type)): - return True - + if isinstance(expected_type, tuple) and \ + expected_type and \ + all(map(is_matchable_type, expected_type)): + return True + return False |