Skip to content

Commit f0d04d1

Browse files
authored
fix: 🐛 properties argument wasn't actually used, so removed (#253)
# Description This argument wasn't even used, so just removed it. Needs a quick review. ## Checklist - [x] Ran `just run-all`
1 parent 73f1b89 commit f0d04d1

File tree

2 files changed

+6
-12
lines changed

2 files changed

+6
-12
lines changed

src/check_datapackage/check.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ class for more details, especially about the default values.
178178
issues = _check_object_against_json_schema(properties, schema)
179179
issues += _check_keys(properties, issues)
180180
issues += apply_extensions(properties, config.extensions)
181-
issues = exclude(issues, config.exclusions, properties)
181+
issues = exclude(issues, config.exclusions)
182182
issues = sorted(set(issues))
183183

184184
if error and issues:

src/check_datapackage/exclusion.py

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -51,28 +51,22 @@ class Exclusion(BaseModel, frozen=True):
5151
type: Optional[str] = None
5252

5353

54-
def exclude(
55-
issues: list[Issue], exclusions: list[Exclusion], descriptor: dict[str, Any]
56-
) -> list[Issue]:
54+
def exclude(issues: list[Issue], exclusions: list[Exclusion]) -> list[Issue]:
5755
"""Exclude issues defined by Exclusion objects."""
5856
return _filter(
5957
issues,
60-
lambda issue: not _get_any_matches(issue, exclusions, descriptor),
58+
lambda issue: not _get_any_matches(issue, exclusions),
6159
)
6260

6361

64-
def _get_any_matches(
65-
issue: Issue, exclusions: list[Exclusion], descriptor: dict[str, Any]
66-
) -> bool:
62+
def _get_any_matches(issue: Issue, exclusions: list[Exclusion]) -> bool:
6763
matches: list[bool] = _map(
68-
exclusions, lambda exclusion: _get_matches(issue, exclusion, descriptor)
64+
exclusions, lambda exclusion: _get_matches(issue, exclusion)
6965
)
7066
return any(matches)
7167

7268

73-
def _get_matches(
74-
issue: Issue, exclusion: Exclusion, descriptor: dict[str, Any]
75-
) -> bool:
69+
def _get_matches(issue: Issue, exclusion: Exclusion) -> bool:
7670
matches: list[bool] = []
7771

7872
both_none = exclusion.jsonpath is None and exclusion.type is None

0 commit comments

Comments
 (0)