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

Add regression tests. #9071

Conversation

mbyrnepr2
Copy link
Member

Type of Changes

Type
πŸ› Bug fix
✨ New feature
πŸ”¨ Refactoring
πŸ“œ Docs
βœ“ πŸ§ͺ Tests

Description

Refs #9069
Refs pylint-dev/astroid#2305

@mbyrnepr2 mbyrnepr2 added Skip news πŸ”‡ This change does not require a changelog entry tests labels Sep 25, 2023
@Pierre-Sassoulas Pierre-Sassoulas added this to the 2.17.7 milestone Sep 25, 2023
@mbyrnepr2
Copy link
Member Author

Failing CI tests should be fixed when pylint-dev/astroid#2307 is live.

@mbyrnepr2 mbyrnepr2 marked this pull request as ready for review September 25, 2023 19:56
@mbyrnepr2 mbyrnepr2 force-pushed the regression_tests_no_member_and_unsubscriptable_object branch from e01b501 to b2afb38 Compare September 26, 2023 20:03
@Pierre-Sassoulas Pierre-Sassoulas force-pushed the regression_tests_no_member_and_unsubscriptable_object branch from fc99872 to 8ed99d6 Compare September 27, 2023 07:17
@Pierre-Sassoulas
Copy link
Member

Willte require astroid 2.15.8 when backporting, this is going to be easier to do manually.

@Pierre-Sassoulas Pierre-Sassoulas added the Needs backport Needs to be cherry-picked on the current patch version by a pylint's maintainer label Sep 27, 2023
@codecov
Copy link

codecov bot commented Sep 27, 2023

Codecov Report

Merging #9071 (8ed99d6) into main (aa29201) will not change coverage.
The diff coverage is n/a.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #9071   +/-   ##
=======================================
  Coverage   95.75%   95.75%           
=======================================
  Files         173      173           
  Lines       18664    18664           
=======================================
  Hits        17872    17872           
  Misses        792      792           

@github-actions
Copy link
Contributor

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

Effect on home-assistant:
The following messages are now emitted:

  1. too-many-ancestors:
    Too many ancestors (8/7)
    https://github.com/home-assistant/core/blob/70e3da207a7df4394f9bcee25d0d35d715f483f1/homeassistant/components/renault/sensor.py#L86

The following messages are no longer emitted:

  1. too-few-public-methods:
    Too few public methods (1/2)
    https://github.com/home-assistant/core/blob/70e3da207a7df4394f9bcee25d0d35d715f483f1/homeassistant/components/radarr/sensor.py#L128

Effect on music21:
The following messages are now emitted:

  1. too-many-instance-attributes:
    Too many instance attributes (21/20)
    https://github.com/cuthbertLab/music21/blob/f457a2ba52ea3f978d805cd52fa101dfb0dd8577/music21/stream/base.py#L104
  2. redefined-variable-type:
    Redefinition of keySignatures type from list to music21.stream.iterator.StreamIterator
    https://github.com/cuthbertLab/music21/blob/f457a2ba52ea3f978d805cd52fa101dfb0dd8577/music21/stream/base.py#L3265
  3. redefined-variable-type:
    Redefinition of ksIter type from list to music21.stream.iterator.StreamIterator
    https://github.com/cuthbertLab/music21/blob/f457a2ba52ea3f978d805cd52fa101dfb0dd8577/music21/stream/base.py#L6808

Effect on pytest:
The following messages are no longer emitted:

  1. missing-function-docstring:
    Missing function or method docstring
    https://github.com/pytest-dev/pytest/blob/b73b4c464c6fa54f55a1c6ed8eaceb5529a161bb/src/_pytest/capture.py#L546

