Skip to content

Conversation

agryman
Copy link
Contributor

@agryman agryman commented Jun 20, 2022

PEP 484 specifies that type alias assignments must be simple. The type alias for Matrix was defined in a chained assignment. This broke mypy. I split the chained assignment into two simple assignments.

Refer to issue #23647.

  • matrices
    • Made type aliases for Matrix and MutableMatrix compliant with PEP 484
    • This enables mypy to recognize the type aliases

agryman added 2 commits June 20, 2022 19:19
According to PEP 484, type aliases must use a simple assignment. Matrix was defined in a chained assignment. Change this to two simple assignments. See issue sympy#23647 .
@sympy-bot
Copy link

sympy-bot commented Jun 20, 2022

Hi, I am the SymPy bot (v167). I'm here to help you write a release notes entry. Please read the guide on how to write release notes.

Your release notes are in good order.

Here is what the release notes will look like:

  • matrices
    • Made type aliases for Matrix and MutableMatrix compliant with PEP 484 (#23659 by @agryman)

    • This enables mypy to recognize the type aliases (#23659 by @agryman)

This will be added to https://github.com/sympy/sympy/wiki/Release-Notes-for-1.11.

Click here to see the pull request description that was parsed.
PEP 484 specifies that type alias assignments must be simple. The type alias for Matrix was defined in a chained assignment. This broke mypy. I split the chained assignment into two simple assignments.

Refer to issue #23647.

<!-- BEGIN RELEASE NOTES -->
* matrices
  * Made type aliases for Matrix and MutableMatrix compliant with PEP 484
  * This enables mypy to recognize the type aliases 
<!-- END RELEASE NOTES -->

Update

The release notes on the wiki have been updated.

@github-actions
Copy link

Benchmark results from GitHub Actions

Lower numbers are good, higher numbers are bad. A ratio less than 1
means a speed up and greater than 1 means a slowdown. Green lines
beginning with + are slowdowns (the PR is slower then master or
master is slower than the previous release). Red lines beginning
with - are speedups.

Significantly changed benchmark results (PR vs master)

Significantly changed benchmark results (master vs previous release)

       before           after         ratio
     [77f1d79c]       [3e51f99f]
     <sympy-1.10.1^0>                 
+      98.2±0.7ms          179±1ms     1.82  sum.TimeSum.time_doit

Full benchmark results can be found as artifacts in GitHub Actions
(click on checks at the top of the PR).

@sylee957 sylee957 merged commit 2b784a9 into sympy:master Jun 21, 2022
@agryman agryman deleted the issue-23647-fix-matrix-type-alias branch June 21, 2022 21:27
@agryman agryman mentioned this pull request Jul 8, 2022
44 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants