Skip to content

Clarify code indents #2

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 3 commits into from Sep 7, 2017
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,14 @@ Then, construct the thermometer class:

# Do one reading
with busio.I2C(SCL, SDA) as i2c:
t = adafruit_mcp9808.MCP9808(i2c)
t = adafruit_mcp9808.MCP9808(i2c)

Finally, read the temperature property.

.. code-block:: python

# and print it out
print(t.temperature)
# and print it out
Copy link
Member

Choose a reason for hiding this comment

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

Please indent this too. It should match the code around it.

Copy link
Author

Choose a reason for hiding this comment

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

Hmm. Adding four spaces to the comment seems to cause the code block to ignore the spaces in both lines. Please ignore the amended pull request for now and let me look into how to fix that.

Copy link
Member

Choose a reason for hiding this comment

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

Oh weird! Maybe the blocks should just be merged together? Thanks for figuring this out!

Copy link
Author

Choose a reason for hiding this comment

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

I think that would be the simplest solution. A quick web search shows that this is something people have run into before and there doesn't appear to be an elegant solution. reST gobbles spaces when all lines have the same indent. I'll amend the pull request.

print(t.temperature)


API Reference
Expand Down