Effect on pandas:
The following messages are now emitted:

  1. no-member:
    Method '_selected_obj' has no 'groupby' member
    https://github.com/pandas-dev/pandas/blob/61d2056e4251b8d1c387f2577f0407062b9ab903/pandas/core/resample.py#L387
  2. no-member:
    Method '_obj_with_exclusions' has no 'copy' member
    https://github.com/pandas-dev/pandas/blob/61d2056e4251b8d1c387f2577f0407062b9ab903/pandas/core/resample.py#L1484
  3. no-member:
    Method '_obj_with_exclusions' has no 'copy' member
    https://github.com/pandas-dev/pandas/blob/61d2056e4251b8d1c387f2577f0407062b9ab903/pandas/core/resample.py#L1728
  4. no-member:
    Method '_selected_obj' has no 'copy' member
    https://github.com/pandas-dev/pandas/blob/61d2056e4251b8d1c387f2577f0407062b9ab903/pandas/core/resample.py#L1802
  5. no-member:
    Method '_selected_obj' has no 'reindex' member
    https://github.com/pandas-dev/pandas/blob/61d2056e4251b8d1c387f2577f0407062b9ab903/pandas/core/resample.py#L1807
  6. too-many-ancestors:
    Too many ancestors (9/7)
    https://github.com/pandas-dev/pandas/blob/61d2056e4251b8d1c387f2577f0407062b9ab903/pandas/core/resample.py#L1831
  7. too-many-ancestors:
    Too many ancestors (8/7)
    https://github.com/pandas-dev/pandas/blob/61d2056e4251b8d1c387f2577f0407062b9ab903/pandas/core/resample.py#L1843
  8. too-many-ancestors:
    Too many ancestors (10/7)
    https://github.com/pandas-dev/pandas/blob/61d2056e4251b8d1c387f2577f0407062b9ab903/pandas/core/resample.py#L1956
  9. too-many-ancestors:
    Too many ancestors (8/7)
    https://github.com/pandas-dev/pandas/blob/61d2056e4251b8d1c387f2577f0407062b9ab903/pandas/core/resample.py#L1968
  10. too-many-ancestors:
    Too many ancestors (10/7)
    https://github.com/pandas-dev/pandas/blob/61d2056e4251b8d1c387f2577f0407062b9ab903/pandas/core/resample.py#L1992
  11. no-member:
    Method '_selected_obj' has no '_mgr' member
    https://github.com/pandas-dev/pandas/blob/61d2056e4251b8d1c387f2577f0407062b9ab903/pandas/core/groupby/generic.py#L162
  12. no-member:
    Method '_selected_obj' has no 'dtype' member
    https://github.com/pandas-dev/pandas/blob/61d2056e4251b8d1c387f2577f0407062b9ab903/pandas/core/groupby/generic.py#L163
  13. no-member:
    Method '_obj_with_exclusions' has no 'dtype' member
    https://github.com/pandas-dev/pandas/blob/61d2056e4251b8d1c387f2577f0407062b9ab903/pandas/core/groupby/generic.py#L282
  14. redefined-variable-type:
    Redefinition of result type from dict to pandas.core.series.Series
    https://github.com/pandas-dev/pandas/blob/61d2056e4251b8d1c387f2577f0407062b9ab903/pandas/core/groupby/generic.py#L307
  15. no-member:
    Method '_obj_with_exclusions' has no '_constructor' member
    https://github.com/pandas-dev/pandas/blob/61d2056e4251b8d1c387f2577f0407062b9ab903/pandas/core/groupby/generic.py#L323
  16. no-member:
    Method '_obj_with_exclusions' has no 'name' member
    https://github.com/pandas-dev/pandas/blob/61d2056e4251b8d1c387f2577f0407062b9ab903/pandas/core/groupby/generic.py#L323
  17. no-member:
    Method '_selected_obj' has no '_values' member
    https://github.com/pandas-dev/pandas/blob/61d2056e4251b8d1c387f2577f0407062b9ab903/pandas/core/groupby/generic.py#L526
  18. no-member:
    Method '_selected_obj' has no 'dtype' member
    https://github.com/pandas-dev/pandas/blob/61d2056e4251b8d1c387f2577f0407062b9ab903/pandas/core/groupby/generic.py#L530
  19. no-member:
    Method '_selected_obj' has no '_constructor' member
    https://github.com/pandas-dev/pandas/blob/61d2056e4251b8d1c387f2577f0407062b9ab903/pandas/core/groupby/generic.py#L532
  20. no-member:
    Method '_selected_obj' has no 'name' member
    https://github.com/pandas-dev/pandas/blob/61d2056e4251b8d1c387f2577f0407062b9ab903/pandas/core/groupby/generic.py#L532
  21. no-member:
    Method '_obj_with_exclusions' has no 'columns' member
    https://github.com/pandas-dev/pandas/blob/61d2056e4251b8d1c387f2577f0407062b9ab903/pandas/core/groupby/generic.py#L1512
  22. no-member:
    Method '_obj_with_exclusions' has no 'T' member
    https://github.com/pandas-dev/pandas/blob/61d2056e4251b8d1c387f2577f0407062b9ab903/pandas/core/groupby/generic.py#L1537
  23. no-member:
    Method '_obj_with_exclusions' has no 'axes' member
    https://github.com/pandas-dev/pandas/blob/61d2056e4251b8d1c387f2577f0407062b9ab903/pandas/core/groupby/generic.py#L1564
  24. no-member:
    Method '_obj_with_exclusions' has no 'columns' member
    https://github.com/pandas-dev/pandas/blob/61d2056e4251b8d1c387f2577f0407062b9ab903/pandas/core/groupby/generic.py#L1765
  25. no-member:
    Method '_obj_with_exclusions' has no 'index' member
    https://github.com/pandas-dev/pandas/blob/61d2056e4251b8d1c387f2577f0407062b9ab903/pandas/core/groupby/generic.py#L1765
  26. no-member:
    Method '_obj_with_exclusions' has no 'T' member
    https://github.com/pandas-dev/pandas/blob/61d2056e4251b8d1c387f2577f0407062b9ab903/pandas/core/groupby/generic.py#L2020
  27. no-member:
    Method '_obj_with_exclusions' has no '_mgr' member
    https://github.com/pandas-dev/pandas/blob/61d2056e4251b8d1c387f2577f0407062b9ab903/pandas/core/groupby/generic.py#L2022
  28. no-member:
    Method '_obj_with_exclusions' has no 'columns' member
    https://github.com/pandas-dev/pandas/blob/61d2056e4251b8d1c387f2577f0407062b9ab903/pandas/core/groupby/generic.py#L2035
  29. no-member:
    Method '_obj_with_exclusions' has no 'iloc' member
    https://github.com/pandas-dev/pandas/blob/61d2056e4251b8d1c387f2577f0407062b9ab903/pandas/core/groupby/generic.py#L2038
  30. no-member:
    Method '_obj_with_exclusions' has no 'columns' member
    https://github.com/pandas-dev/pandas/blob/61d2056e4251b8d1c387f2577f0407062b9ab903/pandas/core/groupby/generic.py#L2044
  31. no-member:
    Method '_selected_obj' has no '_get_axis' member
    https://github.com/pandas-dev/pandas/blob/61d2056e4251b8d1c387f2577f0407062b9ab903/pandas/core/groupby/groupby.py#L1453
  32. no-member:
    Method '_obj_with_exclusions' has no 'ndim' member
    https://github.com/pandas-dev/pandas/blob/61d2056e4251b8d1c387f2577f0407062b9ab903/pandas/core/groupby/groupby.py#L1657
  33. no-member:
    Method '_obj_with_exclusions' has no 'to_frame' member
    https://github.com/pandas-dev/pandas/blob/61d2056e4251b8d1c387f2577f0407062b9ab903/pandas/core/groupby/groupby.py#L1657
  34. no-member:
    Method '_obj_with_exclusions' has no 'ndim' member
    https://github.com/pandas-dev/pandas/blob/61d2056e4251b8d1c387f2577f0407062b9ab903/pandas/core/groupby/groupby.py#L1676
  35. no-member:
    Method '_obj_with_exclusions' has no 'name' member
    https://github.com/pandas-dev/pandas/blob/61d2056e4251b8d1c387f2577f0407062b9ab903/pandas/core/groupby/groupby.py#L1678
  36. no-member:
    Method '_obj_with_exclusions' has no 'columns' member
    https://github.com/pandas-dev/pandas/blob/61d2056e4251b8d1c387f2577f0407062b9ab903/pandas/core/groupby/groupby.py#L1680
  37. no-member:
    Method '_obj_with_exclusions' has no 'ndim' member
    https://github.com/pandas-dev/pandas/blob/61d2056e4251b8d1c387f2577f0407062b9ab903/pandas/core/groupby/groupby.py#L1693
  38. no-member:
    Method '_obj_with_exclusions' has no 'to_frame' member
    https://github.com/pandas-dev/pandas/blob/61d2056e4251b8d1c387f2577f0407062b9ab903/pandas/core/groupby/groupby.py#L1693
  39. no-member:
    Method '_obj_with_exclusions' has no 'index' member
    https://github.com/pandas-dev/pandas/blob/61d2056e4251b8d1c387f2577f0407062b9ab903/pandas/core/groupby/groupby.py#L1711
  40. no-member:
    Method '_obj_with_exclusions' has no 'ndim' member
    https://github.com/pandas-dev/pandas/blob/61d2056e4251b8d1c387f2577f0407062b9ab903/pandas/core/groupby/groupby.py#L1712
  41. no-member:
    Method '_obj_with_exclusions' has no 'name' member
    https://github.com/pandas-dev/pandas/blob/61d2056e4251b8d1c387f2577f0407062b9ab903/pandas/core/groupby/groupby.py#L1713
  42. no-member:
    Method '_obj_with_exclusions' has no 'columns' member
    https://github.com/pandas-dev/pandas/blob/61d2056e4251b8d1c387f2577f0407062b9ab903/pandas/core/groupby/groupby.py#L1716
  43. no-member:
    Method '_obj_with_exclusions' has no '_constructor' member
    https://github.com/pandas-dev/pandas/blob/61d2056e4251b8d1c387f2577f0407062b9ab903/pandas/core/groupby/groupby.py#L1717
  44. no-member:
    Method '_obj_with_exclusions' has no 'ndim' member
    https://github.com/pandas-dev/pandas/blob/61d2056e4251b8d1c387f2577f0407062b9ab903/pandas/core/groupby/groupby.py#L1729
  45. no-member:
    Method '_obj_with_exclusions' has no 'to_frame' member
    https://github.com/pandas-dev/pandas/blob/61d2056e4251b8d1c387f2577f0407062b9ab903/pandas/core/groupby/groupby.py#L1729
  46. no-member:
    Method '_obj_with_exclusions' has no 'ndim' member
    https://github.com/pandas-dev/pandas/blob/61d2056e4251b8d1c387f2577f0407062b9ab903/pandas/core/groupby/groupby.py#L1745
  47. no-member:
    Method '_obj_with_exclusions' has no 'name' member
    https://github.com/pandas-dev/pandas/blob/61d2056e4251b8d1c387f2577f0407062b9ab903/pandas/core/groupby/groupby.py#L1746
  48. no-member:
    Method '_obj_with_exclusions' has no 'columns' member
    https://github.com/pandas-dev/pandas/blob/61d2056e4251b8d1c387f2577f0407062b9ab903/pandas/core/groupby/groupby.py#L1749
  49. no-member:
    Method '_obj_with_exclusions' has no '_constructor' member
    https://github.com/pandas-dev/pandas/blob/61d2056e4251b8d1c387f2577f0407062b9ab903/pandas/core/groupby/groupby.py#L1750
  50. no-member:
    Method '_selected_obj' has no 'shape' member
    https://github.com/pandas-dev/pandas/blob/61d2056e4251b8d1c387f2577f0407062b9ab903/pandas/core/groupby/groupby.py#L1807
  51. no-member:
    Method '_obj_with_exclusions' has no 'shape' member
    https://github.com/pandas-dev/pandas/blob/61d2056e4251b8d1c387f2577f0407062b9ab903/pandas/core/groupby/groupby.py#L1807
  52. no-member:
    Method '_obj_with_exclusions' has no '_constructor' member
    https://github.com/pandas-dev/pandas/blob/61d2056e4251b8d1c387f2577f0407062b9ab903/pandas/core/groupby/groupby.py#L2039
  53. no-member:
    Method '_obj_with_exclusions' has no 'index' member
    https://github.com/pandas-dev/pandas/blob/61d2056e4251b8d1c387f2577f0407062b9ab903/pandas/core/groupby/groupby.py#L2039
  54. no-member:
    Method '_obj_with_exclusions' has no 'name' member
    https://github.com/pandas-dev/pandas/blob/61d2056e4251b8d1c387f2577f0407062b9ab903/pandas/core/groupby/groupby.py#L2039
  55. no-member:
    Method '_obj_with_exclusions' has no '_get_axis' member
    https://github.com/pandas-dev/pandas/blob/61d2056e4251b8d1c387f2577f0407062b9ab903/pandas/core/groupby/groupby.py#L2050
  56. no-member:
    Method '_selected_obj' has no 'take' member
    https://github.com/pandas-dev/pandas/blob/61d2056e4251b8d1c387f2577f0407062b9ab903/pandas/core/groupby/groupby.py#L2063
  57. no-member:
    Method '_selected_obj' has no 'index' member
    https://github.com/pandas-dev/pandas/blob/61d2056e4251b8d1c387f2577f0407062b9ab903/pandas/core/groupby/groupby.py#L2065
  58. no-member:
    Method '_selected_obj' has no 'shape' member
    https://github.com/pandas-dev/pandas/blob/61d2056e4251b8d1c387f2577f0407062b9ab903/pandas/core/groupby/groupby.py#L2069
  59. no-member:
    Method '_selected_obj' has no 'where' member
    https://github.com/pandas-dev/pandas/blob/61d2056e4251b8d1c387f2577f0407062b9ab903/pandas/core/groupby/groupby.py#L2070
  60. no-member:
    Method '_obj_with_exclusions' has no 'columns' member
    https://github.com/pandas-dev/pandas/blob/61d2056e4251b8d1c387f2577f0407062b9ab903/pandas/core/groupby/groupby.py#L2756
  61. no-member:
    Method '_obj_with_exclusions' has no 'iloc' member
    https://github.com/pandas-dev/pandas/blob/61d2056e4251b8d1c387f2577f0407062b9ab903/pandas/core/groupby/groupby.py#L2776
  62. no-member:
    Method '_obj_with_exclusions' has no 'columns' member
    https://github.com/pandas-dev/pandas/blob/61d2056e4251b8d1c387f2577f0407062b9ab903/pandas/core/groupby/groupby.py#L2777
  63. no-member:
    Method '_selected_obj' has no 'dtype' member
    https://github.com/pandas-dev/pandas/blob/61d2056e4251b8d1c387f2577f0407062b9ab903/pandas/core/groupby/groupby.py#L3493
  64. no-member:
    Method '_selected_obj' has no '_values' member
    https://github.com/pandas-dev/pandas/blob/61d2056e4251b8d1c387f2577f0407062b9ab903/pandas/core/groupby/groupby.py#L3498
  65. no-member:
    Method '_obj_with_exclusions' has no 'describe' member
    https://github.com/pandas-dev/pandas/blob/61d2056e4251b8d1c387f2577f0407062b9ab903/pandas/core/groupby/groupby.py#L3520
  66. no-member:
    Method '_obj_with_exclusions' has no 'ndim' member
    https://github.com/pandas-dev/pandas/blob/61d2056e4251b8d1c387f2577f0407062b9ab903/pandas/core/groupby/groupby.py#L3523
  67. no-member:
    Method '_selected_obj' has no 'dropna' member
    https://github.com/pandas-dev/pandas/blob/61d2056e4251b8d1c387f2577f0407062b9ab903/pandas/core/groupby/groupby.py#L4244
  68. no-member:
    Method '_obj_with_exclusions' has no '_get_axis' member
    https://github.com/pandas-dev/pandas/blob/61d2056e4251b8d1c387f2577f0407062b9ab903/pandas/core/groupby/groupby.py#L4564
  69. no-member:
    Method '_obj_with_exclusions' has no '_get_axis' member
    https://github.com/pandas-dev/pandas/blob/61d2056e4251b8d1c387f2577f0407062b9ab903/pandas/core/groupby/groupby.py#L4638
  70. no-member:
    Method '_selected_obj' has no '_get_numeric_data' member
    https://github.com/pandas-dev/pandas/blob/61d2056e4251b8d1c387f2577f0407062b9ab903/pandas/core/groupby/groupby.py#L4940
  71. no-member:
    Method '_selected_obj' has no '_get_numeric_data' member
    https://github.com/pandas-dev/pandas/blob/61d2056e4251b8d1c387f2577f0407062b9ab903/pandas/core/groupby/groupby.py#L5015
  72. no-member:
    Method '_obj_with_exclusions' has no '_reindex_with_indexers' member
    https://github.com/pandas-dev/pandas/blob/61d2056e4251b8d1c387f2577f0407062b9ab903/pandas/core/groupby/groupby.py#L5159
  73. no-member:
    Method '_obj_with_exclusions' has no 'axes' member
    https://github.com/pandas-dev/pandas/blob/61d2056e4251b8d1c387f2577f0407062b9ab903/pandas/core/groupby/groupby.py#L5160
  74. no-member:
    Method '_obj_with_exclusions' has no 'ndim' member
    https://github.com/pandas-dev/pandas/blob/61d2056e4251b8d1c387f2577f0407062b9ab903/pandas/core/groupby/groupby.py#L5269
  75. no-member:
    Method '_obj_with_exclusions' has no 'dtype' member
    https://github.com/pandas-dev/pandas/blob/61d2056e4251b8d1c387f2577f0407062b9ab903/pandas/core/groupby/groupby.py#L5270
  76. no-member:
    Method '_obj_with_exclusions' has no 'dtypes' member
    https://github.com/pandas-dev/pandas/blob/61d2056e4251b8d1c387f2577f0407062b9ab903/pandas/core/groupby/groupby.py#L5273
  77. no-member:
    Method '_selected_obj' has no 'iloc' member
    https://github.com/pandas-dev/pandas/blob/61d2056e4251b8d1c387f2577f0407062b9ab903/pandas/core/groupby/groupby.py#L5494
  78. no-member:
    Method '_selected_obj' has no 'empty' member
    https://github.com/pandas-dev/pandas/blob/61d2056e4251b8d1c387f2577f0407062b9ab903/pandas/core/groupby/groupby.py#L5688
  79. no-member:
    Method '_selected_obj' has no 'take' member
    https://github.com/pandas-dev/pandas/blob/61d2056e4251b8d1c387f2577f0407062b9ab903/pandas/core/groupby/groupby.py#L5721
  80. redefined-variable-type:
    Redefinition of df type from pandas.core.frame.DataFrame to pandas.core.groupby.generic.DataFrameGroupBy
    https://github.com/pandas-dev/pandas/blob/61d2056e4251b8d1c387f2577f0407062b9ab903/pandas/tests/frame/test_reductions.py#L1116
  81. redefined-variable-type:
    Redefinition of grouped type from pandas.core.groupby.generic.SeriesGroupBy to pandas.core.groupby.generic.DataFrameGroupBy
    https://github.com/pandas-dev/pandas/blob/61d2056e4251b8d1c387f2577f0407062b9ab903/pandas/tests/groupby/test_filters.py#L78
  82. redefined-variable-type:
    Redefinition of grouped type from pandas.core.groupby.generic.SeriesGroupBy to pandas.core.groupby.generic.DataFrameGroupBy
    https://github.com/pandas-dev/pandas/blob/61d2056e4251b8d1c387f2577f0407062b9ab903/pandas/tests/groupby/test_filters.py#L90
  83. redefined-variable-type:
    Redefinition of grouped type from pandas.core.groupby.generic.SeriesGroupBy to pandas.core.groupby.generic.DataFrameGroupBy
    https://github.com/pandas-dev/pandas/blob/61d2056e4251b8d1c387f2577f0407062b9ab903/pandas/tests/groupby/test_filters.py#L228

