Enable reportUnknownParameterType in basedpyright#1403
Enable reportUnknownParameterType in basedpyright#1403nathanjmcdougall merged 5 commits intomainfrom
reportUnknownParameterType in basedpyright#1403Conversation
Co-authored-by: nathanjmcdougall <18602289+nathanjmcdougall@users.noreply.github.com>
reportUnknownParameterType in basedpyright
src/usethis/_file/yaml/update.py
Outdated
src/usethis/_pipeweld/func.py
Outdated
| component[idx + 1] = _union(successor_component, self.step) | ||
| union = _union(successor_component, self.step) | ||
| if len(container) == 1 and container[0] == union: | ||
| assert union is not None |
There was a problem hiding this comment.
@copilot instead of asserting this, please raise NotImplementedError for when it's violated
There was a problem hiding this comment.
Done in 4c6efec — replaced assert union is not None with if union is None: raise NotImplementedError.
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Co-authored-by: nathanjmcdougall <18602289+nathanjmcdougall@users.noreply.github.com>
|
@copilot please use the |
Co-authored-by: nathanjmcdougall <18602289+nathanjmcdougall@users.noreply.github.com>
Done in 41e9b5a. Ran |
Key: TypeAlias = str | re.Pattern→str | re.Pattern[str]in_io.pySeries.__getitem__andSeries.__setitem__incontainers.pylcs_list_updatesignature: useTypeVar(list[_T]) so call sites withlist[int]remain valid (list is invariant,list[object]caused type errors)func.py: useraise NotImplementedErrorinstead ofassertwhen_union()returnsNoneunexpectedly[object]type arg to bareKeyValueFileManagerandUsethisFileManagerreferencesreportUnknownParameterTypeinpyproject.toml(remove from disabled list, add to tests environment)prek run -aandbasedpyright— all cleanOriginal prompt
reportUnknownParameterTypein basedpyright #1333🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.