Skip to content

Commit

Permalink
Merge pull request #223 from hamcrest/pre-commit-ci-update-config
Browse files Browse the repository at this point in the history
[pre-commit.ci] pre-commit autoupdate
  • Loading branch information
offbyone authored Apr 4, 2023
2 parents db767cf + fb87955 commit 63212eb
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 9 deletions.
8 changes: 4 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,18 @@ repos:
- id: check-useless-excludes

- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.3.0
rev: v4.4.0
hooks:
- id: debug-statements

- repo: https://github.com/asottile/blacken-docs
rev: v1.12.1
rev: 1.13.0
hooks:
- id: blacken-docs
# args: ["-l100"]

- repo: https://github.com/PyCQA/flake8
rev: 5.0.4
rev: 6.0.0
hooks:
- id: flake8
exclude: >-
Expand All @@ -26,7 +26,7 @@ repos:
)
- repo: https://github.com/psf/black
rev: 22.10.0
rev: 23.3.0
hooks:
- id: black
# args: ["-l100"]
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 63212eb

Please sign in to comment.