Repository navigation
Tree: the entry alias names 'Node' without type arguments - #51
Conversation
pyTooling's 'Node' drops its key and value type parameters (pyTooling.Tree uses 'KeyValuePairsMixin'), so 'Node[None, str, str, Any]' raises 'TypeError: Too many arguments' at import. A plain 'Node' works with pyTooling 10.0.0rc2 and with the change. Co-Authored-By: Patrick Lehmann <Paebbels@gmail.com>
Up to standards ✅🟢 Issues
|
| Metric | Results |
|---|---|
| Complexity | 0 |
| Duplication | 0 |
🟢 Coverage 100.00% diff coverage · +0.00% coverage variation
Metric Results Coverage variation ✅ +0.00% coverage variation (-1.00%) Diff coverage ✅ 100.00% diff coverage Coverage variation details
Coverable lines Covered lines Coverage Common ancestor commit (04afb4a) 4879 4253 87.17% Head commit (9ff6eb7) 4879 (+0) 4253 (+0) 87.17% (+0.00%) Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch:
<coverage of head commit> - <coverage of common ancestor commit>Diff coverage details
Coverable lines Covered lines Diff coverage Pull request (#51) 1 1 100.00% Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified:
<covered lines added or modified>/<coverable lines added or modified> * 100%
NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## dev #51 +/- ##
=======================================
Coverage 84.89% 84.89%
=======================================
Files 24 24
Lines 4879 4879
Branches 785 785
=======================================
Hits 4142 4142
Misses 626 626
Partials 111 111
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. |
pyTooling's
Nodedrops its key and value type parameters (pyTooling/pyTooling#574:Nodetakes its key-value-pairs fromKeyValuePairsMixin).pyTooling.Sphinx.Treedefines_Entry = Node[None, str, str, Any]at module level, which would raiseTypeError: Too many arguments for <class 'pyTooling.Tree.Node'>; actual 4, expected 2when the module is imported.Changes
_Entry = Nodewithout type arguments. It works with pyTooling 10.0.0rc2 (four parameters) and with the change (two), so this can merge before the next pyTooling release. Once the requirement is raised past that release, it can be writtenNode[None, str]again.Unit Tests
tests/unit: 424 passed against pyToolingdevand against the pyTooling branch.Related Issues and Pull-Requests