Skip to content

MNT: rename internal variable #16425

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

Merged
merged 1 commit into from
Feb 7, 2020

Conversation

tacaswell
Copy link
Member

PR Summary

When I wrote this code ~4.5 years ago I was a bit cranky and used a
very sarcastic variable name (snowflake) to handle a class of special
cases when parsing math text. It has recently come to light that this
name can make it into user visible error messages. This renames the
variable to a less sarcastic and more descriptive variable name (it
handles the case of symbols who's names start with a valid accent; we
should parse it as the symbol, not an accent on the rest of the symbol
name).

PR Checklist

  • Has Pytest style unit tests
  • Code is Flake 8 compliant

@tacaswell tacaswell added this to the v3.3.0 milestone Feb 6, 2020
@tacaswell tacaswell force-pushed the mnt_rename_internals branch from 49b95c4 to 6d99af6 Compare February 6, 2020 19:36
@codecov
Copy link

codecov bot commented Feb 6, 2020

Codecov Report

Merging #16425 into master will decrease coverage by 0.30%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #16425      +/-   ##
==========================================
- Coverage   80.85%   80.54%   -0.31%     
==========================================
  Files         307      307              
  Lines       75745    74407    -1338     
  Branches     9690     9688       -2     
==========================================
- Hits        61245    59933    -1312     
+ Misses      11961    11934      -27     
- Partials     2539     2540       +1     
Impacted Files Coverage Δ
lib/matplotlib/testing/jpl_units/StrConverter.py 15.55% <0.00%> (-5.28%) ⬇️
lib/matplotlib/testing/jpl_units/EpochConverter.py 69.69% <0.00%> (-4.67%) ⬇️
lib/matplotlib/docstring.py 65.00% <0.00%> (-3.19%) ⬇️
...b/matplotlib/testing/jpl_units/UnitDblConverter.py 65.85% <0.00%> (-2.33%) ⬇️
lib/matplotlib/backend_managers.py 20.95% <0.00%> (-2.30%) ⬇️
lib/matplotlib/pyplot.py 71.72% <0.00%> (-1.18%) ⬇️
lib/matplotlib/animation.py 66.71% <0.00%> (-1.08%) ⬇️
lib/matplotlib/units.py 88.57% <0.00%> (-1.04%) ⬇️
lib/matplotlib/backends/backend_webagg.py 59.14% <0.00%> (-0.98%) ⬇️
lib/matplotlib/backend_tools.py 32.57% <0.00%> (-0.94%) ⬇️
... and 152 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e4dbf4e...9a7ddd3. Read the comment docs.

When I wrote this code ~4.5 years ago I was a bit cranky and used a
very sarcastic variable name (snowflake) to handle a class of special
cases when parsing math text.  It has recently come to light that this
name can make it into user visible error messages.  This renames the
variable to a less sarcastic and more descriptive variable name (it
handles the case of symbols who's names start with a valid accent; we
should parse it as the symbol, not an accent on the rest of the symbol
name).
@tacaswell tacaswell force-pushed the mnt_rename_internals branch from 6d99af6 to 9a7ddd3 Compare February 6, 2020 20:56
Copy link
Member

@dstansby dstansby left a comment

Choose a reason for hiding this comment

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

if CI passes

@timhoffm timhoffm merged commit fa21675 into matplotlib:master Feb 7, 2020
@tacaswell tacaswell deleted the mnt_rename_internals branch February 7, 2020 22:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants