From 20962cbc7ae5b3d0a5ba53e6d3360a02e07e750c Mon Sep 17 00:00:00 2001 From: ks129 <45097959+ks129@users.noreply.github.com> Date: Fri, 9 Jul 2021 00:31:39 +0300 Subject: Split comments paragraphs to even smaller paragraphs --- .../pages/code-jams/the-code-style-guide.html | 30 ++++++++++++++-------- 1 file changed, 20 insertions(+), 10 deletions(-) (limited to 'pydis_site') diff --git a/pydis_site/templates/events/pages/code-jams/the-code-style-guide.html b/pydis_site/templates/events/pages/code-jams/the-code-style-guide.html index d3359ebb..68423dde 100644 --- a/pydis_site/templates/events/pages/code-jams/the-code-style-guide.html +++ b/pydis_site/templates/events/pages/code-jams/the-code-style-guide.html @@ -197,10 +197,15 @@ from pathlib import Path # Here starts a new important paragraph.
  • - Inline comments: You should prefer block comments over inline comments and use inline comments only where it is really necessary. - Never use inline comments to explain obvious things like what a line does. If you want to use an inline comment on a variable, think first, - maybe you can use a better variable name instead. After code and before the start of inline comments should be at least two spaces. - Just like block comments, inline comments also have to start with # followed by a single space. +

    + Inline comments: You should prefer block comments over inline comments and use inline comments only where it is really necessary. + Never use inline comments to explain obvious things like what a line does. +

    +

    If you want to use an inline comment on a variable, think first, maybe you can use a better variable name instead.

    +

    + After code and before the start of inline comments should be at least two spaces. + Just like block comments, inline comments also have to start with # followed by a single space. +

    # Do not use inline comments to explain things
     # that the reader can understand even without the inline comment.
     my_variable = "Value!"  # Assign value to my_variable
    @@ -214,12 +219,17 @@ shop_name = "Walmart"
     x = x + 1  # Compensate for border
  • - Docstrings: Last, but not least important comment type is docstring, which is a short version of documentation string. - Docstring rules haven't been defined by PEP 8, but by PEP 257 instead. - Docstrings should start and end with three quotes ("""). There are two types of docstrings: one-line docstrings and multiline docstrings. - One-line docstrings have to start and end in the same line, while multiline docstrings start and end in different lines. - Multiline docstring has two parts: summary line and a longer description, which are separated by one empty line. - The multiline sentence start and end quotes should be at different lines than the content. +

    + Docstrings: Last, but not least important comment type is docstring, which is a short version of documentation string. + Docstring rules haven't been defined by PEP 8, but by PEP 257 instead. + Docstrings should start and end with three quotes ("""). +

    +

    There are two types of docstrings: one-line docstrings and multiline docstrings.

    +

    + One-line docstrings have to start and end in the same line, while multiline docstrings start and end in different lines. + Multiline docstring has two parts: summary line and a longer description, which are separated by one empty line. + The multiline docstring start and end quotes should be at different lines than the content. +

    # This is a one-line docstring.
     """This is one line module docstring."""
     
    -- 
    cgit v1.2.3