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 test for no-member with empty AnnAssign #7632

Merged
merged 2 commits into from Oct 20, 2022

Conversation

cdce8p
Copy link
Member

@cdce8p cdce8p commented Oct 16, 2022

Description

No changelog entry necessary since regression is only present in main and not released yet.

Requires pylint-dev/astroid#1834
Closes #7631

@cdce8p cdce8p added Blocked 🚧 Blocked by a particular issue Needs astroid update Needs an astroid update (probably a release too) before being mergable Skip news 🔇 This change does not require a changelog entry and removed Blocked 🚧 Blocked by a particular issue labels Oct 16, 2022
@Pierre-Sassoulas Pierre-Sassoulas added this to the 2.15.5 milestone Oct 17, 2022
@Pierre-Sassoulas Pierre-Sassoulas added the Needs backport Needs to be cherry-picked on the current patch version by a pylint's maintainer label Oct 17, 2022
@coveralls
Copy link

coveralls commented Oct 19, 2022

Pull Request Test Coverage Report for Build 3284724986

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 95.349%

Totals Coverage Status
Change from base Build 3281355895: 0.0%
Covered Lines: 17137
Relevant Lines: 17973

💛 - Coveralls

@Pierre-Sassoulas
Copy link
Member

The primer failing is expected when astroid change, but the tests should not fail under windows.

@cdce8p
Copy link
Member Author

cdce8p commented Oct 19, 2022

The primer failing is expected when astroid change, but the tests should not fail under windows.

The cache restore on windows doesn't work correctly at the moment. Thus astroid 2.12.11 is reused and the workflow fails. Fix #7652

@cdce8p cdce8p removed the Needs backport Needs to be cherry-picked on the current patch version by a pylint's maintainer label Oct 19, 2022
@cdce8p cdce8p marked this pull request as draft October 19, 2022 20:21
@cdce8p cdce8p marked this pull request as ready for review October 19, 2022 21:02
@github-actions
Copy link
Contributor

🤖 Effect of this PR on checked open source code: 🤖

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

  1. invalid-name:
    Attribute name "ALLOWED_HOSTS" doesn't conform to '[a-z_][a-z0-9_]{2,}$' pattern
    https://github.com/django/django/blob/d62563cbb194c420f242bfced52b37d6638e67c6/django/test/utils.py#L138
  2. invalid-name:
    Attribute name "DEBUG" doesn't conform to '[a-z_][a-z0-9_]{2,}$' pattern
    https://github.com/django/django/blob/d62563cbb194c420f242bfced52b37d6638e67c6/django/test/utils.py#L141
  3. invalid-name:
    Attribute name "EMAIL_BACKEND" doesn't conform to '[a-z_][a-z0-9_]{2,}$' pattern
    https://github.com/django/django/blob/d62563cbb194c420f242bfced52b37d6638e67c6/django/test/utils.py#L144
  4. invalid-name:
    Attribute name "MIGRATION_MODULES" doesn't conform to '[a-z_][a-z0-9_]{2,}$' pattern
    https://github.com/django/django/blob/d62563cbb194c420f242bfced52b37d6638e67c6/django/db/backends/base/creation.py#L72

Effect on pandas:
The following messages are now emitted:

  1. redefined-variable-type:
    Redefinition of expected type from pandas.core.arrays.numpy_.PandasArray to pandas.core.indexes.base.Index
    https://github.com/pandas-dev/pandas/blob/b94f1a18d35ae516587ce9161eaaa5f9a16f505c/pandas/_testing/__init__.py#L277
  2. redefined-variable-type:
    Redefinition of expected type from .ndarray to pandas.core.arrays.period.PeriodArray
    https://github.com/pandas-dev/pandas/blob/b94f1a18d35ae516587ce9161eaaa5f9a16f505c/pandas/tests/arrays/string_/test_string.py#L211
  3. redefined-variable-type:
    Redefinition of expected type from .ndarray to pandas.core.arrays.period.PeriodArray
    https://github.com/pandas-dev/pandas/blob/b94f1a18d35ae516587ce9161eaaa5f9a16f505c/pandas/tests/arrays/string_/test_string.py#L252
  4. redefined-variable-type:
    Redefinition of expected type from pandas.core.arrays.period.PeriodArray to pandas.core.series.Series
    https://github.com/pandas-dev/pandas/blob/b94f1a18d35ae516587ce9161eaaa5f9a16f505c/pandas/tests/arrays/floating/test_function.py#L21
  5. redefined-variable-type:
    Redefinition of expected type from pandas.core.arrays.period.PeriodArray to pandas.core.series.Series
    https://github.com/pandas-dev/pandas/blob/b94f1a18d35ae516587ce9161eaaa5f9a16f505c/pandas/tests/arrays/floating/test_function.py#L36
  6. redefined-variable-type:
    Redefinition of expected type from pandas.core.arrays.period.PeriodArray to pandas.core.arrays.floating.FloatingArray
    https://github.com/pandas-dev/pandas/blob/b94f1a18d35ae516587ce9161eaaa5f9a16f505c/pandas/tests/arrays/floating/test_arithmetic.py#L68
  7. redefined-variable-type:
    Redefinition of res type from pandas.core.arrays.period.PeriodArray to pandas.core.arrays.floating.FloatingArray
    https://github.com/pandas-dev/pandas/blob/b94f1a18d35ae516587ce9161eaaa5f9a16f505c/pandas/tests/arrays/floating/test_construction.py#L142
  8. redefined-variable-type:
    Redefinition of expected type from pandas.core.arrays.period.PeriodArray to pandas.core.series.Series
    https://github.com/pandas-dev/pandas/blob/b94f1a18d35ae516587ce9161eaaa5f9a16f505c/pandas/tests/arrays/integer/test_function.py#L20
  9. redefined-variable-type:
    Redefinition of expected type from pandas.core.arrays.period.PeriodArray to pandas.core.arrays.floating.FloatingArray
    https://github.com/pandas-dev/pandas/blob/b94f1a18d35ae516587ce9161eaaa5f9a16f505c/pandas/tests/arrays/integer/test_arithmetic.py#L117
  10. redefined-variable-type:
    Redefinition of other type from pandas.core.arrays.period.PeriodArray to .ndarray
    https://github.com/pandas-dev/pandas/blob/b94f1a18d35ae516587ce9161eaaa5f9a16f505c/pandas/tests/arrays/boolean/test_comparison.py#L32
  11. redefined-variable-type:
    Redefinition of expected type from pandas.core.arrays.period.PeriodArray to pandas.core.series.Series
    https://github.com/pandas-dev/pandas/blob/b94f1a18d35ae516587ce9161eaaa5f9a16f505c/pandas/tests/arrays/boolean/test_function.py#L21
  12. redefined-variable-type:
    Redefinition of expected type from pandas.core.arrays.period.PeriodArray to pandas.core.series.Series
    https://github.com/pandas-dev/pandas/blob/b94f1a18d35ae516587ce9161eaaa5f9a16f505c/pandas/tests/arrays/boolean/test_function.py#L64
  13. redefined-variable-type:
    Redefinition of expected type from pandas.core.arrays.period.PeriodArray to pandas.core.series.Series
    https://github.com/pandas-dev/pandas/blob/b94f1a18d35ae516587ce9161eaaa5f9a16f505c/pandas/tests/arrays/boolean/test_function.py#L125
  14. redefined-variable-type:
    Redefinition of expected type from pandas.core.arrays.period.PeriodArray to pandas.core.series.Series
    https://github.com/pandas-dev/pandas/blob/b94f1a18d35ae516587ce9161eaaa5f9a16f505c/pandas/tests/arrays/boolean/test_ops.py#L11
  15. redefined-variable-type:
    Redefinition of result type from pandas.core.indexes.datetimes.DatetimeIndex to pandas.core.indexes.multi.MultiIndex
    https://github.com/pandas-dev/pandas/blob/b94f1a18d35ae516587ce9161eaaa5f9a16f505c/pandas/tests/indexes/multi/test_reshape.py#L126
  16. redefined-variable-type:
    Redefinition of expected type from list to pandas.core.arrays.period.PeriodArray
    https://github.com/pandas-dev/pandas/blob/b94f1a18d35ae516587ce9161eaaa5f9a16f505c/pandas/tests/arithmetic/test_datetime64.py#L239
  17. redefined-variable-type:
    Redefinition of indexer type from pandas.core.indexes.numeric.Int64Index to pandas.core.indexes.datetimes.DatetimeIndex
    https://github.com/pandas-dev/pandas/blob/b94f1a18d35ae516587ce9161eaaa5f9a16f505c/pandas/core/algorithms.py#L1428
  18. redefined-variable-type:
    Redefinition of index type from pandas.core.indexes.base.Index to pandas.core.indexes.range.RangeIndex
    https://github.com/pandas-dev/pandas/blob/b94f1a18d35ae516587ce9161eaaa5f9a16f505c/pandas/core/series.py#L464
  19. invalid-name:
    Attribute name "y" doesn't conform to '[a-z_][a-z0-9_]{2,}$' pattern
    https://github.com/pandas-dev/pandas/blob/b94f1a18d35ae516587ce9161eaaa5f9a16f505c/pandas/tests/reshape/test_pivot.py#L1772
  20. redefined-variable-type:
    Redefinition of columns type from pandas.core.indexes.base.Index to pandas.core.indexes.range.RangeIndex
    https://github.com/pandas-dev/pandas/blob/b94f1a18d35ae516587ce9161eaaa5f9a16f505c/pandas/core/internals/construction.py#L850
  21. redefined-variable-type:
    Redefinition of other type from pandas.core.arrays.period.PeriodArray to pandas.core.arrays.interval.IntervalArray
    https://github.com/pandas-dev/pandas/blob/b94f1a18d35ae516587ce9161eaaa5f9a16f505c/pandas/core/arrays/interval.py#L736
  22. redefined-variable-type:
    Redefinition of new_target type from pandas.core.indexes.base.Index to pandas.core.indexes.category.CategoricalIndex
    https://github.com/pandas-dev/pandas/blob/b94f1a18d35ae516587ce9161eaaa5f9a16f505c/pandas/core/indexes/category.py#L442

The following messages are no longer emitted:

  1. redefined-variable-type:
    Redefinition of result type from pandas.core.indexes.base.Index to pandas.core.indexes.multi.MultiIndex
    https://github.com/pandas-dev/pandas/blob/b94f1a18d35ae516587ce9161eaaa5f9a16f505c/pandas/tests/indexes/multi/test_reshape.py#L126
  2. no-member:
    Instance of 'Index' has no 'day_name' member
    https://github.com/pandas-dev/pandas/blob/b94f1a18d35ae516587ce9161eaaa5f9a16f505c/pandas/tests/indexes/datetimes/test_misc.py#L249
  3. no-member:
    Instance of 'Index' has no 'month_name' member
    https://github.com/pandas-dev/pandas/blob/b94f1a18d35ae516587ce9161eaaa5f9a16f505c/pandas/tests/indexes/datetimes/test_misc.py#L274
  4. redefined-variable-type:
    Redefinition of dti type from pandas.core.indexes.datetimes.DatetimeIndex to pandas.core.indexes.base.Index
    https://github.com/pandas-dev/pandas/blob/b94f1a18d35ae516587ce9161eaaa5f9a16f505c/pandas/tests/indexes/datetimes/test_misc.py#L248
  5. redefined-variable-type:
    Redefinition of idx1 type from pandas.core.indexes.period.PeriodIndex to pandas.core.indexes.base.Index
    https://github.com/pandas-dev/pandas/blob/b94f1a18d35ae516587ce9161eaaa5f9a16f505c/pandas/tests/frame/methods/test_set_index.py#L497
  6. invalid-unary-operand-type:
    bad operand type for unary -: IntervalArray
    https://github.com/pandas-dev/pandas/blob/b94f1a18d35ae516587ce9161eaaa5f9a16f505c/pandas/tests/arrays/floating/test_arithmetic.py#L213
  7. invalid-unary-operand-type:
    bad operand type for unary +: IntervalArray
    https://github.com/pandas-dev/pandas/blob/b94f1a18d35ae516587ce9161eaaa5f9a16f505c/pandas/tests/arrays/floating/test_arithmetic.py#L213
  8. invalid-unary-operand-type:
    bad operand type for unary -: IntervalArray
    https://github.com/pandas-dev/pandas/blob/b94f1a18d35ae516587ce9161eaaa5f9a16f505c/pandas/tests/arrays/integer/test_arithmetic.py#L324
  9. invalid-unary-operand-type:
    bad operand type for unary +: IntervalArray
    https://github.com/pandas-dev/pandas/blob/b94f1a18d35ae516587ce9161eaaa5f9a16f505c/pandas/tests/arrays/integer/test_arithmetic.py#L324
  10. redefined-variable-type:
    Redefinition of expected type from pandas.core.series.Series to pandas.core.arrays.period.PeriodArray
    https://github.com/pandas-dev/pandas/blob/b94f1a18d35ae516587ce9161eaaa5f9a16f505c/pandas/tests/arrays/boolean/test_function.py#L28
  11. invalid-unary-operand-type:
    bad operand type for unary ~: IntervalArray
    https://github.com/pandas-dev/pandas/blob/b94f1a18d35ae516587ce9161eaaa5f9a16f505c/pandas/tests/arrays/boolean/test_ops.py#L9
  12. redefined-variable-type:
    Redefinition of expected type from pandas.core.series.Series to pandas.core.frame.DataFrame
    https://github.com/pandas-dev/pandas/blob/b94f1a18d35ae516587ce9161eaaa5f9a16f505c/pandas/tests/arrays/boolean/test_ops.py#L17
  13. redefined-variable-type:
    Redefinition of other type from .ndarray to pandas.core.series.Series
    https://github.com/pandas-dev/pandas/blob/b94f1a18d35ae516587ce9161eaaa5f9a16f505c/pandas/tests/arrays/boolean/test_comparison.py#L34
  14. redefined-variable-type:
    Redefinition of expected type from pandas.core.arrays.period.PeriodArray to pandas.core.indexes.base.Index
    https://github.com/pandas-dev/pandas/blob/b94f1a18d35ae516587ce9161eaaa5f9a16f505c/pandas/_testing/__init__.py#L277
  15. invalid-name:
    Attribute name "y" doesn't conform to '[a-z_][a-z0-9_]{2,}$' pattern
    https://github.com/pandas-dev/pandas/blob/b94f1a18d35ae516587ce9161eaaa5f9a16f505c/pandas/tests/generic/test_frame.py#L136
  16. redefined-variable-type:
    Redefinition of indexer type from pandas.core.indexes.numeric.Int64Index to pandas.core.indexes.base.Index
    https://github.com/pandas-dev/pandas/blob/b94f1a18d35ae516587ce9161eaaa5f9a16f505c/pandas/core/algorithms.py#L1414
  17. redefined-variable-type:
    Redefinition of new_target type from pandas.core.indexes.category.CategoricalIndex to pandas.core.indexes.base.Index
    https://github.com/pandas-dev/pandas/blob/b94f1a18d35ae516587ce9161eaaa5f9a16f505c/pandas/core/indexes/category.py#L455
  18. redefined-variable-type:
    Redefinition of columns type from pandas.core.indexes.range.RangeIndex to pandas.core.indexes.base.Index
    https://github.com/pandas-dev/pandas/blob/b94f1a18d35ae516587ce9161eaaa5f9a16f505c/pandas/core/internals/construction.py#L860

Effect on sentry:
The following messages are now emitted:

  1. redefined-variable-type:
    Redefinition of orgs type from list to dict
    https://github.com/getsentry/sentry/blob/9a420f015781b0f441c33612f5f79ce45f51711a/src/sentry/api/endpoints/relay/project_configs.py#L242

This comment was generated for commit f1c4b99

@cdce8p cdce8p added the Needs backport Needs to be cherry-picked on the current patch version by a pylint's maintainer label Oct 19, 2022
@Pierre-Sassoulas Pierre-Sassoulas merged commit e8ba3eb into pylint-dev:main Oct 20, 2022
@cdce8p cdce8p deleted the regression-test-7631 branch October 20, 2022 06:57
cdce8p added a commit to cdce8p/pylint that referenced this pull request Oct 20, 2022
@cdce8p cdce8p added Backported and removed Needs backport Needs to be cherry-picked on the current patch version by a pylint's maintainer labels Oct 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Backported Needs astroid update Needs an astroid update (probably a release too) before being mergable Skip news 🔇 This change does not require a changelog entry
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Regression no-member with inherited AnnAssign nodes
3 participants