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 dataobject repr #3786

Merged
merged 1 commit into from
Jan 6, 2023
Merged

Fix dataobject repr #3786

merged 1 commit into from
Jan 6, 2023

Conversation

akaszynski
Copy link
Member

Simple fix: use spaces rather than tabs in our __repr__ for pyvista.DataObject.

Reasoning: When copying the __repr__, the tabs are often shifted by too little or two much and have to be manually converted when copying them into examples. Using spaces alleviates this issue, and follows PEP8's recommendation:

Spaces are the preferred indentation method

I think that this should be applied to __repr__ as well, and since we should avoid mixing tabs and spaces, this PR proposes to just go with spaces.

@github-actions github-actions bot added the bug Uh-oh! Something isn't working as expected. label Jan 6, 2023
@codecov
Copy link

codecov bot commented Jan 6, 2023

Codecov Report

Merging #3786 (6ab6a40) into main (067b597) will increase coverage by 0.00%.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##             main    #3786   +/-   ##
=======================================
  Coverage   94.08%   94.09%           
=======================================
  Files          83       83           
  Lines       18679    18686    +7     
=======================================
+ Hits        17575    17582    +7     
  Misses       1104     1104           

@akaszynski akaszynski merged commit 905044f into main Jan 6, 2023
@akaszynski akaszynski deleted the fix/improve-repr branch January 6, 2023 19:07
larsoner added a commit to larsoner/pyvista that referenced this pull request Jan 6, 2023
* upstream/main:
  Add color cyclers for `add_mesh(..., color=True)` (pyvista#3739)
  fix dataobject repr (pyvista#3786)
@banesullivan banesullivan mentioned this pull request Feb 1, 2023
5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Uh-oh! Something isn't working as expected.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants