Repository navigation
Correct six docstring entries that contradict the signatures - #7860
Open
dylanpulver wants to merge 2 commits into
Open
dylanpulver wants to merge 2 commits into
dylanpulver wants to merge 2 commits into
Conversation
Three Parameters entries name arguments the code does not accept. - OptionsChainsProperties.strategies takes `synthetic_longs` and `synthetic_shorts`; the entries called them `synthetic_long` and `synthetic_short`, so the documented keywords raise TypeError. The singular names belong to the sibling methods on the same class, which is likely where they came from. - ChartStyle.__init__ documented a `console_style` argument. It takes `plt_style` and `user_styles_directory` only. Docstrings only, no behaviour change.
Three documented defaults in openbb_figure.py contradict the signature. - add_trend's `secondary_y` is `bool = False` and was documented as None, which is not a value it accepts. - add_inchart_volume's `row` defaults to 1, not 2. Its sibling `col` already documents 1 correctly. - add_corr_plot's `max_lag` defaults to 20, not 15. Docstrings only, no behaviour change. add_histplot also documents "by default 15" for `bins`, which is correct and is left alone.
This branch has not been deployed
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.
Pull Request the OpenBB Platform
Description
Six docstring entries contradict the code they describe. Two commits, one per kind.
Parameters that no signature accepts
OptionsChainsProperties.strategiestakessynthetic_longsandsynthetic_shorts. The entries called themsynthetic_longandsynthetic_short, sostrategies(synthetic_long=[...])raises TypeError. The singular names belong to the siblingsynthetic_longandsynthetic_shortmethods on the same class, which is likely where they came from.ChartStyle.__init__documented aconsole_styleargument. It takesplt_styleanduser_styles_directoryonly.Documented defaults the signature contradicts, all in
openbb_figure.pyadd_trend'ssecondary_yisbool = Falseand was documented as None, which is not a value it accepts.add_inchart_volume'srowdefaults to 1, not 2. Its siblingcolalready documents 1 correctly.add_corr_plot'smax_lagdefaults to 20, not 15.Docstrings only, no behaviour change.
add_histplotalso documents "by default 15", forbins, where it is correct, so that one is untouched.How has this been tested?
ruff check,ruff format --checkandcodespellpass on all three files.Checklist
feature/feature-nameorhotfix/hotfix-name.Two related things I left alone deliberately, happy to send either as a separate PR.
app/model/example.pydocumentsmultiindex_namesonmock_data, where the parameter ismultiindex. Renaming alone would leave the type wrong, since the entry readsOptional[List[str]]for adict[str, Any], so it needs a wording decision rather than a rename.ChartStyle.__init__still leavesuser_styles_directoryundocumented. I removed the wrong entry rather than adding a new one, to keep this to corrections.