We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Create Indentation aspects under Formatting.Spacing
Create an aspects named `Indentation` in files `Formatting.py`. The new aspects should have fullname of `root.Formatting.Spacing.Indentation`. It should have atleast the following taste:

- `indent_type` - what type of indentation used, could be `tab` or `space`
- `indent_size` - number of spaces per indentation level

--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `coalib/bearlib/aspects/Formatting.py`
Content:
```
1 from coalib.bearlib.aspects import Root, Taste
2 
3 
4 @Root.subaspect
5 class Formatting:
6     """
7     The visual appearance of source code.
8     """
9     class docs:
10         example = """
11         # Here is an example of Python code with lots of
12         # formatting issues including: trailing spaces, missing spaces
13         # around operators, strange and inconsistent indentation etc.
14 
15         z = 'hello'+'world'
16              def f ( a):
17                 pass
18         """
19         example_language = 'Python'
20         importance_reason = """
21         A coding style (the of rules or guidelines used when writing the
22         source code) can drastically affect the readability, and
23         maintainability of a program and might as well introduce bugs.
24         """
25         fix_suggestions = """
26         Defining a clearly and thoughtful coding style (based on the available
27         ones given the programming language in use) and strictly respect it or
28         apply it through out the implementation of a project.
29         """
30 
31 
32 @Formatting.subaspect
33 class Length:
34     """
35     Hold sub-aspects for file and line length.
36     """
37     class docs:
38         example = """
39         # We assume that the maximum number of characters per line is 10
40         # and that the maximum number of lines per files is 3.
41 
42         def run(bear, file, filename, aspectlist):
43             return bear.run(file, filename, aspectlist)
44         """
45         example_language = 'Python'
46         importance_reason = """
47         Too long lines of code and too large files result in code difficult to
48         read, understand and maintain.
49         """
50         fix_suggestions = """
51         Length issues can be fixed by writing shorter lines of code (splitting
52         long lines into multiple shorter lines); writing shorter files
53         (splitting files into modules, writing shorter methods and classes.).
54         """
55 
56 
57 @Length.subaspect
58 class LineLength:
59     """
60     Number of characters found in a line of code.
61     """
62     class docs:
63         example = """
64         print('The length of this line is 38')
65         """
66         example_langague = 'Python'
67         importance_reason = """
68         Too long lines make code very difficult to read and maintain.
69         """
70         fix_suggestions = """
71         Splitting long lines of code into multiple shorter lines whenever
72         possible. Avoiding the usage of in-line language specific constructs
73         whenever they result in too long lines.
74         """
75     max_line_length = Taste[int](
76         'Maximum number of character for a line.',
77         (79, 80, 100, 120, 160), default=80)
78 
79 
80 @Length.subaspect
81 class FileLength:
82     """
83     Number of lines found in a file.
84     """
85     class docs:
86         example = """
87         # This file would be a large file if we assume that the max number of
88         # lines per file is 10
89 
90         class Node:
91             def __init__(self, value, left_most_child, left_sibling):
92                 self.value=value
93                 self.left_most_child=left_most_child
94                 self.left_sibling=left_sibling
95 
96         # This is example is just showing what this aspect is about, because
97         # the max number of lines per file is usually 999.
98         """
99         example_language = 'Python 3'
100         importance_reason = """
101         Too long programs (or files) are difficult to read, maintain and
102         understand.
103         """
104         fix_suggestions = """
105         Splitting files into modules, writing shorter methods and classes.
106         """
107     max_file_length = Taste[int](
108         'Maximum number of line for a file',
109         (999,), default=999)
110 
111 
112 @Formatting.subaspect
113 class Spacing:
114     """
115     All whitespace found between non-whitespace characters.
116     """
117     class docs:
118         example = """
119         # Here is an example of code with spacing issues including
120         # unnecessary blank lines and missing space around operators.
121 
122 
123 
124         def func(   ):
125            return      37*-+2
126         """
127         example_language = 'Python'
128         importance_reason = """
129         Useless spacing affects the readability and maintainability of a code.
130         """
131         fix_suggestions = """
132         Removing the trailing spaces and the meaningless blank lines.
133         """
134 
135 
136 @Spacing.subaspect
137 class TrailingSpace:
138     """
139     Unnecessary whitespace at end of a line.
140 
141     Trailing space is all whitespace found after the last non-whitespace
142     character on the line until the newline. This includes tabs "\\\\t",
143     blank lines, blanks etc.
144     """
145     class docs:
146         example = """
147         def func( a ):
148               pass
149 
150         """.replace('\n', '\t\n')
151         example_language = 'Python'
152         importance_reason = """
153         Trailing spaces make code less readable and maintainable.
154         """
155         fix_suggestions = """
156         Removing the trailing spaces.
157         """
158     allow_trailing_spaces = Taste[bool](
159         'Determines whether or not trailing spaces should be allowed or not.',
160         (True, False), default=False)
161 
162 
163 @Spacing.subaspect
164 class BlankLine:
165     """
166     A line with zero characters.
167     """
168     class docs:
169         example = """
170         name = input('What is your name?')
171 
172 
173         print('Hi, {}'.format(name))
174         """
175         example_language = 'Python 3'
176         importance_reason = """
177         Various programming styles use blank lines in different places.
178         The usage of blank lines affects the readability, maintainability and
179         length of a code i.e blank lines can either make code longer, less
180         readable and maintainable or do the reverse.
181         """
182         fix_suggestions = """
183         Following specific rules about the usage of blank lines: using them
184         only when necessary.
185         """
186 
187 
188 @BlankLine.subaspect
189 class BlankLineAfterDeclaration:
190     """
191     Those found after declarations.
192     """
193     class docs:
194         example = """
195         #include <stdio.h>
196 
197         int main ()
198         {
199           int a;
200           float b;
201 
202           scanf("%d%f", &a, &b);
203           printf("a = %d and b = %f", a, b);
204           return 0;
205         }
206         """
207         example_language = 'C'
208         importance_reason = """
209         Having a specific and reasonable number of blank lines after every
210         block of declarations improves on the readability of the code.
211         """
212         fix_suggestions = """
213         `BlankLintAfterDeclaration` issues can be fixed specifying (and of
214         course using) a reasonable number of blank lines to use after block
215         declaration.
216         """
217     blank_lines_after_declarations = Taste[int](
218         'Represents the number of blank lines after declarations',
219         (0, 1, 2), default=0)
220 
221 
222 @BlankLine.subaspect
223 class BlankLineAfterProcedure:
224     """
225     Those found after procedures or functions.
226     """
227     class docs:
228         example = """
229         #include <stdio.h>
230 
231         void proc(void){
232             printf("this does nothing");
233         } int add(float a, float b){
234             return a + b;
235         }
236         """
237         example_language = 'C'
238         importance_reason = """
239         Having a specific and reasonable number of blank lines after every
240         procedures improves on the readability of the code.
241         """
242         fix_suggestions = """
243         `BlankLintAfterProcedure` issues can be fixed specifying (and of
244         course using) a reasonable number of blank lines to use after
245         procedures' definition.
246         """
247     blank_lines_after_procedures = Taste[int](
248         'Represents the number of blank lines to use after a procedure or'
249         'a function', (0, 1, 2), default=1)
250 
251 
252 @BlankLine.subaspect
253 class BlankLineAfterClass:
254     """
255     Those found after classes' definitions.
256     """
257     class docs:
258         example = """
259         class SomeClass:
260             def __init__(self):
261                 raise RuntimeError('Never instantiate this class')
262 
263 
264         def func():
265             pass
266         """
267         example_language = 'Python 3'
268         importance_reason = """
269         Having a specific number of blank lines after every classes'
270         definitions declarations improves on the readability of the code.
271         """
272         fix_suggestions = """
273         """
274     blank_lines_after_class = Taste[int](
275         'Represents the number of blank lines to use after a class'
276         'definition.', (1, 2), default=2)
277 
278 
279 @BlankLine.subaspect
280 class NewlineAtEOF:
281     """
282     Newline character (usually '\\\\n', aka CR) found at the end of file.
283     """
284     class docs:
285         example = """
286         def do_nothing():
287             pass
288         """ + ('\n')
289         example_language = 'Python'
290         importance_reason = """
291         A text file consists of a series of lines, each of which ends with a
292         newline character (\\\\n). A file that is not empty and does not end
293         with a newline is therefore not a text file.
294 
295         It's not just bad style, it can lead to unexpected behavior, utilities
296         that are supposed to operate on text files may not cope well with files
297         that don't end with a newline.
298         """
299         fix_suggestions = """
300         `NewlineAtEOF` issues can be fixed by simply adding a newline at the
301         end of the file.
302         """
303     newline_at_EOF = Taste[bool](
304         'If ``True``, enforce a newline at End Of File.',
305         (True, False), default=True)
306 
307 
308 @Spacing.subaspect
309 class SpacesAroundOperator:
310     """
311     Spacing around operators.
312     """
313     class docs:
314         example = """
315         def f(a, x):
316             return 37+a[42 -  x]
317         """
318         example_language = 'Python'
319         importance_reason = """
320         Having a specific and reasonable number of whitespace (blank) around
321         operators improves on the readability of the code.
322         """
323         fix_suggestions = """
324         `SpacesAroundOperator` issues can be fixed by simply specifying and
325         the number of whitespace to be used after each operator.
326         """
327     spaces_around_operators = Taste[int](
328         'Represents the number of space to be used around operators.',
329         (0, 1), default=1)
330     spaces_before_colon = Taste[int](
331         'Represents the number of blank spaces before colons.',
332         (0, 1), default=0)
333     spaces_after_colon = Taste[int](
334         'Represents the number of blank spaces after colons.',
335         (0, 1), default=1)
336 
337 
338 @Formatting.subaspect
339 class Quotation:
340     """
341     Quotation mark used for strings and docstrings.
342     """
343     class docs:
344         example = """
345         # Here is an example of code where both '' and "" quotation mark
346         # Are used.
347 
348         string = 'coala is always written with lowercase c.'
349         string = "coala is always written with lowercase c."
350         """
351         example_language = 'Python'
352         importance_reason = """
353         Using the same quotation whenever possible in the code, improve on its
354         readability by introducing consistency.
355         """
356         fix_suggestions = """
357         Choosing a preferred quotation and using it everywhere (if possible).
358         """
359     preferred_quotation = Taste[str](
360         'Represents the preferred quotation',
361         ('\'', '"'), default='\'')
362
```
--- END FILES ---

Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.

