aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/python/PyHamcrest/src
diff options
context:
space:
mode:
authorshadchin <shadchin@yandex-team.ru>2022-02-10 16:44:39 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:44:39 +0300
commite9656aae26e0358d5378e5b63dcac5c8dbe0e4d0 (patch)
tree64175d5cadab313b3e7039ebaa06c5bc3295e274 /contrib/python/PyHamcrest/src
parent2598ef1d0aee359b4b6d5fdd1758916d5907d04f (diff)
downloadydb-e9656aae26e0358d5378e5b63dcac5c8dbe0e4d0.tar.gz
Restoring authorship annotation for <shadchin@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'contrib/python/PyHamcrest/src')
-rw-r--r--contrib/python/PyHamcrest/src/hamcrest/__init__.py4
-rw-r--r--contrib/python/PyHamcrest/src/hamcrest/core/core/isinstanceof.py16
-rw-r--r--contrib/python/PyHamcrest/src/hamcrest/core/core/raises.py2
-rw-r--r--contrib/python/PyHamcrest/src/hamcrest/core/helpers/wrap_matcher.py10
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 544c9c1ec9f..3a751d44f62 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 6f2a72b4c2f..f8eb4a2fd10 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 c9bb09db000..878e2af87aa 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 f3083a5e0a0..a5b506fb395 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