From 2c156a46e4bdae22a973a3ad70368d4d43f94ec0 Mon Sep 17 00:00:00 2001
From: ks129 <45097959+ks129@users.noreply.github.com>
Date: Fri, 9 Jul 2021 14:58:47 +0300
Subject: Move comment types from tags to
---
.../events/pages/code-jams/code-style-guide.html | 15 ++++++++++-----
1 file changed, 10 insertions(+), 5 deletions(-)
(limited to 'pydis_site')
diff --git a/pydis_site/templates/events/pages/code-jams/code-style-guide.html b/pydis_site/templates/events/pages/code-jams/code-style-guide.html
index f691d067..0d948cbc 100644
--- a/pydis_site/templates/events/pages/code-jams/code-style-guide.html
+++ b/pydis_site/templates/events/pages/code-jams/code-style-guide.html
@@ -188,17 +188,21 @@ from pathlib import Path
There are three types of comments:
#
what should be followed by a single space,
- except for text indention inside the comment. To separate paragraphs, use one line containing only #
.
+
+ Probably most common comment type. Should be indented to the same level as the code they describe.
+ Each line in the block comment has to start with #
what should be followed by a single space,
+ except for text indention inside the comment. To separate paragraphs, use one line containing only #
.
+
if variable is None or variable == 1:
# If variable is None, something went wrong previously.
#
# 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. + 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.
@@ -219,8 +223,9 @@ 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. + 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 (""").
-- cgit v1.2.3