The following messages are no longer emitted:

  1. super-init-not-called:
    init method from base class 'PandasObject' is not called
    https://github.com/pandas-dev/pandas/blob/61d2056e4251b8d1c387f2577f0407062b9ab903/pandas/core/resample.py#L1601
  2. too-many-ancestors:
    Too many ancestors (8/7)
    https://github.com/pandas-dev/pandas/blob/61d2056e4251b8d1c387f2577f0407062b9ab903/pandas/core/resample.py#L1831
  3. too-many-ancestors:
    Too many ancestors (9/7)
    https://github.com/pandas-dev/pandas/blob/61d2056e4251b8d1c387f2577f0407062b9ab903/pandas/core/resample.py#L1956
  4. too-many-ancestors:
    Too many ancestors (9/7)
    https://github.com/pandas-dev/pandas/blob/61d2056e4251b8d1c387f2577f0407062b9ab903/pandas/core/resample.py#L1992
  5. missing-function-docstring:
    Missing function or method docstring
    https://github.com/pandas-dev/pandas/blob/61d2056e4251b8d1c387f2577f0407062b9ab903/pandas/core/groupby/generic.py#L227
  6. missing-function-docstring:
    Missing function or method docstring
    https://github.com/pandas-dev/pandas/blob/61d2056e4251b8d1c387f2577f0407062b9ab903/pandas/core/groupby/generic.py#L231
  7. unused-argument:
    Unused argument 'numeric_only'
    https://github.com/pandas-dev/pandas/blob/61d2056e4251b8d1c387f2577f0407062b9ab903/pandas/core/groupby/generic.py#L518
  8. missing-function-docstring:
    Missing function or method docstring
    https://github.com/pandas-dev/pandas/blob/61d2056e4251b8d1c387f2577f0407062b9ab903/pandas/core/groupby/generic.py#L724
  9. missing-function-docstring:
    Missing function or method docstring
    https://github.com/pandas-dev/pandas/blob/61d2056e4251b8d1c387f2577f0407062b9ab903/pandas/core/groupby/generic.py#L1434

