Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(numpy-param-doc): allow "default" in params #7360

Open
wants to merge 12 commits into
base: main
Choose a base branch
from

Conversation

adam-grant-hendry
Copy link
Contributor

@adam-grant-hendry adam-grant-hendry commented Aug 26, 2022

  • Write a good description on what the PR does.
  • Create a news fragment with towncrier create <IssueNumber>.<type> which will be
    included in the changelog. <type> can be one of: new_check, removed_check, extension,
    false_positive, false_negative, bugfix, other, internal. If necessary you can write
    details or offer examples on how the new change is supposed to work.
  • If you used multiple emails or multiple names when contributing, add your mails
    and preferred name in script/.contributors_aliases.json

Type of Changes

Type
βœ“ πŸ› Bug fix

Description

NumPy doc style guide permits using default in parameter signatures.

Closes ##6211

@adam-grant-hendry
Copy link
Contributor Author

@DanielNoord @Pierre-Sassoulas Would you please kindly help review? Thank you.

@Pierre-Sassoulas Pierre-Sassoulas added the False Negative πŸ¦‹ No message is emitted but something is wrong with the code label Aug 26, 2022
@Pierre-Sassoulas Pierre-Sassoulas added this to the 2.16.0 milestone Aug 26, 2022
@github-actions

This comment has been minimized.

Copy link
Member

@Pierre-Sassoulas Pierre-Sassoulas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you add a fragment for the changelog please ? :)

tests/functional/ext/docparams/docparams.py Outdated Show resolved Hide resolved
@DanielNoord
Copy link
Collaborator

@adam-grant-hendry The primer tests shows that we would be emitting a lot more messages which I don't really expect. Perhaps we can take a test from there?

@adam-grant-hendry
Copy link
Contributor Author

@adam-grant-hendry The primer tests shows that we would be emitting a lot more messages which I don't really expect. Perhaps we can take a test from there?

One difficulty I have is that pytest isn't outputting what the regular expressions are matching and not matching. Is there a way I can do this with the pylint source, or do I have to write a throw-away script using re and check for matches?

@github-actions

This comment has been minimized.

@adam-grant-hendry
Copy link
Contributor Author

Could you add a fragment for the changelog please ? :)

Yes, I added a fragment with my last push.

adam-grant-hendry added a commit to adam-grant-hendry/pylint that referenced this pull request Aug 26, 2022
Copy link
Member

