docs: fix docstring Args entries that name a parameter the function does not take - #5685
Open
darkdi wants to merge 1 commit into
Open
docs: fix docstring Args entries that name a parameter the function does not take#5685darkdi wants to merge 1 commit into
darkdi wants to merge 1 commit into
Conversation
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.
Forty
Args:entries name a parameter the function does not take. Docstrings only — no signature, no behaviour, no test touched.The largest group is in
io_descriptors. Every_from_samplethere takes exactly(self, sample), but the docstrings still list the constructor keywords alongside it —enforce_dtype,enforce_shape,apply_column_names,orient,default_format,pilmode,mime_type,allowed_mime_types,kind,json_encoder,**kwargs. InPandasSeries._from_samplethe one real argument was documented under the old namesample_input, so that becamesamplerather than being dropped.Also in
io_descriptors: all threefrom_protomethods takefieldbut documentrequestandcontext, and both_to_proto_implmethods document acontextthey do not receive.Ten are renames:
from_proto(numpy, pandas ×2)requestfieldPandasSeries._from_samplesample_inputsampleModelAPI.gettagnamefastai.save_modellearnerlearner_pytorch_lightning.load_model,torchscript.load_modeltagbentoml_modelModel.to_runnerrunnable_method_configsmethod_configshost_bentobentobento_nameThe rest document something that is not an argument:
model_storeon the twopytorch_lightningentry points,backendonOCIBuilder.__init__,grpconget_metrics_report,columnsandapply_column_nameson thePandasSeriesclass, andtagonimport_bentoandimport_model— the last two copied from the matchingexport_*functions, which do take a tag.Every entry was opened and read against its signature.
ruff checkandruff format --checkpass on all sixteen files with the pinnedruff==0.15.12from.pre-commit-config.yaml.