Here is an example:

```diff
diff --git a/examples/server_async.py b/examples/server_async.py
--- a/examples/server_async.py
+++ b/examples/server_async.py
@@ -313,4 +313,4 @@
 
 
 if __name__ == "__main__":
-    asyncio.run(run_async_server("."), debug=True)
+    asyncio.run(run_async_server(), debug=True)
diff --git a/examples/server_sync.py b/examples/server_sync.py
--- a/examples/server_sync.py
+++ b/examples/server_sync.py
@@ -313,5 +313,5 @@
 
 
 if __name__ == "__main__":
-    server = run_sync_server(".")
+    server = run_sync_server()
     server.shutdown()

```

diff --git a/coalib/bearlib/aspects/Formatting.py b/coalib/bearlib/aspects/Formatting.py
--- a/coalib/bearlib/aspects/Formatting.py
+++ b/coalib/bearlib/aspects/Formatting.py
@@ -133,6 +133,40 @@
         """
 
 
+@Spacing.subaspect
+class Indentation:
+    """
+    Spaces/tabs used before blocks of code to convey a program's structure.
+    """
+    class docs:
+        example = """
+        # If this code was written on an editor that defined a tab as 2
+        # spaces, mixing tabs and spaces would look like this on a different
+        # editor defining tabs as four spaces.
+
+        def spaces():
+          pass
+
+        def tabs():
+            pass
+        """
+        example_language = 'Python'
+        importance_reason = """
+        Mixing tabs and spaces can cause issues when collaborating on
+        code, as well as during testing and compilation.
+        """
+        fix_suggestions = """
+        Using either tabs or spaces consistently.
+        If using spaces, by using a suitable number of spaces, preferably four.
+        """
+    indent_type = Taste[int](
+        'Represents the type of indent used.',
+        ('tab', 'space'), default='tab')
+    indent_size = Taste[int](
+        'Represents the number of spaces per indentation level.',
+        (2, 3, 4, 5, 6), default=4)
+
+
 @Spacing.subaspect
 class TrailingSpace:
     """

{"golden_diff": "diff --git a/coalib/bearlib/aspects/Formatting.py b/coalib/bearlib/aspects/Formatting.py\n--- a/coalib/bearlib/aspects/Formatting.py\n+++ b/coalib/bearlib/aspects/Formatting.py\n@@ -133,6 +133,40 @@\n         \"\"\"\n \n \n+@Spacing.subaspect\n+class Indentation:\n+    \"\"\"\n+    Spaces/tabs used before blocks of code to convey a program's structure.\n+    \"\"\"\n+    class docs:\n+        example = \"\"\"\n+        # If this code was written on an editor that defined a tab as 2\n+        # spaces, mixing tabs and spaces would look like this on a different\n+        # editor defining tabs as four spaces.\n+\n+        def spaces():\n+          pass\n+\n+        def tabs():\n+            pass\n+        \"\"\"\n+        example_language = 'Python'\n+        importance_reason = \"\"\"\n+        Mixing tabs and spaces can cause issues when collaborating on\n+        code, as well as during testing and compilation.\n+        \"\"\"\n+        fix_suggestions = \"\"\"\n+        Using either tabs or spaces consistently.\n+        If using spaces, by using a suitable number of spaces, preferably four.\n+        \"\"\"\n+    indent_type = Taste[int](\n+        'Represents the type of indent used.',\n+        ('tab', 'space'), default='tab')\n+    indent_size = Taste[int](\n+        'Represents the number of spaces per indentation level.',\n+        (2, 3, 4, 5, 6), default=4)\n+\n+\n @Spacing.subaspect\n class TrailingSpace:\n     \"\"\"\n", "issue": "Create Indentation aspects under Formatting.Spacing\nCreate an aspects named `Indentation` in files `Formatting.py`. The new aspects should have fullname of `root.Formatting.Spacing.Indentation`. It should have atleast the following taste:\r\n\r\n- `indent_type` - what type of indentation used, could be `tab` or `space`\r\n- `indent_size` - number of spaces per indentation level\n", "before_files": [{"content": "from coalib.bearlib.aspects import Root, Taste\n\n\n@Root.subaspect\nclass Formatting:\n    \"\"\"\n    The visual appearance of source code.\n    \"\"\"\n    class docs:\n        example = \"\"\"\n        # Here is an example of Python code with lots of\n        # formatting issues including: trailing spaces, missing spaces\n        # around operators, strange and inconsistent indentation etc.\n\n        z = 'hello'+'world'\n             def f ( a):\n                pass\n        \"\"\"\n        example_language = 'Python'\n        importance_reason = \"\"\"\n        A coding style (the of rules or guidelines used when writing the\n        source code) can drastically affect the readability, and\n        maintainability of a program and might as well introduce bugs.\n        \"\"\"\n        fix_suggestions = \"\"\"\n        Defining a clearly and thoughtful coding style (based on the available\n        ones given the programming language in use) and strictly respect it or\n        apply it through out the implementation of a project.\n        \"\"\"\n\n\n@Formatting.subaspect\nclass Length:\n    \"\"\"\n    Hold sub-aspects for file and line length.\n    \"\"\"\n    class docs:\n        example = \"\"\"\n        # We assume that the maximum number of characters per line is 10\n        # and that the maximum number of lines per files is 3.\n\n        def run(bear, file, filename, aspectlist):\n            return bear.run(file, filename, aspectlist)\n        \"\"\"\n        example_language = 'Python'\n        importance_reason = \"\"\"\n        Too long lines of code and too large files result in code difficult to\n        read, understand and maintain.\n        \"\"\"\n        fix_suggestions = \"\"\"\n        Length issues can be fixed by writing shorter lines of code (splitting\n        long lines into multiple shorter lines); writing shorter files\n        (splitting files into modules, writing shorter methods and classes.).\n        \"\"\"\n\n\n@Length.subaspect\nclass LineLength:\n    \"\"\"\n    Number of characters found in a line of code.\n    \"\"\"\n    class docs:\n        example = \"\"\"\n        print('The length of this line is 38')\n        \"\"\"\n        example_langague = 'Python'\n        importance_reason = \"\"\"\n        Too long lines make code very difficult to read and maintain.\n        \"\"\"\n        fix_suggestions = \"\"\"\n        Splitting long lines of code into multiple shorter lines whenever\n        possible. Avoiding the usage of in-line language specific constructs\n        whenever they result in too long lines.\n        \"\"\"\n    max_line_length = Taste[int](\n        'Maximum number of character for a line.',\n        (79, 80, 100, 120, 160), default=80)\n\n\n@Length.subaspect\nclass FileLength:\n    \"\"\"\n    Number of lines found in a file.\n    \"\"\"\n    class docs:\n        example = \"\"\"\n        # This file would be a large file if we assume that the max number of\n        # lines per file is 10\n\n        class Node:\n            def __init__(self, value, left_most_child, left_sibling):\n                self.value=value\n                self.left_most_child=left_most_child\n                self.left_sibling=left_sibling\n\n        # This is example is just showing what this aspect is about, because\n        # the max number of lines per file is usually 999.\n        \"\"\"\n        example_language = 'Python 3'\n        importance_reason = \"\"\"\n        Too long programs (or files) are difficult to read, maintain and\n        understand.\n        \"\"\"\n        fix_suggestions = \"\"\"\n        Splitting files into modules, writing shorter methods and classes.\n        \"\"\"\n    max_file_length = Taste[int](\n        'Maximum number of line for a file',\n        (999,), default=999)\n\n\n@Formatting.subaspect\nclass Spacing:\n    \"\"\"\n    All whitespace found between non-whitespace characters.\n    \"\"\"\n    class docs:\n        example = \"\"\"\n        # Here is an example of code with spacing issues including\n        # unnecessary blank lines and missing space around operators.\n\n\n\n        def func(   ):\n           return      37*-+2\n        \"\"\"\n        example_language = 'Python'\n        importance_reason = \"\"\"\n        Useless spacing affects the readability and maintainability of a code.\n        \"\"\"\n        fix_suggestions = \"\"\"\n        Removing the trailing spaces and the meaningless blank lines.\n        \"\"\"\n\n\n@Spacing.subaspect\nclass TrailingSpace:\n    \"\"\"\n    Unnecessary whitespace at end of a line.\n\n    Trailing space is all whitespace found after the last non-whitespace\n    character on the line until the newline. This includes tabs \"\\\\\\\\t\",\n    blank lines, blanks etc.\n    \"\"\"\n    class docs:\n        example = \"\"\"\n        def func( a ):\n              pass\n\n        \"\"\".replace('\\n', '\\t\\n')\n        example_language = 'Python'\n        importance_reason = \"\"\"\n        Trailing spaces make code less readable and maintainable.\n        \"\"\"\n        fix_suggestions = \"\"\"\n        Removing the trailing spaces.\n        \"\"\"\n    allow_trailing_spaces = Taste[bool](\n        'Determines whether or not trailing spaces should be allowed or not.',\n        (True, False), default=False)\n\n\n@Spacing.subaspect\nclass BlankLine:\n    \"\"\"\n    A line with zero characters.\n    \"\"\"\n    class docs:\n        example = \"\"\"\n        name = input('What is your name?')\n\n\n        print('Hi, {}'.format(name))\n        \"\"\"\n        example_language = 'Python 3'\n        importance_reason = \"\"\"\n        Various programming styles use blank lines in different places.\n        The usage of blank lines affects the readability, maintainability and\n        length of a code i.e blank lines can either make code longer, less\n        readable and maintainable or do the reverse.\n        \"\"\"\n        fix_suggestions = \"\"\"\n        Following specific rules about the usage of blank lines: using them\n        only when necessary.\n        \"\"\"\n\n\n@BlankLine.subaspect\nclass BlankLineAfterDeclaration:\n    \"\"\"\n    Those found after declarations.\n    \"\"\"\n    class docs:\n        example = \"\"\"\n        #include <stdio.h>\n\n        int main ()\n        {\n          int a;\n          float b;\n\n          scanf(\"%d%f\", &a, &b);\n          printf(\"a = %d and b = %f\", a, b);\n          return 0;\n        }\n        \"\"\"\n        example_language = 'C'\n        importance_reason = \"\"\"\n        Having a specific and reasonable number of blank lines after every\n        block of declarations improves on the readability of the code.\n        \"\"\"\n        fix_suggestions = \"\"\"\n        `BlankLintAfterDeclaration` issues can be fixed specifying (and of\n        course using) a reasonable number of blank lines to use after block\n        declaration.\n        \"\"\"\n    blank_lines_after_declarations = Taste[int](\n        'Represents the number of blank lines after declarations',\n        (0, 1, 2), default=0)\n\n\n@BlankLine.subaspect\nclass BlankLineAfterProcedure:\n    \"\"\"\n    Those found after procedures or functions.\n    \"\"\"\n    class docs:\n        example = \"\"\"\n        #include <stdio.h>\n\n        void proc(void){\n            printf(\"this does nothing\");\n        } int add(float a, float b){\n            return a + b;\n        }\n        \"\"\"\n        example_language = 'C'\n        importance_reason = \"\"\"\n        Having a specific and reasonable number of blank lines after every\n        procedures improves on the readability of the code.\n        \"\"\"\n        fix_suggestions = \"\"\"\n        `BlankLintAfterProcedure` issues can be fixed specifying (and of\n        course using) a reasonable number of blank lines to use after\n        procedures' definition.\n        \"\"\"\n    blank_lines_after_procedures = Taste[int](\n        'Represents the number of blank lines to use after a procedure or'\n        'a function', (0, 1, 2), default=1)\n\n\n@BlankLine.subaspect\nclass BlankLineAfterClass:\n    \"\"\"\n    Those found after classes' definitions.\n    \"\"\"\n    class docs:\n        example = \"\"\"\n        class SomeClass:\n            def __init__(self):\n                raise RuntimeError('Never instantiate this class')\n\n\n        def func():\n            pass\n        \"\"\"\n        example_language = 'Python 3'\n        importance_reason = \"\"\"\n        Having a specific number of blank lines after every classes'\n        definitions declarations improves on the readability of the code.\n        \"\"\"\n        fix_suggestions = \"\"\"\n        \"\"\"\n    blank_lines_after_class = Taste[int](\n        'Represents the number of blank lines to use after a class'\n        'definition.', (1, 2), default=2)\n\n\n@BlankLine.subaspect\nclass NewlineAtEOF:\n    \"\"\"\n    Newline character (usually '\\\\\\\\n', aka CR) found at the end of file.\n    \"\"\"\n    class docs:\n        example = \"\"\"\n        def do_nothing():\n            pass\n        \"\"\" + ('\\n')\n        example_language = 'Python'\n        importance_reason = \"\"\"\n        A text file consists of a series of lines, each of which ends with a\n        newline character (\\\\\\\\n). A file that is not empty and does not end\n        with a newline is therefore not a text file.\n\n        It's not just bad style, it can lead to unexpected behavior, utilities\n        that are supposed to operate on text files may not cope well with files\n        that don't end with a newline.\n        \"\"\"\n        fix_suggestions = \"\"\"\n        `NewlineAtEOF` issues can be fixed by simply adding a newline at the\n        end of the file.\n        \"\"\"\n    newline_at_EOF = Taste[bool](\n        'If ``True``, enforce a newline at End Of File.',\n        (True, False), default=True)\n\n\n@Spacing.subaspect\nclass SpacesAroundOperator:\n    \"\"\"\n    Spacing around operators.\n    \"\"\"\n    class docs:\n        example = \"\"\"\n        def f(a, x):\n            return 37+a[42 -  x]\n        \"\"\"\n        example_language = 'Python'\n        importance_reason = \"\"\"\n        Having a specific and reasonable number of whitespace (blank) around\n        operators improves on the readability of the code.\n        \"\"\"\n        fix_suggestions = \"\"\"\n        `SpacesAroundOperator` issues can be fixed by simply specifying and\n        the number of whitespace to be used after each operator.\n        \"\"\"\n    spaces_around_operators = Taste[int](\n        'Represents the number of space to be used around operators.',\n        (0, 1), default=1)\n    spaces_before_colon = Taste[int](\n        'Represents the number of blank spaces before colons.',\n        (0, 1), default=0)\n    spaces_after_colon = Taste[int](\n        'Represents the number of blank spaces after colons.',\n        (0, 1), default=1)\n\n\n@Formatting.subaspect\nclass Quotation:\n    \"\"\"\n    Quotation mark used for strings and docstrings.\n    \"\"\"\n    class docs:\n        example = \"\"\"\n        # Here is an example of code where both '' and \"\" quotation mark\n        # Are used.\n\n        string = 'coala is always written with lowercase c.'\n        string = \"coala is always written with lowercase c.\"\n        \"\"\"\n        example_language = 'Python'\n        importance_reason = \"\"\"\n        Using the same quotation whenever possible in the code, improve on its\n        readability by introducing consistency.\n        \"\"\"\n        fix_suggestions = \"\"\"\n        Choosing a preferred quotation and using it everywhere (if possible).\n        \"\"\"\n    preferred_quotation = Taste[str](\n        'Represents the preferred quotation',\n        ('\\'', '\"'), default='\\'')\n", "path": "coalib/bearlib/aspects/Formatting.py"}], "after_files": [{"content": "from coalib.bearlib.aspects import Root, Taste\n\n\n@Root.subaspect\nclass Formatting:\n    \"\"\"\n    The visual appearance of source code.\n    \"\"\"\n    class docs:\n        example = \"\"\"\n        # Here is an example of Python code with lots of\n        # formatting issues including: trailing spaces, missing spaces\n        # around operators, strange and inconsistent indentation etc.\n\n        z = 'hello'+'world'\n             def f ( a):\n                pass\n        \"\"\"\n        example_language = 'Python'\n        importance_reason = \"\"\"\n        A coding style (the of rules or guidelines used when writing the\n        source code) can drastically affect the readability, and\n        maintainability of a program and might as well introduce bugs.\n        \"\"\"\n        fix_suggestions = \"\"\"\n        Defining a clearly and thoughtful coding style (based on the available\n        ones given the programming language in use) and strictly respect it or\n        apply it through out the implementation of a project.\n        \"\"\"\n\n\n@Formatting.subaspect\nclass Length:\n    \"\"\"\n    Hold sub-aspects for file and line length.\n    \"\"\"\n    class docs:\n        example = \"\"\"\n        # We assume that the maximum number of characters per line is 10\n        # and that the maximum number of lines per files is 3.\n\n        def run(bear, file, filename, aspectlist):\n            return bear.run(file, filename, aspectlist)\n        \"\"\"\n        example_language = 'Python'\n        importance_reason = \"\"\"\n        Too long lines of code and too large files result in code difficult to\n        read, understand and maintain.\n        \"\"\"\n        fix_suggestions = \"\"\"\n        Length issues can be fixed by writing shorter lines of code (splitting\n        long lines into multiple shorter lines); writing shorter files\n        (splitting files into modules, writing shorter methods and classes.).\n        \"\"\"\n\n\n@Length.subaspect\nclass LineLength:\n    \"\"\"\n    Number of characters found in a line of code.\n    \"\"\"\n    class docs:\n        example = \"\"\"\n        print('The length of this line is 38')\n        \"\"\"\n        example_langague = 'Python'\n        importance_reason = \"\"\"\n        Too long lines make code very difficult to read and maintain.\n        \"\"\"\n        fix_suggestions = \"\"\"\n        Splitting long lines of code into multiple shorter lines whenever\n        possible. Avoiding the usage of in-line language specific constructs\n        whenever they result in too long lines.\n        \"\"\"\n    max_line_length = Taste[int](\n        'Maximum number of character for a line.',\n        (79, 80, 100, 120, 160), default=80)\n\n\n@Length.subaspect\nclass FileLength:\n    \"\"\"\n    Number of lines found in a file.\n    \"\"\"\n    class docs:\n        example = \"\"\"\n        # This file would be a large file if we assume that the max number of\n        # lines per file is 10\n\n        class Node:\n            def __init__(self, value, left_most_child, left_sibling):\n                self.value=value\n                self.left_most_child=left_most_child\n                self.left_sibling=left_sibling\n\n        # This is example is just showing what this aspect is about, because\n        # the max number of lines per file is usually 999.\n        \"\"\"\n        example_language = 'Python 3'\n        importance_reason = \"\"\"\n        Too long programs (or files) are difficult to read, maintain and\n        understand.\n        \"\"\"\n        fix_suggestions = \"\"\"\n        Splitting files into modules, writing shorter methods and classes.\n        \"\"\"\n    max_file_length = Taste[int](\n        'Maximum number of line for a file',\n        (999,), default=999)\n\n\n@Formatting.subaspect\nclass Spacing:\n    \"\"\"\n    All whitespace found between non-whitespace characters.\n    \"\"\"\n    class docs:\n        example = \"\"\"\n        # Here is an example of code with spacing issues including\n        # unnecessary blank lines and missing space around operators.\n\n\n\n        def func(   ):\n           return      37*-+2\n        \"\"\"\n        example_language = 'Python'\n        importance_reason = \"\"\"\n        Useless spacing affects the readability and maintainability of a code.\n        \"\"\"\n        fix_suggestions = \"\"\"\n        Removing the trailing spaces and the meaningless blank lines.\n        \"\"\"\n\n\n@Spacing.subaspect\nclass Indentation:\n    \"\"\"\n    Spaces/tabs used before blocks of code to convey a program's structure.\n    \"\"\"\n    class docs:\n        example = \"\"\"\n        # If this code was written on an editor that defined a tab as 2\n        # spaces, mixing tabs and spaces would look like this on a different\n        # editor defining tabs as four spaces.\n\n        def spaces():\n          pass\n\n        def tabs():\n            pass\n        \"\"\"\n        example_language = 'Python'\n        importance_reason = \"\"\"\n        Mixing tabs and spaces can cause issues when collaborating on\n        code, as well as during testing and compilation.\n        \"\"\"\n        fix_suggestions = \"\"\"\n        Using either tabs or spaces consistently.\n        If using spaces, by using a suitable number of spaces, preferably four.\n        \"\"\"\n    indent_type = Taste[int](\n        'Represents the type of indent used.',\n        ('tab', 'space'), default='tab')\n    indent_size = Taste[int](\n        'Represents the number of spaces per indentation level.',\n        (2, 3, 4, 5, 6), default=4)\n\n\n@Spacing.subaspect\nclass TrailingSpace:\n    \"\"\"\n    Unnecessary whitespace at end of a line.\n\n    Trailing space is all whitespace found after the last non-whitespace\n    character on the line until the newline. This includes tabs \"\\\\\\\\t\",\n    blank lines, blanks etc.\n    \"\"\"\n    class docs:\n        example = \"\"\"\n        def func( a ):\n              pass\n\n        \"\"\".replace('\\n', '\\t\\n')\n        example_language = 'Python'\n        importance_reason = \"\"\"\n        Trailing spaces make code less readable and maintainable.\n        \"\"\"\n        fix_suggestions = \"\"\"\n        Removing the trailing spaces.\n        \"\"\"\n    allow_trailing_spaces = Taste[bool](\n        'Determines whether or not trailing spaces should be allowed or not.',\n        (True, False), default=False)\n\n\n@Spacing.subaspect\nclass BlankLine:\n    \"\"\"\n    A line with zero characters.\n    \"\"\"\n    class docs:\n        example = \"\"\"\n        name = input('What is your name?')\n\n\n        print('Hi, {}'.format(name))\n        \"\"\"\n        example_language = 'Python 3'\n        importance_reason = \"\"\"\n        Various programming styles use blank lines in different places.\n        The usage of blank lines affects the readability, maintainability and\n        length of a code i.e blank lines can either make code longer, less\n        readable and maintainable or do the reverse.\n        \"\"\"\n        fix_suggestions = \"\"\"\n        Following specific rules about the usage of blank lines: using them\n        only when necessary.\n        \"\"\"\n\n\n@BlankLine.subaspect\nclass BlankLineAfterDeclaration:\n    \"\"\"\n    Those found after declarations.\n    \"\"\"\n    class docs:\n        example = \"\"\"\n        #include <stdio.h>\n\n        int main ()\n        {\n          int a;\n          float b;\n\n          scanf(\"%d%f\", &a, &b);\n          printf(\"a = %d and b = %f\", a, b);\n          return 0;\n        }\n        \"\"\"\n        example_language = 'C'\n        importance_reason = \"\"\"\n        Having a specific and reasonable number of blank lines after every\n        block of declarations improves on the readability of the code.\n        \"\"\"\n        fix_suggestions = \"\"\"\n        `BlankLintAfterDeclaration` issues can be fixed specifying (and of\n        course using) a reasonable number of blank lines to use after block\n        declaration.\n        \"\"\"\n    blank_lines_after_declarations = Taste[int](\n        'Represents the number of blank lines after declarations',\n        (0, 1, 2), default=0)\n\n\n@BlankLine.subaspect\nclass BlankLineAfterProcedure:\n    \"\"\"\n    Those found after procedures or functions.\n    \"\"\"\n    class docs:\n        example = \"\"\"\n        #include <stdio.h>\n\n        void proc(void){\n            printf(\"this does nothing\");\n        } int add(float a, float b){\n            return a + b;\n        }\n        \"\"\"\n        example_language = 'C'\n        importance_reason = \"\"\"\n        Having a specific and reasonable number of blank lines after every\n        procedures improves on the readability of the code.\n        \"\"\"\n        fix_suggestions = \"\"\"\n        `BlankLintAfterProcedure` issues can be fixed specifying (and of\n        course using) a reasonable number of blank lines to use after\n        procedures' definition.\n        \"\"\"\n    blank_lines_after_procedures = Taste[int](\n        'Represents the number of blank lines to use after a procedure or'\n        'a function', (0, 1, 2), default=1)\n\n\n@BlankLine.subaspect\nclass BlankLineAfterClass:\n    \"\"\"\n    Those found after classes' definitions.\n    \"\"\"\n    class docs:\n        example = \"\"\"\n        class SomeClass:\n            def __init__(self):\n                raise RuntimeError('Never instantiate this class')\n\n\n        def func():\n            pass\n        \"\"\"\n        example_language = 'Python 3'\n        importance_reason = \"\"\"\n        Having a specific number of blank lines after every classes'\n        definitions declarations improves on the readability of the code.\n        \"\"\"\n        fix_suggestions = \"\"\"\n        \"\"\"\n    blank_lines_after_class = Taste[int](\n        'Represents the number of blank lines to use after a class'\n        'definition.', (1, 2), default=2)\n\n\n@BlankLine.subaspect\nclass NewlineAtEOF:\n    \"\"\"\n    Newline character (usually '\\\\\\\\n', aka CR) found at the end of file.\n    \"\"\"\n    class docs:\n        example = \"\"\"\n        def do_nothing():\n            pass\n        \"\"\" + ('\\n')\n        example_language = 'Python'\n        importance_reason = \"\"\"\n        A text file consists of a series of lines, each of which ends with a\n        newline character (\\\\\\\\n). A file that is not empty and does not end\n        with a newline is therefore not a text file.\n\n        It's not just bad style, it can lead to unexpected behavior, utilities\n        that are supposed to operate on text files may not cope well with files\n        that don't end with a newline.\n        \"\"\"\n        fix_suggestions = \"\"\"\n        `NewlineAtEOF` issues can be fixed by simply adding a newline at the\n        end of the file.\n        \"\"\"\n    newline_at_EOF = Taste[bool](\n        'If ``True``, enforce a newline at End Of File.',\n        (True, False), default=True)\n\n\n@Spacing.subaspect\nclass SpacesAroundOperator:\n    \"\"\"\n    Spacing around operators.\n    \"\"\"\n    class docs:\n        example = \"\"\"\n        def f(a, x):\n            return 37+a[42 -  x]\n        \"\"\"\n        example_language = 'Python'\n        importance_reason = \"\"\"\n        Having a specific and reasonable number of whitespace (blank) around\n        operators improves on the readability of the code.\n        \"\"\"\n        fix_suggestions = \"\"\"\n        `SpacesAroundOperator` issues can be fixed by simply specifying and\n        the number of whitespace to be used after each operator.\n        \"\"\"\n    spaces_around_operators = Taste[int](\n        'Represents the number of space to be used around operators.',\n        (0, 1), default=1)\n    spaces_before_colon = Taste[int](\n        'Represents the number of blank spaces before colons.',\n        (0, 1), default=0)\n    spaces_after_colon = Taste[int](\n        'Represents the number of blank spaces after colons.',\n        (0, 1), default=1)\n\n\n@Formatting.subaspect\nclass Quotation:\n    \"\"\"\n    Quotation mark used for strings and docstrings.\n    \"\"\"\n    class docs:\n        example = \"\"\"\n        # Here is an example of code where both '' and \"\" quotation mark\n        # Are used.\n\n        string = 'coala is always written with lowercase c.'\n        string = \"coala is always written with lowercase c.\"\n        \"\"\"\n        example_language = 'Python'\n        importance_reason = \"\"\"\n        Using the same quotation whenever possible in the code, improve on its\n        readability by introducing consistency.\n        \"\"\"\n        fix_suggestions = \"\"\"\n        Choosing a preferred quotation and using it everywhere (if possible).\n        \"\"\"\n    preferred_quotation = Taste[str](\n        'Represents the preferred quotation',\n        ('\\'', '\"'), default='\\'')\n", "path": "coalib/bearlib/aspects/Formatting.py"}]}