Skip to content

Conversation

anntzer
Copy link
Contributor

@anntzer anntzer commented Nov 24, 2018

Just to not make me cringe every time I read that file.

Also deprecate the unused decorators.switch_backend decorator (now
replaced by the backend pytest mark).

PR Summary

PR Checklist

  • Has Pytest style unit tests
  • Code is Flake 8 compliant
  • New features are documented, with examples if plot related
  • Documentation is sphinx and numpydoc compliant
  • Added an entry to doc/users/next_whats_new/ if major new feature (follow instructions in README.rst there)
  • Documented in doc/api/api_changes.rst if API changed in a backward-incompatible way

@anntzer anntzer added this to the v3.1 milestone Nov 24, 2018
"Image sizes do not match expected size: {} "
"actual size {}".format(expectedImage.shape, actualImage.shape))
if expected_image.shape != actual_image.shape:
raise _imageComparisonFailure(
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
raise _imageComparisonFailure(
raise ImageComparisonFailure(

"actual size {}".format(expectedImage.shape, actualImage.shape))
if expected_image.shape != actual_image.shape:
raise _imageComparisonFailure(
"_image sizes do not match expected size: {} "
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
"_image sizes do not match expected size: {} "
"Image sizes do not match expected size: {} "

expected_image = np.array(expected_image).astype(float)
actual_image = np.array(actual_image).astype(float)
if expected_image.shape != actual_image.shape:
raise _imageComparisonFailure(
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
raise _imageComparisonFailure(
raise ImageComparisonFailure(

actual_image = np.array(actual_image).astype(float)
if expected_image.shape != actual_image.shape:
raise _imageComparisonFailure(
"_image sizes do not match expected size: {} "
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
"_image sizes do not match expected size: {} "
"Image sizes do not match expected size: {} "

Just to not make me cringe every time I read that file.

Also deprecate the unused decorators.switch_backend decorator (now
replaced by the backend pytest mark).
@anntzer
Copy link
Contributor Author

anntzer commented Nov 24, 2018

fixed, thanks, I guess that's what you get when doing a search replace :p

@jklymak jklymak merged commit 73cb5c7 into matplotlib:master Nov 30, 2018
@anntzer anntzer deleted the pep8 branch April 23, 2019 12:54
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.

3 participants