@Pierre-Sassoulas Pierre-Sassoulas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would you mind rebasing/merging the main branch ? (there's modification from the recent release mixed in the diff.)

Without looking into it, I think something is wrong with the modified regex as the primer raise a lot more message now.

adam-grant-hendry added a commit to adam-grant-hendry/pylint that referenced this pull request Aug 26, 2022
@adam-grant-hendry
Copy link
Contributor Author

Would you mind rebasing/merging the main branch ? (there's modification from the recent release mixed in the diff.)

Just did, but couldn't figure out how to do that without force pushing. I used --force-with-lease to try not to overwrite work you or @DanielNoord may have done.

Without looking into it, I think something is wrong with the modified regex as the primer raise a lot more message now.

Yes, the regex is not working, but I don't know why.

@github-actions

This comment has been minimized.

@adam-grant-hendry
Copy link
Contributor Author

adam-grant-hendry commented Aug 27, 2022

@DanielNoord @Pierre-Sassoulas This should be working now. I wrote a test script to help me out:

test_script.py
from __future__ import annotations

import re
import typing

from pylint.extensions._check_docs_utils import NumpyDocstring

if typing.TYPE_CHECKING:
    from pylint.extensions._check_docs_utils import Docstring


def space_indentation(s: str) -> int:
    """The number of leading spaces in a string.

    :param str s: input string

    :rtype: int
    :return: number of leading spaces
    """
    return len(s) - len(s.lstrip(" "))


def _is_section_header(line: str) -> bool:
    return bool(re.match(r"\s*-+$", line))


def min_section_indent(section_match: re.Match[str]) -> int:
    return len(section_match.group(1))


def _parse_section(
    section_re: re.Pattern[str],
    doc: str,
) -> list[str]:
    section_match = section_re.search(doc)
    if section_match is None:
        return []

    min_indentation = min_section_indent(section_match)

    entries: list[str] = []
    entry: list[str] = []
    is_first = True
    for line in section_match.group(2).splitlines():
        if not line.strip():
            continue
        indentation = space_indentation(line)
        if indentation < min_indentation:
            break

        # The first line after the header defines the minimum
        # indentation.
        if is_first:
            min_indentation = indentation
            is_first = False

        if indentation == min_indentation:
            if _is_section_header(line):
                break
            # Lines with minimum indentation must contain the beginning
            # of a new parameter documentation.
            if entry:
                entries.append("\n".join(entry))
                entry = []

        entry.append(line)

    if entry:
        entries.append("\n".join(entry))

    return entries


def match_param_docs(
    checker: NumpyDocstring,
    doc: str,
) -> tuple[set[str], set[str]]:
    """Matches parameter documentation section to parameter documentation rules."""
    params_with_doc = set()
    params_with_type = set()

    entries = _parse_section(checker.re_param_section, doc)
    entries.extend(_parse_section(checker.re_keyword_param_section, doc))
    for entry in entries:
        match = checker.re_param_line.match(entry)
        if not match:
            continue

        print(match)
        print()
        # check if parameter has description only
        re_only_desc = re.match(r"\s*(\*{0,2}\w+)\s*:?\n\s*\w*$", entry)
        print(f're_only_desc: {re_only_desc is not None}')
        if re_only_desc:
            param_name = match.group('param_name')
            param_desc = match.group('param_type')
            param_type = None
        else:
            param_name = match.group('param_name')
            param_type = match.group('param_type')
            param_desc = match.group('param_desc')

        print(f"Param Name: '{param_name}'")
        print(f"Type: '{param_type}'")
        print(f"Description: '{param_desc}'")

        if param_type:
            params_with_type.add(param_name)

        if param_desc:
            params_with_doc.add(param_name)

    return params_with_doc, params_with_type


if __name__ == '__main__':
    docstrings = [
        """This is a regression test for issue `#6211`_.

False negative of "missing param doc" was being issued when "default" used in
NumPy-style docs. This test should return no errors.

Parameters
----------
number : int, default 0
    The number parameter

.. _`#6211`:
    https://github.com/PyCQA/pylint/issues/6211
""",
        """No errors raised when pipe symbol used for or.

`PEP 604`_ allows writing Union types as X | Y. Can be enabled in Python <3.10
using `from __future__ import annotations`.

Parameters
----------
arg1
    The first arg
arg2 : str or None, default=None
    The second arg

.. _`PEP 604`:
    https://peps.python.org/pep-0604/
""",
        """Reported in https://github.com/PyCQA/pylint/issues/4035.

Parameters
----------
arg : int
    The number of times to print it.
option : {"y", "n"}
    Do I do it?
option2 : {"y", None, "n"}
    Do I do it?

""",
        """function foobar ...

Parameters
----------
arg1 : int
arg2 : int
arg3 : str
""",
        """function foobar ...
Parameters
----------
arg1:
    description
arg2: str
""",
        """
Helper to assert that left and right cannot be added.
Parameters
----------
left : object
right : object
msg : str, default "cannot add"
""",
    """
Assert that comparison operations with mismatched types behave correctly.

Parameters
----------
left : np.ndarray, ExtensionArray, Index, or Series
right : object
box : {pd.DataFrame, pd.Series, pd.Index, pd.array, tm.to_array}
""",
    """Generate many datasets.
Parameters
----------
data : fixture implementing `data`

Returns
-------
Callable[[int], Generator]:
    A callable that takes a `count` argument and
    returns a generator yielding `count` datasets.
""",
    """
Read HTML file from formats data directory.
Parameters
----------
datapath : pytest fixture
    The datapath fixture injected into a test by pytest.
name : str
    The name of the HTML file without the suffix.
Returns
-------
str : contents of HTML file.
""",
    """
Check that operator opname works as advertised on frame
Parameters
----------
opname : str
    Name of the operator to test on frame
alternative : function
    Function that opname is tested against; i.e. "frame.opname()" should
    equal "alternative(frame)".
frame : DataFrame
    The object that the tests are executed on
has_skipna : bool, default True
    Whether the method "opname" has the kwarg "skip_na"
check_dtype : bool, default True
    Whether the dtypes of the result of "frame.opname()" and
    "alternative(frame)" should be checked.
check_dates : bool, default false
    Whether opname should be tested on a Datetime Series
rtol : float, default 1e-5
    Relative tolerance.
atol : float, default 1e-8
    Absolute tolerance.
skipna_alternative : function, default None
    NaN-safe version of alternative
"""
    ]

    np_checker = NumpyDocstring(None)

    for ndx, docstr in enumerate(docstrings):
        print(f'========= Docstring {ndx+1} =========')
        params_with_description_only, params_with_a_type = match_param_docs(np_checker, docstr)

        print()
        print(f'Parameters with a description only: {params_with_description_only}')
        print(f'Parameters with a type: {params_with_a_type}')
        print()

A couple notes:

  1. The OP to Issue False negative: missing numpy param doc when "default ..." in same line of "param : type"Β #6211 used "Parameter" (singular) instead of the intended "Parameters" (plural), and as a result this regex fails to find the parameters section:
re_param_section = re.compile(
        _re_section_template.format(r"(?:Args|Arguments|Parameters)"),
        re.X | re.S | re.M,
    )
  1. The hyperlink I put in the body of the regression_6211 docstring was causing errors (I suspect because of the colon after the "https"). I turned this into a directive.

  2. Adding the from __future__ import annotations line to the top of docparams.py (so I can use python 3.10 style type annotations) shifted each function down by one line, so I needed to update the docparams.txt file.

  3. The regular expression for default values only accounts for strings, booleans, and None, but not:

  • numbers (ints (2), floats (2.35), binary (0b010), oct (0o007), or hex (0xDEADBEEF)
  • those who use _ as separators between sets of 3 digits (e.g. 10_000_000)
  • byte strings (i.e. `b'this will come to byte you')
  • callables (i.e. my_funct=jerry)

There may be other literal/default types to add in the future, but for now I accounted just for ints because that solves the issue at hand:

re_default_value = r"""((['"]\w+\s*['"])|(\d+)|(True)|(False)|(None))"""

@coveralls
Copy link

coveralls commented Aug 27, 2022

Pull Request Test Coverage Report for Build 2989408850

  • 1 of 1 (100.0%) changed or added relevant line in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.0003%) to 95.332%

Totals Coverage Status
Change from base Build 2989383939: 0.0003%
Covered Lines: 16992
Relevant Lines: 17824

πŸ’› - Coveralls

@github-actions

This comment has been minimized.

@adam-grant-hendry
Copy link
Contributor Author

adam-grant-hendry commented Aug 27, 2022

@adam-grant-hendry The primer tests shows that we would be emitting a lot more messages which I don't really expect. Perhaps we can take a test from there?

@DanielNoord @Pierre-Sassoulas After using my script, I found the original code was matching colon (:) for type instead of the actual type. Most of these errors are accurate:

- 1: `pandas/compat/pickle_compat.py`#L256
- 6: `pandas/tests/extension/conftest.py`#L47

have the form

param : description instead of type

This is incorrect per the NumPy Style Guide. Descriptions must go on the next line indented. Only types can occur after the colon on the same line.

- 7, 8: `pandas/tests/io/test_parquet.py#L165`

is in fact missing documentation for the listed parameters.

- 9, 13: `pandas/tests/io/formats/test_to_html.py#L30` (there are many others)

has incorrect types. "pytest fixture" and matplotlib Axes object are not types; these should be a class name (dotted attribute), type alias, or builtin (e.g. _pytest.monkeypatch.MonkeyPatch or matplotlib.axes.Axes)

The above distinction is quite relevant considering the prevelance of static type checkers for python nowadays.

If pandas wishes to use a style different from numpy, they should have their own style guide. It is confusing for those wanting to follow the numpy guide to get unexpected allowed behavior (and it might cause sphinx not to work properly). For this, I recommend the pylint team create a separate class in _check_docs_utils.py and call it PandasDocstring and to have the pandas team confirm it.

@DanielNoord
Copy link
Collaborator

@adam-grant-hendry That does indeed seem like we were incorrectly matching previously.

Would you be willing to open a separate PR to fix that and add some regressions tests against that?

@github-actions

This comment has been minimized.

@adam-grant-hendry
Copy link
Contributor Author

@adam-grant-hendry That does indeed seem like we were incorrectly matching previously.

Would you be willing to open a separate PR to fix that and add some regressions tests against that?

I would, but I'm not sure I have time at this stage. I doubt I would be able to finish this PR even. The amount of fixes required is more than I originally envisioned, I'm sorry.

At this stage, I'm simply getting by by:

  1. Not using default in the type, but in the description (e.g. Defaults to ...)
  2. Using or and of instead of | and [], respectively (though this is actually per the numpydoc style guide and the latter is from the newer python typing annotations syntax)

@adam-grant-hendry
Copy link
Contributor Author

adam-grant-hendry commented Aug 31, 2022

@DanielNoord @Pierre-Sassoulas Two more drive-by comments:

  1. Because : is searched for in the regex, this also causes false-negatives when directives are used in the docstring body. Any colons in the body is going to be an issue.

e.g. This gives a missing-param-doc error

def func(self, a: int, b: bool) -> None:
    """Does something funky.

    This is where you explain the funk.

    ..warning:: ``a`` Explodes!
        Don't use ``a``

    Parameters
    ----------
    a : int
        An integer
    b : bool
        A bool
    """
  1. Your regex's don't match when a union of types ends with , or type. It matches type of type and type or type, but the following does not work:
def funkify(self, a: int | bool | str) -> str:
    """Get with the funk.

    What the funk?!

    Parameters
    ----------
    a : int, bool, or str
        This is an ``int``, ``bool``, or ``str``. How funky!

    Returns
    -------
    b : str
        Because why not return a ``str``
    """

NumPy doc style guide permits using `default` in parameter
signatures.

Fixes: pylint-dev#6211
Change `x` to `number` in test method `regression_6211`. This was
causing an `invalid-name` error.
adam-grant-hendry and others added 6 commits September 4, 2022 22:09
Adds a news fragment for the issue.
* Add Marc Byrne to the maintainer team
Adds a news fragment for the issue.
The `re_only_desc` regex did not match for white and characters after
`\n`, so some description-only lines weren't getting matched. In
addition, lookaheads were added to `re_param_line` (i.e. make sure the
type group is not followed by a new line (`\n`)). Lastly, named groups
(ala Perl regular expressions) were added for slightly improved clarity.

The hyperlink in the body of test `regression_6211` was causing
problems, so this was moved into a reStructuredText directive.

Finally, the added

    `from __future__ import annotations`

moved all lines in

	`tests/functional/ext/docparams/docparams.py`

down one line, so the line numbers in `docparams.txt` were off by 1,
causing tests to fail. This was corrected.
Also remove lookahead from `re_param_line` as tests pass without it.
@DanielNoord
Copy link
Collaborator

@DanielNoord @Pierre-Sassoulas Two more drive-by comments:

Both of these should probably be their own issue, right?

I have updated this PR after the merge of #7398. Let's see what the primer thinks!

@github-actions

This comment has been minimized.

@DanielNoord
Copy link
Collaborator

@Pierre-Sassoulas We have a similar issue as discussed previously here.

Should we just accept anything that comes on the type line in a Numpy docstring? It feels better to do so than to try and determine whether type or None or a description of a type is a "real type".

@github-actions
Copy link
Contributor

πŸ€– Effect of this PR on checked open source code: πŸ€–

Effect on pandas:
The following messages are now emitted:

  1. missing-type-doc:
    "column, layout" missing in parameter type documentation
    https://github.com/pandas-dev/pandas/blob/9e1096e8373bc99675fd1b3490cfb7cf26041395/pandas/plotting/_core.py#L544
  2. missing-type-doc:
    "data, index" missing in parameter type documentation
    https://github.com/pandas-dev/pandas/blob/9e1096e8373bc99675fd1b3490cfb7cf26041395/pandas/core/frame.py#L2193
  3. differing-type-doc:
    "stacklevel" differing in parameter type documentation
    https://github.com/pandas-dev/pandas/blob/9e1096e8373bc99675fd1b3490cfb7cf26041395/pandas/core/algorithms.py#L1419
  4. missing-type-doc:
    "tz" missing in parameter type documentation
    https://github.com/pandas-dev/pandas/blob/9e1096e8373bc99675fd1b3490cfb7cf26041395/pandas/core/generic.py#L11152
  5. missing-type-doc:
    "update_times" missing in parameter type documentation
    https://github.com/pandas-dev/pandas/blob/9e1096e8373bc99675fd1b3490cfb7cf26041395/pandas/core/window/ewm.py#L999
  6. missing-type-doc:
    "resolvers" missing in parameter type documentation
    https://github.com/pandas-dev/pandas/blob/9e1096e8373bc99675fd1b3490cfb7cf26041395/pandas/core/computation/eval.py#L170
  7. missing-type-doc:
    "columns, index, values" missing in parameter type documentation
    https://github.com/pandas-dev/pandas/blob/9e1096e8373bc99675fd1b3490cfb7cf26041395/pandas/core/reshape/pivot.py#L563
  8. missing-type-doc:
    "bins, x" missing in parameter type documentation
    https://github.com/pandas-dev/pandas/blob/9e1096e8373bc99675fd1b3490cfb7cf26041395/pandas/core/reshape/tile.py#L53
  9. missing-type-doc:
    "q" missing in parameter type documentation
    https://github.com/pandas-dev/pandas/blob/9e1096e8373bc99675fd1b3490cfb7cf26041395/pandas/core/reshape/tile.py#L272
  10. missing-type-doc:
    "others" missing in parameter type documentation
    https://github.com/pandas-dev/pandas/blob/9e1096e8373bc99675fd1b3490cfb7cf26041395/pandas/core/strings/accessor.py#L477
  11. missing-type-doc:
    "end, holidays, start" missing in parameter type documentation
    https://github.com/pandas-dev/pandas/blob/9e1096e8373bc99675fd1b3490cfb7cf26041395/pandas/core/indexes/datetimes.py#L1024
  12. missing-type-doc:
    "end, freq, start" missing in parameter type documentation
    https://github.com/pandas-dev/pandas/blob/9e1096e8373bc99675fd1b3490cfb7cf26041395/pandas/core/indexes/interval.py#L983
  13. missing-type-doc:
    "step" missing in parameter type documentation
    https://github.com/pandas-dev/pandas/blob/9e1096e8373bc99675fd1b3490cfb7cf26041395/pandas/core/indexes/base.py#L6719
  14. missing-type-doc:
    "end, freq, start" missing in parameter type documentation
    https://github.com/pandas-dev/pandas/blob/9e1096e8373bc99675fd1b3490cfb7cf26041395/pandas/core/indexes/timedeltas.py#L259
  15. differing-type-doc:
    "axis, center, closed, min_periods, on, win_type" differing in parameter type documentation
    https://github.com/pandas-dev/pandas/blob/9e1096e8373bc99675fd1b3490cfb7cf26041395/pandas/core/groupby/groupby.py#L3684
  16. missing-type-doc:
    "new_categories" missing in parameter type documentation
    https://github.com/pandas-dev/pandas/blob/9e1096e8373bc99675fd1b3490cfb7cf26041395/pandas/core/arrays/categorical.py#L1003
  17. useless-type-doc:
    "_downcast" useless ignored parameter type documentation
    https://github.com/pandas-dev/pandas/blob/9e1096e8373bc99675fd1b3490cfb7cf26041395/pandas/core/internals/blocks.py#L1367
  18. missing-type-doc:
    "complib, format, nan_rep" missing in parameter type documentation
    https://github.com/pandas-dev/pandas/blob/9e1096e8373bc99675fd1b3490cfb7cf26041395/pandas/io/pytables.py#L1101
  19. missing-type-doc:
    "columns" missing in parameter type documentation
    https://github.com/pandas-dev/pandas/blob/9e1096e8373bc99675fd1b3490cfb7cf26041395/pandas/io/pytables.py#L3707
  20. differing-type-doc:
    "comment, converters, data, date_parser, delimiter, encoding, float_precision, has_index_names, header, index_col, keep_date_col, keep_default_na, names, parse_dates, skipfooter, skiprows, thousands" differing in parameter type documentation
    https://github.com/pandas-dev/pandas/blob/9e1096e8373bc99675fd1b3490cfb7cf26041395/pandas/io/parsers/readers.py#L1902
  21. missing-type-doc:
    "check_same, left, right" missing in parameter type documentation
    https://github.com/pandas-dev/pandas/blob/9e1096e8373bc99675fd1b3490cfb7cf26041395/pandas/_testing/asserters.py#L602
  22. missing-type-doc:
    "left, right" missing in parameter type documentation
    https://github.com/pandas-dev/pandas/blob/9e1096e8373bc99675fd1b3490cfb7cf26041395/pandas/_testing/asserters.py#L682
  23. missing-type-doc:
    "atol, check_dates, rtol" missing in parameter type documentation
    https://github.com/pandas-dev/pandas/blob/9e1096e8373bc99675fd1b3490cfb7cf26041395/pandas/tests/frame/test_reductions.py#L38

The following messages are no longer emitted:

  1. missing-type-doc:
    "backend, column, layout" missing in parameter type documentation
    https://github.com/pandas-dev/pandas/blob/9e1096e8373bc99675fd1b3490cfb7cf26041395/pandas/plotting/_core.py#L544
  2. missing-type-doc:
    "columns, data, exclude, index" missing in parameter type documentation
    https://github.com/pandas-dev/pandas/blob/9e1096e8373bc99675fd1b3490cfb7cf26041395/pandas/core/frame.py#L2193
  3. missing-type-doc:
    "column_dtypes, index_dtypes" missing in parameter type documentation
    https://github.com/pandas-dev/pandas/blob/9e1096e8373bc99675fd1b3490cfb7cf26041395/pandas/core/frame.py#L2420
  4. missing-type-doc:
    "level, tz" missing in parameter type documentation
    https://github.com/pandas-dev/pandas/blob/9e1096e8373bc99675fd1b3490cfb7cf26041395/pandas/core/generic.py#L11152
  5. missing-type-doc:
    "level" missing in parameter type documentation
    https://github.com/pandas-dev/pandas/blob/9e1096e8373bc99675fd1b3490cfb7cf26041395/pandas/core/generic.py#L11233
  6. missing-type-doc:
    "engine_kwargs" missing in parameter type documentation
    https://github.com/pandas-dev/pandas/blob/9e1096e8373bc99675fd1b3490cfb7cf26041395/pandas/core/window/ewm.py#L416
  7. missing-type-doc:
    "update, update_times" missing in parameter type documentation
    https://github.com/pandas-dev/pandas/blob/9e1096e8373bc99675fd1b3490cfb7cf26041395/pandas/core/window/ewm.py#L999
  8. missing-type-doc:
    "resolvers, target" missing in parameter type documentation
    https://github.com/pandas-dev/pandas/blob/9e1096e8373bc99675fd1b3490cfb7cf26041395/pandas/core/computation/eval.py#L170
  9. missing-type-doc:
    "colnames, columns, index, rownames, values" missing in parameter type documentation
    https://github.com/pandas-dev/pandas/blob/9e1096e8373bc99675fd1b3490cfb7cf26041395/pandas/core/reshape/pivot.py#L563
  10. missing-type-doc:
    "bins, labels, x" missing in parameter type documentation
    https://github.com/pandas-dev/pandas/blob/9e1096e8373bc99675fd1b3490cfb7cf26041395/pandas/core/reshape/tile.py#L53
  11. missing-type-doc:
    "labels, q" missing in parameter type documentation
    https://github.com/pandas-dev/pandas/blob/9e1096e8373bc99675fd1b3490cfb7cf26041395/pandas/core/reshape/tile.py#L272
  12. missing-type-doc:
    "levels" missing in parameter type documentation
    https://github.com/pandas-dev/pandas/blob/9e1096e8373bc99675fd1b3490cfb7cf26041395/pandas/core/reshape/concat.py#L157
  13. missing-type-doc:
    "na_rep, others" missing in parameter type documentation
    https://github.com/pandas-dev/pandas/blob/9e1096e8373bc99675fd1b3490cfb7cf26041395/pandas/core/strings/accessor.py#L477
  14. missing-type-doc:
    "start" missing in parameter type documentation
    https://github.com/pandas-dev/pandas/blob/9e1096e8373bc99675fd1b3490cfb7cf26041395/pandas/core/indexes/multi.py#L2732
  15. missing-type-doc:
    "end, holidays, start, weekmask" missing in parameter type documentation
    https://github.com/pandas-dev/pandas/blob/9e1096e8373bc99675fd1b3490cfb7cf26041395/pandas/core/indexes/datetimes.py#L1024
  16. missing-type-doc:
    "end, freq, periods, start" missing in parameter type documentation
    https://github.com/pandas-dev/pandas/blob/9e1096e8373bc99675fd1b3490cfb7cf26041395/pandas/core/indexes/interval.py#L983
  17. missing-type-doc:
    "sort" missing in parameter type documentation
    https://github.com/pandas-dev/pandas/blob/9e1096e8373bc99675fd1b3490cfb7cf26041395/pandas/core/indexes/base.py#L3191
  18. missing-type-doc:
    "sort" missing in parameter type documentation
    https://github.com/pandas-dev/pandas/blob/9e1096e8373bc99675fd1b3490cfb7cf26041395/pandas/core/indexes/base.py#L3555
  19. missing-type-doc:
    "sort" missing in parameter type documentation
    https://github.com/pandas-dev/pandas/blob/9e1096e8373bc99675fd1b3490cfb7cf26041395/pandas/core/indexes/base.py#L3628
  20. missing-type-doc:
    "end, start, step" missing in parameter type documentation
    https://github.com/pandas-dev/pandas/blob/9e1096e8373bc99675fd1b3490cfb7cf26041395/pandas/core/indexes/base.py#L6719
  21. missing-type-doc:
    "closed, end, freq, name, start" missing in parameter type documentation
    https://github.com/pandas-dev/pandas/blob/9e1096e8373bc99675fd1b3490cfb7cf26041395/pandas/core/indexes/timedeltas.py#L259
  22. missing-type-doc:
    "obj" missing in parameter type documentation
    https://github.com/pandas-dev/pandas/blob/9e1096e8373bc99675fd1b3490cfb7cf26041395/pandas/core/groupby/groupby.py#L1002
  23. differing-type-doc:
    "on" differing in parameter type documentation
    https://github.com/pandas-dev/pandas/blob/9e1096e8373bc99675fd1b3490cfb7cf26041395/pandas/core/groupby/groupby.py#L3684
  24. missing-type-doc:
    "new_categories, ordered" missing in parameter type documentation
    https://github.com/pandas-dev/pandas/blob/9e1096e8373bc99675fd1b3490cfb7cf26041395/pandas/core/arrays/categorical.py#L1003
  25. missing-type-doc:
    "axis" missing in parameter type documentation
    https://github.com/pandas-dev/pandas/blob/9e1096e8373bc99675fd1b3490cfb7cf26041395/pandas/core/arrays/interval.py#L1085
  26. missing-type-doc:
    "dtype" missing in parameter type documentation
    https://github.com/pandas-dev/pandas/blob/9e1096e8373bc99675fd1b3490cfb7cf26041395/pandas/core/internals/array_manager.py#L986
  27. missing-type-doc:
    "index_label" missing in parameter type documentation
    https://github.com/pandas-dev/pandas/blob/9e1096e8373bc99675fd1b3490cfb7cf26041395/pandas/io/sql.py#L1884
  28. missing-type-doc:
    "index_label, schema" missing in parameter type documentation
    https://github.com/pandas-dev/pandas/blob/9e1096e8373bc99675fd1b3490cfb7cf26041395/pandas/io/sql.py#L2363
  29. missing-type-doc:
    "stop" missing in parameter type documentation
    https://github.com/pandas-dev/pandas/blob/9e1096e8373bc99675fd1b3490cfb7cf26041395/pandas/io/pytables.py#L815
  30. missing-type-doc:
    "complib, encoding, format, nan_rep" missing in parameter type documentation
    https://github.com/pandas-dev/pandas/blob/9e1096e8373bc99675fd1b3490cfb7cf26041395/pandas/io/pytables.py#L1101
  31. missing-type-doc:
    "columns, optlevel" missing in parameter type documentation
    https://github.com/pandas-dev/pandas/blob/9e1096e8373bc99675fd1b3490cfb7cf26041395/pandas/io/pytables.py#L3707
  32. differing-type-doc:
    "comment, converters, data, date_parser, delimiter, encoding, float_precision, index_col, keep_date_col, keep_default_na, names, parse_dates, skipfooter, skiprows, thousands" differing in parameter type documentation
    https://github.com/pandas-dev/pandas/blob/9e1096e8373bc99675fd1b3490cfb7cf26041395/pandas/io/parsers/readers.py#L1902
  33. missing-type-doc:
    "check_same, err_msg, index_values, left, right" missing in parameter type documentation
    https://github.com/pandas-dev/pandas/blob/9e1096e8373bc99675fd1b3490cfb7cf26041395/pandas/_testing/asserters.py#L602
  34. missing-type-doc:
    "index_values, left, right" missing in parameter type documentation
    https://github.com/pandas-dev/pandas/blob/9e1096e8373bc99675fd1b3490cfb7cf26041395/pandas/_testing/asserters.py#L682
  35. missing-type-doc:
    "atol, check_dates, check_dtype, has_skipna, rtol, skipna_alternative" missing in parameter type documentation
    https://github.com/pandas-dev/pandas/blob/9e1096e8373bc99675fd1b3490cfb7cf26041395/pandas/tests/frame/test_reductions.py#L38

This comment was generated for commit 616554a

Copy link
Member

@Pierre-Sassoulas Pierre-Sassoulas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for the delay I did not realize this was waiting for my input. I think we should accept anything from the type field, because being able to tell valid type from text is hard, and doing something like "None or MyClass" is frequent enough that the primers message was truncated because there's so much new message. (Removing from the 3.0 milestone because this is the kind of thing that can be merged later)

@Pierre-Sassoulas Pierre-Sassoulas removed this from the 3.0.0 milestone Sep 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
False Negative πŸ¦‹ No message is emitted but something is wrong with the code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants