File: use-comments-for-comments

package info (click to toggle)
python-project-generator 0.12.0-2
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 900 kB
  • sloc: python: 4,198; makefile: 18; sh: 9
file content (26 lines) | stat: -rw-r--r-- 1,555 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
Description: Use comment blocks when appropriate
 The docstring here triggers a Syntax Warning on Python 3.12, which in time
 will be raised to a SyntaxError, due to an invalid escape character.
 .
 When explaining the intracacies of code for developers, use comments.
Author: Nick Morrott <nickm@debian.org>
Forwarded: https://github.com/project-generator/project_generator/pull/511
Last-Update: 2024-02-10
---
--- a/project_generator/init_yaml.py
+++ b/project_generator/init_yaml.py
@@ -54,11 +54,9 @@
                     #get all the folders along the path
                     dirs = relpath.split(os.path.sep)
                     for i in range(1, len(dirs)+1):
-                        """ add all combinations of them, because we don't know how they will be referenced in program files
-                            Example - there is a .h file in the path Here\is\include\include.h
-                            We want to catch any possible combo, so add Here, Here\is, and Here\is\include
-
-                        """
+                        # add all combinations of them, because we don't know how they will be referenced in program files
+                        # Example - there is a .h file in the path Here\is\include\include.h
+                        # We want to catch any possible combo, so add Here, Here\is, and Here\is\include
                         data_dict.append(os.path.normpath(os.path.sep.join(dirs[:i])))
                 else:
                     data_dict.append(os.path.normpath(os.path.join(relpath, filename)))