Commit a2c3281
fix: 🐛 remove package prefix in error message (#241)
# Description
The hardcoded prefix led to some issues when integrating
check-datapackage into sprout. See #240 for details.
Test with:
```sh
uv run python -c 'import check_datapackage as cdp; cdp.check({"resources": []}, error=True)'
```
Output before this PR:
```
1 issue was found in your `datapackage.json`:
At package.resources:
|
| resources: []
| ^^
[] should be non-empty
```
Output after this PR:
```
1 issue was found in your `datapackage.json`:
At resources:
|
| resources: []
| ^^
[] should be non-empty
```
I will say that with a top level path like this, it does appear a bit
redundant to list `resources` twice and the `package.resource`
aesthetically gave a bit more variation, but it is minor and for more
nested paths this will look good and be shorter.
Closes #240
Needs a quick review.
## Checklist
- [ ] Formatted Markdown
- [x] Ran `just run-all`
---------
Co-authored-by: Luke W. Johnston <lwjohnst86@users.noreply.github.com>1 parent b5cae5f commit a2c3281
1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
142 | 142 | | |
143 | 143 | | |
144 | 144 | | |
145 | | - | |
| 145 | + | |
146 | 146 | | |
147 | 147 | | |
148 | 148 | | |
| |||
0 commit comments