Effect on sentry:
The following messages are now emitted:

  1. arguments-renamed:
    Parameter 'instance_id' has been renamed to 'user' in overriding 'UserOptionManager._make_key' method
    https://github.com/getsentry/sentry/blob/0706460dd4f27edfef7429ba76f4357bc94b6db6/src/sentry/models/options/user_option.py#L24
  2. assignment-from-none:
    Assigning result of a function call, where the function returns None
    https://github.com/getsentry/sentry/blob/0706460dd4f27edfef7429ba76f4357bc94b6db6/src/sentry/plugins/helpers.py#L25
  3. assignment-from-none:
    Assigning result of a function call, where the function returns None
    https://github.com/getsentry/sentry/blob/0706460dd4f27edfef7429ba76f4357bc94b6db6/src/sentry/plugins/helpers.py#L53
  4. assignment-from-no-return:
    Assigning result of a function call, where the function has no return
    https://github.com/getsentry/sentry/blob/0706460dd4f27edfef7429ba76f4357bc94b6db6/src/sentry/plugins/helpers.py#L55

The following messages are no longer emitted:

  1. missing-function-docstring:
    Missing function or method docstring
    https://github.com/getsentry/sentry/blob/0706460dd4f27edfef7429ba76f4357bc94b6db6/src/sentry/models/options/organization_option.py#L83
  2. unused-argument:
    Unused argument 'kwargs'
    https://github.com/getsentry/sentry/blob/0706460dd4f27edfef7429ba76f4357bc94b6db6/src/sentry/models/options/organization_option.py#L83
  3. missing-function-docstring:
    Missing function or method docstring
    https://github.com/getsentry/sentry/blob/0706460dd4f27edfef7429ba76f4357bc94b6db6/src/sentry/models/options/organization_option.py#L86
  4. unused-argument:
    Unused argument 'kwargs'
    https://github.com/getsentry/sentry/blob/0706460dd4f27edfef7429ba76f4357bc94b6db6/src/sentry/models/options/organization_option.py#L86
  5. missing-function-docstring:
    Missing function or method docstring
    https://github.com/getsentry/sentry/blob/0706460dd4f27edfef7429ba76f4357bc94b6db6/src/sentry/models/options/project_option.py#L134
  6. unused-argument:
    Unused argument 'kwargs'
    https://github.com/getsentry/sentry/blob/0706460dd4f27edfef7429ba76f4357bc94b6db6/src/sentry/models/options/project_option.py#L134
  7. missing-function-docstring:
    Missing function or method docstring
    https://github.com/getsentry/sentry/blob/0706460dd4f27edfef7429ba76f4357bc94b6db6/src/sentry/models/options/project_option.py#L137
  8. unused-argument:
    Unused argument 'kwargs'
    https://github.com/getsentry/sentry/blob/0706460dd4f27edfef7429ba76f4357bc94b6db6/src/sentry/models/options/project_option.py#L137
  9. missing-function-docstring:
    Missing function or method docstring
    https://github.com/getsentry/sentry/blob/0706460dd4f27edfef7429ba76f4357bc94b6db6/src/sentry/models/options/user_option.py#L128
  10. unused-argument:
    Unused argument 'kwargs'
    https://github.com/getsentry/sentry/blob/0706460dd4f27edfef7429ba76f4357bc94b6db6/src/sentry/models/options/user_option.py#L128
  11. missing-function-docstring:
    Missing function or method docstring
    https://github.com/getsentry/sentry/blob/0706460dd4f27edfef7429ba76f4357bc94b6db6/src/sentry/models/options/user_option.py#L133
  12. unused-argument:
    Unused argument 'kwargs'
    https://github.com/getsentry/sentry/blob/0706460dd4f27edfef7429ba76f4357bc94b6db6/src/sentry/models/options/user_option.py#L133
  13. too-few-public-methods:
    Too few public methods (0/2)
    https://github.com/getsentry/sentry/blob/0706460dd4f27edfef7429ba76f4357bc94b6db6/src/sentry/replays/lib/new_query/fields.py#L123

Effect on psycopg:
The following messages are now emitted:

  1. not-async-context-manager:
    Async context manager 'NoneType' doesn't implement aenter and aexit.
    https://github.com/psycopg/psycopg/blob/c6dae8dbd69ac791075d4d30aea4a1041646a187/psycopg/psycopg/connection_async.py#L426
  2. not-context-manager:
    Context manager 'NoneType' doesn't implement enter and exit.
    https://github.com/psycopg/psycopg/blob/c6dae8dbd69ac791075d4d30aea4a1041646a187/psycopg/psycopg/connection.py#L1036

The following messages are no longer emitted:

  1. missing-function-docstring:
    Missing function or method docstring
    https://github.com/psycopg/psycopg/blob/c6dae8dbd69ac791075d4d30aea4a1041646a187/psycopg/psycopg/crdb/connection.py#L145

This comment was generated for commit 8ed99d6

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.

Primer is non trivial to review, need to understand if it's change in the primed repo or due to astroid upgrade.

@jacobtylerwalls
Copy link
Member

Primer is non trivial to review, need to understand if it's change in the primed repo or due to astroid upgrade.

Mixture of astroid upgrade and πŸ€·β€β™‚οΈ. The homeassistant/music21/pandas changes are same as in #9065. The others aren't. I have faith that we're making things less flaky overall, but I wouldn't say we've defeated flakiness (pylint-dev/astroid#2273 is outstanding).

