Repository navigation
Correct the documented defaults for filled and alpha - #1073
Merged
Merged
Conversation
kbattocchi
enabled auto-merge (rebase)
October 20, 2026 13:50
Nine `filled` entries say "default False" for an argument that defaults to True, across the three exporter methods on _SingleTreeExporterMixin and the six on the policy tree and forest interpreters. _make_mpl_exporter documents `filled` without claiming a default and is left alone. PopulationSummaryResults.percentile_point documents alpha as "default 0.05", but it defaults to None and falls back to self.alpha. conf_int_mean and conf_int_point use the same fallback and document it as "optional", so this now matches them. Signed-off-by: VenishPaneliya <141703684+VenishPaneliya@users.noreply.github.com>
kbattocchi
force-pushed
the
documented-defaults
branch
from
October 22, 2026 14:49
37464dc to
7cd35e9
Compare
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.
Ten documented defaults disagree with the code.
filled— nine entries say "default False" for an argument that defaults toTrue:_tree_exporter.py_SingleTreeExporterMixin.export_graphviz,.render,.plotpolicy/_drlearner.pyexport_graphviz,render,ploton both the policy tree and the policy forest interpreterThese surface on the public interpreters, since
_SingleTreeExporterMixinis inherited byPolicyTreeand bySingleTreeCateInterpreter/SingleTreePolicyInterpreter._make_mpl_exporterdocumentsfilledwithout claiming a default, so it is left alone — it was the only one of the ten entries that was already correct.alpha— one entry claims a default the signature does not have:PopulationSummaryResults.percentile_pointdocumentsalphaas "default 0.05", but the signature isalpha=Noneand the body doesalpha = self.alpha if alpha is None else alpha.conf_int_meanandconf_int_pointuse the same fallback and document it as "optional", so this now matches them rather than inventing new wording.Docs only, no behaviour change.
ruff checkpasses.