Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Feb 7, 2023
1 parent 4d9c18b commit c2df26a
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 5 deletions.
1 change: 1 addition & 0 deletions doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,7 @@
# If false, no module index is generated.
# latex_domain_indices = True


# PyHamcrest customization: Don't skip BaseMatcher's _matches method
def skip_member(app, what, name, obj, skip, options):
if skip and str(obj).find("BaseMatcher._matches") >= 0:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ def matches(
self, item: Mapping[K, V], mismatch_description: Optional[Description] = None
) -> bool:
for key, value_matcher in self.value_matchers:

try:
if key not in item:
if mismatch_description:
Expand Down
1 change: 0 additions & 1 deletion tests/hamcrest_unit_test/core/nevermatch.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@


class NeverMatch(BaseMatcher):

mismatch_description = "NEVERMATCH"

def matches(self, item, mismatch_description=None):
Expand Down
3 changes: 0 additions & 3 deletions tests/hamcrest_unit_test/object/hasproperty_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,11 @@


class OnePropertyOldStyle:

field = "value"
field2 = "value2"


class ThreePropertiesNewStyle(object):

field = "value"
field2 = "value2"
field3 = "value3"
Expand Down Expand Up @@ -65,7 +63,6 @@ def __getattribute__(self, name):


class ObjectPropertyMatcher(object):

match_sets = (
("old-style: %s", OnePropertyOldStyle),
("new-style: %s", ThreePropertiesNewStyle),
Expand Down

0 comments on commit c2df26a

Please sign in to comment.