Repository navigation
ci: lint bindings - #127
Merged
Merged
Conversation
…yment uri functions pybind11-stubgen finds two things in the bindings of main: * MoneroUtils.get_payment_uri and parse_payment_uri write the default of network_type in their signature as <MoneroNetworkType.MAINNET: 0>, the repr of the enum, which is not python and what help() shows. py::arg_v gives the default the text MoneroNetworkType.MAINNET. * MoneroTxConfig.set_address has no py::arg, so its parameter is called arg0 and the function can not be called with address=. Both fixes give a clean run of the stubgen on a small module built like this with the pybind11 of Ubuntu 24.04, the real module is built by CI. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
pybind11-stubgen was installed by the workflows and never used. It reads the signatures that pybind11 writes in the docstrings of the module, so what it can not make sense of is what is wrong with the bindings: a C++ type that leaked into a docstring, a default value that is only a repr, a name that does not resolve. Run on the module of main it found two of them, fixed in the previous commit. bin/lint_bindings.py runs it with --exit-code, counts a warning as an error, and also fails on a public function with parameters that have no name (arg0, arg1), a py::arg missing in the binding. The special methods are not checked, pybind11 names those of the containers it binds itself, nor the setters of the properties. The module has one such function, the one fixed before. It runs in the Linux job of Tests, right after the module is built and before the nodes are started. The bindings are the same on every platform. stubgen is pinned, a new version can report more. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Not up to standards ⛔🔴 Issues
|
| Category | Results |
|---|---|
| Security | 1 minor 2 critical 1 medium |
🟢 Metrics 23 complexity · 0 duplication
Metric Results Complexity 23 Duplication 0
🟢 Coverage ∅ diff coverage · +0.04% coverage variation
Metric Results Coverage variation ✅ +0.04% coverage variation (-1.00%) Diff coverage ✅ ∅ diff coverage Coverage variation details
Coverable lines Covered lines Coverage Common ancestor commit (b654878) 13868 13250 95.54% Head commit (2ffebc5) 13868 (+0) 13255 (+5) 95.58% (+0.04%) 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 (#127) 0 0 ∅ (not applicable) 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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.