@jacobtylerwalls
Copy link
Member

jacobtylerwalls commented Sep 28, 2023

or due to astroid upgrade.

Oh, did you mean just this branch's upgrade from 3.0 beta to 3.0 final? I don't think there was anything substantive there for these primer results. If you search the closed PRs for some of the variable names mentioned in these primer messages like "ksIter" from music21 you'll see that they're frequent flyers ✈️ . EDIT: aha, there was! See #9071 (comment).

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.

Thank you for the insight @jacobtylerwalls. I think the fix to #8998 will help us to make this review easier in the future by separating bleeding edge and upgrade.

I'm worried about pandas in particular (lots of new no-members FP). They do not seems to be due to changes on the bleeding edge repo we use (https://github.com/pandas-dev/pandas/blame/61d2056e4251b8d1c387f2577f0407062b9ab903/pandas/core/resample.py#L387 was modified 7 months ago and just appeared). I don't see anything obvious that we changed between the last alpha of astroid and now that could be the cause though.

@jacobtylerwalls
Copy link
Member

I don't see anything obvious that we changed between the last alpha of astroid and now that could be the cause though.

Actually this is due to the change from 3.0b to 3.0 final. You can reproduce with:

python3.11 -m pylint tests/.pylint_primer_tests/pandas-dev/pandas/pandas/core/resample.py --disable=all --enable=no-member

Before pylint-dev/astroid@89dfb485:

************* Module pandas.core.resample
tests/.pylint_primer_tests/pandas-dev/pandas/pandas/core/resample.py:387:15: E1101: Method '_selected_obj' has no 'groupby' member (no-member)
tests/.pylint_primer_tests/pandas-dev/pandas/pandas/core/resample.py:1484:18: E1101: Method '_obj_with_exclusions' has no 'copy' member (no-member)
tests/.pylint_primer_tests/pandas-dev/pandas/pandas/core/resample.py:1520:15: E1101: Method '_selected_obj' has no 'ndim' member (no-member)
tests/.pylint_primer_tests/pandas-dev/pandas/pandas/core/resample.py:1521:23: E1101: Method '_selected_obj' has no 'name' member (no-member)
tests/.pylint_primer_tests/pandas-dev/pandas/pandas/core/resample.py:1531:15: E1101: Method '_selected_obj' has no 'ndim' member (no-member)
tests/.pylint_primer_tests/pandas-dev/pandas/pandas/core/resample.py:1533:64: E1101: Method '_selected_obj' has no 'name' member (no-member)
tests/.pylint_primer_tests/pandas-dev/pandas/pandas/core/resample.py:1641:16: E1101: Instance of '_GroupByMixin' has no '_resampler_cls' member (no-member)
tests/.pylint_primer_tests/pandas-dev/pandas/pandas/core/resample.py:1649:15: E1101: Instance of '_GroupByMixin' has no '_wrap_result' member (no-member)
tests/.pylint_primer_tests/pandas-dev/pandas/pandas/core/resample.py:1728:18: E1101: Method '_obj_with_exclusions' has no 'copy' member (no-member)
tests/.pylint_primer_tests/pandas-dev/pandas/pandas/core/resample.py:1802:21: E1101: Method '_selected_obj' has no 'copy' member (no-member)
tests/.pylint_primer_tests/pandas-dev/pandas/pandas/core/resample.py:1807:21: E1101: Method '_selected_obj' has no 'reindex' member (no-member)

------------------------------------------------------------------
Your code has been rated at 9.24/10 (previous run: 9.45/10, -0.21)

