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 the multiple-statements issue on pypy 3.8 #7945

Merged
merged 3 commits into from
Dec 15, 2022

Conversation

Pierre-Sassoulas
Copy link
Member

Type of Changes

Type
🐛 Bug fix

Description

Problem appeared recently hard to know exactly why because we were using a cached environment for some time before.

@Pierre-Sassoulas Pierre-Sassoulas added Maintenance Discussion or action around maintaining pylint or the dev workflow Skip news 🔇 This change does not require a changelog entry labels Dec 15, 2022
@github-actions

This comment has been minimized.

Pierre-Sassoulas added a commit to Pierre-Sassoulas/pylint that referenced this pull request Dec 15, 2022
In order to help when the target interpreter is not installed locally
and you can't update automatically yourself (pypy/old interpreters
like python 3.7).

Done for: Refs pylint-dev#7945
@Pierre-Sassoulas Pierre-Sassoulas force-pushed the hotfix-pypy3.8 branch 2 times, most recently from 4861eb2 to ede5005 Compare December 15, 2022 11:52
@coveralls
Copy link

coveralls commented Dec 15, 2022

Pull Request Test Coverage Report for Build 3705224338

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • 11 unchanged lines in 1 file lost coverage.
  • Overall coverage decreased (-0.03%) to 95.445%

Files with Coverage Reduction New Missed Lines %
pylint/testutils/lint_module_test.py 11 84.62%
Totals Coverage Status
Change from base Build 3699236593: -0.03%
Covered Lines: 17663
Relevant Lines: 18506

💛 - Coveralls

@GideonBear
Copy link
Contributor

GideonBear commented Dec 15, 2022

It's triggering on some Pass, AnnAssign, Assign and FunctionDef nodes.
I'm assuming the problem is not in the _check_multi_statement_line function (which I edited in the PR), as node.parent.lineno is always one less than the line and node.lineno, indicating that they are not on the same line before being passed into the function.

@github-actions

This comment has been minimized.

@github-actions
Copy link
Contributor

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

Effect on django:
The following messages are now emitted:

  1. too-many-instance-attributes:
    Too many instance attributes (10/7)
    https://github.com/django/django/blob/d44ee518c4c110af25bebdbedbbf9fba04d197aa/django/db/models/expressions.py#L169

The following messages are no longer emitted:

  1. redefined-variable-type:
    Redefinition of field type from django.db.models.fields.related.OneToOneField to django.forms.widgets.Widget
    https://github.com/django/django/blob/d44ee518c4c110af25bebdbedbbf9fba04d197aa/django/db/models/base.py#L346
  2. too-many-instance-attributes:
    Too many instance attributes (9/7)
    https://github.com/django/django/blob/d44ee518c4c110af25bebdbedbbf9fba04d197aa/django/db/models/expressions.py#L169

Effect on music21:
The following messages are now emitted:

  1. too-many-instance-attributes:
    Too many instance attributes (34/20)
    https://github.com/cuthbertLab/music21/blob/cddb10409b934779c8b28999730fce0621fc2f7f/music21/roman.py#L1395
  2. invalid-name:
    Attribute name "id" doesn't conform to '[a-z_][A-Za-z0-9_]{2,30}$' pattern
    https://github.com/cuthbertLab/music21/blob/cddb10409b934779c8b28999730fce0621fc2f7f/music21/prebase.py#L293
  3. suppressed-message:
    Suppressed 'attribute-defined-outside-init' (from line 3193)
    https://github.com/cuthbertLab/music21/blob/cddb10409b934779c8b28999730fce0621fc2f7f/music21/base.py#L3193
  4. suppressed-message:
    Suppressed 'attribute-defined-outside-init' (from line 3264)
    https://github.com/cuthbertLab/music21/blob/cddb10409b934779c8b28999730fce0621fc2f7f/music21/base.py#L3264
  5. suppressed-message:
    Suppressed 'method-hidden' (from line 11486)
    https://github.com/cuthbertLab/music21/blob/cddb10409b934779c8b28999730fce0621fc2f7f/music21/stream/base.py#L11487
  6. redefined-variable-type:
    Redefinition of self.activeInstrument type from music21.instrument.UnpitchedPercussion to music21.instrument.Instrument
    https://github.com/cuthbertLab/music21/blob/cddb10409b934779c8b28999730fce0621fc2f7f/music21/musicxml/xmlToM21.py#L2075

The following messages are no longer emitted:

  1. invalid-name:
    Attribute name "id" doesn't conform to '[a-z_][A-Za-z0-9_]{2,30}$' pattern
    https://github.com/cuthbertLab/music21/blob/cddb10409b934779c8b28999730fce0621fc2f7f/music21/base.py#L576
  2. useless-suppression:
    Useless suppression of 'attribute-defined-outside-init'
    https://github.com/cuthbertLab/music21/blob/cddb10409b934779c8b28999730fce0621fc2f7f/music21/base.py#L3193
  3. useless-suppression:
    Useless suppression of 'attribute-defined-outside-init'
    https://github.com/cuthbertLab/music21/blob/cddb10409b934779c8b28999730fce0621fc2f7f/music21/base.py#L3264
  4. too-many-instance-attributes:
    Too many instance attributes (33/20)
    https://github.com/cuthbertLab/music21/blob/cddb10409b934779c8b28999730fce0621fc2f7f/music21/roman.py#L1395
  5. redefined-variable-type:
    Redefinition of self.previousRn type from django.forms.widgets.Widget to music21.note.Rest
    https://github.com/cuthbertLab/music21/blob/cddb10409b934779c8b28999730fce0621fc2f7f/music21/romanText/translate.py#L795
  6. redefined-variable-type:
    Redefinition of self.previousChordInMeasure type from django.forms.widgets.Widget to music21.note.Rest
    https://github.com/cuthbertLab/music21/blob/cddb10409b934779c8b28999730fce0621fc2f7f/music21/romanText/translate.py#L794
  7. redefined-variable-type:
    Redefinition of lastChord type from music21.chord.Chord to django.forms.widgets.Widget
    https://github.com/cuthbertLab/music21/blob/cddb10409b934779c8b28999730fce0621fc2f7f/music21/analysis/neoRiemannian.py#L435
  8. useless-suppression:
    Useless suppression of 'method-hidden'
    https://github.com/cuthbertLab/music21/blob/cddb10409b934779c8b28999730fce0621fc2f7f/music21/stream/base.py#L11486
  9. redefined-variable-type:
    Redefinition of self.activeInstrument type from django.forms.widgets.Widget to music21.instrument.Instrument
    https://github.com/cuthbertLab/music21/blob/cddb10409b934779c8b28999730fce0621fc2f7f/music21/musicxml/xmlToM21.py#L2075

Effect on pandas:
The following messages are now emitted:

  1. not-an-iterable:
    Non-iterable value index.values is used in an iterating context
    https://github.com/pandas-dev/pandas/blob/bf5ee72d5b81962db91fa12f637b4369d3e30f77/pandas/tests/indexing/multiindex/test_sorted.py#L146

The following messages are no longer emitted:

  1. redefined-variable-type:
    Redefinition of expected type from tuple to pandas.core.series.Series
    https://github.com/pandas-dev/pandas/blob/bf5ee72d5b81962db91fa12f637b4369d3e30f77/pandas/tests/series/methods/test_astype.py#L499

This comment was generated for commit c21c6c9

Copy link
Collaborator

@DanielNoord DanielNoord left a comment

Choose a reason for hiding this comment

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

I don't really understand this PR? Are all these formatting changes necessary for PyPy to pass?

@Pierre-Sassoulas
Copy link
Member Author

I formatted the disable because as I added 3 new lines I had to regenerate the output anyway, might as well clean up a little.

@DanielNoord
Copy link
Collaborator

But there are also multiple file moves right? What's is the actual fix the unblock CI?

Pierre-Sassoulas added a commit that referenced this pull request Dec 15, 2022
In order to help when the target interpreter is not installed locally
and you can't update automatically yourself (pypy/old interpreters
like python 3.7).

Done for: Refs #7945
@Pierre-Sassoulas
Copy link
Member Author

814ae24 (There might be little bit of fix in the moved files from the two previous commit which is why I did not separate them).

@Pierre-Sassoulas Pierre-Sassoulas merged commit 117956a into pylint-dev:main Dec 15, 2022
@Pierre-Sassoulas Pierre-Sassoulas deleted the hotfix-pypy3.8 branch December 15, 2022 22:07
Pierre-Sassoulas added a commit to Pierre-Sassoulas/pylint that referenced this pull request Dec 15, 2022
…t-dev#7948)

In order to help when the target interpreter is not installed locally
and you can't update automatically yourself (pypy/old interpreters
like python 3.7).

Done for: Refs pylint-dev#7945
Pierre-Sassoulas added a commit to Pierre-Sassoulas/pylint that referenced this pull request Dec 15, 2022
…t-dev#7948)

In order to help when the target interpreter is not installed locally
and you can't update automatically yourself (pypy/old interpreters
like python 3.7).

Done for: Refs pylint-dev#7945
Pierre-Sassoulas added a commit that referenced this pull request Dec 15, 2022
In order to help when the target interpreter is not installed locally
and you can't update automatically yourself (pypy/old interpreters
like python 3.7).

Done for: Refs #7945
@jacobtylerwalls jacobtylerwalls removed the request for review from cdce8p July 10, 2023 12:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Maintenance Discussion or action around maintaining pylint or the dev workflow Skip news 🔇 This change does not require a changelog entry
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants