swcarpentry / python-novice-inflammation

Programming with Python
http://swcarpentry.github.io/python-novice-inflammation/
Other
303 stars 781 forks source link

use four spaces for indentation, not two or three #1057

Closed edbennett closed 1 year ago

edbennett commented 1 year ago

I spotted while delivering this lesson that while the convention of using four spaces for indentation is used almost everywhere, one code block in one episode uses two spaces (without any other comment).

This convention is universally adopted enough that I think it's reasonable to use it exclusively. (If we were going to mix conventions then we would want to have a lot more explanation than is currently present.)

Based on this observation, I've systematically checked the full lesson and made all spacing consistent. There is one remaining place where spacing is inconsistent, but this is deliberate to cause an IndentationError in episode 09.

github-actions[bot] commented 1 year ago

Thank you!

Thank you for your pull request :smiley:

:robot: This automated message can help you check the rendered files in your submission for clarity. If you have any questions, please feel free to open an issue in {sandpaper}.

If you have files that automatically render output (e.g. R Markdown), then you should check for the following:

Rendered Changes

:mag: Inspect the changes: https://github.com/swcarpentry/python-novice-inflammation/compare/md-outputs..md-outputs-PR-1057

The following changes were observed in the rendered markdown documents:

 08-func.md                                     |   4 ++--
 12-cmdline.md                                  |  10 +++++-----
 files/code/python-novice-inflammation-code.zip | Bin 7268 -> 7301 bytes
 files/code/readings_05.py                      |   2 +-
 md5sum.txt                                     |   4 ++--
 5 files changed, 10 insertions(+), 10 deletions(-)
What does this mean? If you have source files that require output and figures to be generated (e.g. R Markdown), then it is important to make sure the generated figures and output are reproducible. This output provides a way for you to inspect the output in a diff-friendly manner so that it's easy to see the changes that occur due to new software versions or randomisation.

:stopwatch: Updated at 2023-07-27 13:34:21 +0000