Then pylint-dev/astroid@89dfb485 (astroid 3.0 beta) removes 3 messages:

************* Module pandas.core.resample
tests/.pylint_primer_tests/pandas-dev/pandas/pandas/core/resample.py:1484:18: E1101: Method '_obj_with_exclusions' has no 'copy' member (no-member)
tests/.pylint_primer_tests/pandas-dev/pandas/pandas/core/resample.py:1521:23: E1101: Method '_selected_obj' has no 'name' member (no-member)
tests/.pylint_primer_tests/pandas-dev/pandas/pandas/core/resample.py:1533:64: E1101: Method '_selected_obj' has no 'name' member (no-member)
tests/.pylint_primer_tests/pandas-dev/pandas/pandas/core/resample.py:1641:16: E1101: Instance of '_GroupByMixin' has no '_resampler_cls' member (no-member)
tests/.pylint_primer_tests/pandas-dev/pandas/pandas/core/resample.py:1649:15: E1101: Instance of '_GroupByMixin' has no '_wrap_result' member (no-member)
tests/.pylint_primer_tests/pandas-dev/pandas/pandas/core/resample.py:1728:18: E1101: Method '_obj_with_exclusions' has no 'copy' member (no-member)
tests/.pylint_primer_tests/pandas-dev/pandas/pandas/core/resample.py:1802:21: E1101: Method '_selected_obj' has no 'copy' member (no-member)
tests/.pylint_primer_tests/pandas-dev/pandas/pandas/core/resample.py:1807:21: E1101: Method '_selected_obj' has no 'reindex' member (no-member)

------------------------------------------------------------------
Your code has been rated at 9.45/10 (previous run: 9.24/10, +0.21)

Then astroid 3.0 final reverts, giving the original 11 messages again:

************* Module pandas.core.resample
tests/.pylint_primer_tests/pandas-dev/pandas/pandas/core/resample.py:387:15: E1101: Method '_selected_obj' has no 'groupby' member (no-member)
tests/.pylint_primer_tests/pandas-dev/pandas/pandas/core/resample.py:1484:18: E1101: Method '_obj_with_exclusions' has no 'copy' member (no-member)
tests/.pylint_primer_tests/pandas-dev/pandas/pandas/core/resample.py:1520:15: E1101: Method '_selected_obj' has no 'ndim' member (no-member)
tests/.pylint_primer_tests/pandas-dev/pandas/pandas/core/resample.py:1521:23: E1101: Method '_selected_obj' has no 'name' member (no-member)
tests/.pylint_primer_tests/pandas-dev/pandas/pandas/core/resample.py:1531:15: E1101: Method '_selected_obj' has no 'ndim' member (no-member)
tests/.pylint_primer_tests/pandas-dev/pandas/pandas/core/resample.py:1533:64: E1101: Method '_selected_obj' has no 'name' member (no-member)
tests/.pylint_primer_tests/pandas-dev/pandas/pandas/core/resample.py:1641:16: E1101: Instance of '_GroupByMixin' has no '_resampler_cls' member (no-member)
tests/.pylint_primer_tests/pandas-dev/pandas/pandas/core/resample.py:1649:15: E1101: Instance of '_GroupByMixin' has no '_wrap_result' member (no-member)
tests/.pylint_primer_tests/pandas-dev/pandas/pandas/core/resample.py:1728:18: E1101: Method '_obj_with_exclusions' has no 'copy' member (no-member)
tests/.pylint_primer_tests/pandas-dev/pandas/pandas/core/resample.py:1802:21: E1101: Method '_selected_obj' has no 'copy' member (no-member)
tests/.pylint_primer_tests/pandas-dev/pandas/pandas/core/resample.py:1807:21: E1101: Method '_selected_obj' has no 'reindex' member (no-member)

The reason the messages went away in pylint-dev/astroid@89dfb485 is because inference got worse, and no-member gets shy when things are uninferable:

3.0 beta:

(Pdb) node.expr
<Attribute._selected_obj l.1520 at 0x106b61d90>
(Pdb) node.expr.inferred()
[Uninferable]

versus 3.0 final

(Pdb) node.expr
<Attribute._selected_obj l.1520 at 0x107619e10>
(Pdb) node.expr.inferred()
[<BoundMethod _selected_obj of pandas.core.groupby.groupby.BaseGroupBy at 0x4817398224]

So I think we're good here.

@jacobtylerwalls jacobtylerwalls merged commit 881e6bc into pylint-dev:main Sep 30, 2023
44 checks passed
@jacobtylerwalls
Copy link
Member

I guess going forward we should be careful about backporting things that involve inference changes.

@Pierre-Sassoulas Pierre-Sassoulas removed the Needs backport Needs to be cherry-picked on the current patch version by a pylint's maintainer label Sep 30, 2023
@Pierre-Sassoulas
Copy link
Member

It also seems no-member is not favoring false negatives when the inference fail. I don't think this is what we usually do. Not sure if it can be inverted at this point, primer would need to be very carefully checked if we do that (could be a strong point of pylint for users ?).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Skip news πŸ”‡ This change does not require a changelog entry tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants