We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Allow async magic __call__
#  Thesis

`__call__` method should be asyncable.

```python
import asyncio
import os

class RequestHandler(object):
    async def __call__(self, reader, writer):
        ipc_input = (await reader.readline()).decode('utf8').strip()
        writer.write('You sent: "{0}"\n'.format(ipc_input).encode('utf8'))

async def bootstrap():
    handler = RequestHandler()
    server = await asyncio.start_unix_server(handler, path='/var/tmp/my_sock')
    os.chmod('/var/tmp/my_sock', 0o666)
    while True:
        try:
            await asyncio.sleep(120)
        except asyncio.CancelledError:
            server.close()
            break

asyncio.run(bootstrap())
```

## Reasoning

Much like how `__call__` can be a generator there is no reason it can't be async.


--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `wemake_python_styleguide/constants.py`
Content:
```
1 """
2 This module contains list of white- and black-listed ``python`` members.
3 
4 We add values here when we want to make them public.
5 Or when a value is reused in several places.
6 Then, we automatically have to add it here and document it.
7 
8 Other constants that are not used across modules
9 and does not require to be documented can be defined where they are used.
10 
11 All values here must be documented with ``#:`` comments.
12 """
13 
14 import math
15 import re
16 
17 from typing_extensions import Final
18 
19 #: List of functions we forbid to use.
20 FUNCTIONS_BLACKLIST: Final = frozenset((
21     # Code generation:
22     'eval',
23     'exec',
24     'compile',
25 
26     # Termination:
27     'exit',
28     'quit',
29 
30     # Magic:
31     'globals',
32     'locals',
33     'vars',
34     'dir',
35 
36     # IO:
37     'print',
38     'pprint',
39     'input',
40     'breakpoint',
41 
42     # Attribute access:
43     'hasattr',
44     'delattr',
45 
46     # Gratis:
47     'copyright',
48     'help',
49     'credits',
50 
51     # Dynamic imports:
52     '__import__',
53 
54     # OOP:
55     'staticmethod',
56 
57     # Mypy:
58     'reveal_type',
59 ))
60 
61 #: List of module metadata we forbid to use.
62 MODULE_METADATA_VARIABLES_BLACKLIST: Final = frozenset((
63     '__author__',
64     '__all__',
65     '__version__',
66     '__about__',
67 ))
68 
69 #: List of variable names we forbid to use.
70 VARIABLE_NAMES_BLACKLIST: Final = frozenset((
71     # Meaningless words:
72     'data',
73     'result',
74     'results',
75     'item',
76     'items',
77     'value',
78     'values',
79     'val',
80     'vals',
81     'var',
82     'vars',
83     'variable',
84     'content',
85     'contents',
86     'info',
87     'handle',
88     'handler',
89     'file',
90     'obj',
91     'objects',
92     'objs',
93     'some',
94     'do',
95     'param',
96     'params',
97     'parameters',
98 
99     # Confuseables:
100     'no',
101     'true',
102     'false',
103 
104     # Names from examples:
105     'foo',
106     'bar',
107     'baz',
108 ))
109 
110 #: List of characters sequences that are hard to read.
111 UNREADABLE_CHARACTER_COMBINATIONS: Final = frozenset((
112     '1l',
113     '1I',
114     '0O',
115     'O0',
116     # Not included: 'lI', 'l1', 'Il'
117     # Because these names are quite common in real words.
118 ))
119 
120 #: List of special names that are used only as first argument in methods.
121 SPECIAL_ARGUMENT_NAMES_WHITELIST: Final = frozenset((
122     'self',
123     'cls',
124     'mcs',
125 ))
126 
127 #: List of all magic methods from the python docs.
128 ALL_MAGIC_METHODS: Final = frozenset((
129     '__new__',
130     '__init__',
131     '__del__',
132 
133     '__repr__',
134     '__str__',
135     '__bytes__',
136     '__format__',
137 
138     '__lt__',
139     '__le__',
140     '__eq__',
141     '__ne__',
142     '__gt__',
143     '__ge__',
144 
145     '__hash__',
146     '__bool__',
147 
148     '__getattr__',
149     '__getattribute__',
150     '__setattr__',
151     '__delattr__',
152     '__dir__',
153 
154     '__get__',
155     '__set__',
156     '__delete__',
157     '__set_name__',
158 
159     '__init_subclass__',
160     '__instancecheck__',
161     '__subclasscheck__',
162     '__class_getitem__',
163 
164     '__call__',
165     '__len__',
166     '__length_hint__',
167     '__getitem__',
168     '__setitem__',
169     '__delitem__',
170     '__missing__',
171     '__iter__',
172     '__reversed__',
173     '__contains__',
174 
175     '__add__',
176     '__sub__',
177     '__mul__',
178     '__matmul__',
179     '__truediv__',
180     '__floordiv__',
181     '__mod__',
182     '__divmod__',
183     '__pow__',
184     '__lshift__',
185     '__rshift__',
186     '__and__',
187     '__xor__',
188     '__or__',
189     '__radd__',
190     '__rsub__',
191     '__rmul__',
192     '__rmatmul__',
193     '__rtruediv__',
194     '__rfloordiv__',
195     '__rmod__',
196     '__rdivmod__',
197     '__rpow__',
198     '__rlshift__',
199     '__rrshift__',
200     '__rand__',
201     '__rxor__',
202     '__ror__',
203     '__iadd__',
204     '__isub__',
205     '__imul__',
206     '__imatmul__',
207     '__itruediv__',
208     '__ifloordiv__',
209     '__imod__',
210     '__ipow__',
211     '__ilshift__',
212     '__irshift__',
213     '__iand__',
214     '__ixor__',
215     '__ior__',
216     '__neg__',
217     '__pos__',
218     '__abs__',
219     '__invert__',
220     '__complex__',
221     '__int__',
222     '__float__',
223     '__index__',
224     '__round__',
225     '__trunc__',
226     '__floor__',
227     '__ceil__',
228 
229     '__enter__',
230     '__exit__',
231 
232     '__await__',
233     '__aiter__',
234     '__anext__',
235     '__aenter__',
236     '__aexit__',
237 ))
238 
239 #: List of magic methods that are forbidden to use.
240 MAGIC_METHODS_BLACKLIST: Final = frozenset((
241     # Since we don't use `del`:
242     '__del__',
243     '__delitem__',
244     '__delete__',
245 
246     # Since we don't use `pickle`:
247     '__reduce__',
248     '__reduce_ex__',
249 
250     '__dir__',  # since we don't use `dir()`
251     '__delattr__',  # since we don't use `delattr()`
252 ))
253 
254 #: List of magic methods that are not allowed to be generators.
255 YIELD_MAGIC_METHODS_BLACKLIST: Final = ALL_MAGIC_METHODS.difference({
256     # Allowed to be used with ``yield`` keyword:
257     '__call__',  # Fixes Issue:146
258     '__iter__',
259 })
260 
261 #: List of magic methods that are not allowed to be async.
262 ASYNC_MAGIC_METHODS_BLACKLIST: Final = ALL_MAGIC_METHODS.difference({
263     # In order of appearance on
264     # https://docs.python.org/3/reference/datamodel.html#basic-customization
265     # Allowed magic methods are:
266     '__anext__',
267     '__aenter__',
268     '__aexit__',
269 })
270 
271 #: List of builtin classes that are allowed to subclass.
272 ALLOWED_BUILTIN_CLASSES: Final = frozenset((
273     'type',
274     'object',
275 ))
276 
277 #: List of nested functions' names we allow to use.
278 NESTED_FUNCTIONS_WHITELIST: Final = frozenset((
279     'decorator',
280     'factory',
281     'wrapper',
282 ))
283 
284 #: List of allowed ``__future__`` imports.
285 FUTURE_IMPORTS_WHITELIST: Final = frozenset((
286     'annotations',
287     'generator_stop',
288 ))
289 
290 #: List of blacklisted module names.
291 MODULE_NAMES_BLACKLIST: Final = frozenset((
292     'util',
293     'utils',
294     'utilities',
295     'helpers',
296 ))
297 
298 #: List of allowed module magic names.
299 MAGIC_MODULE_NAMES_WHITELIST: Final = frozenset((
300     '__init__',
301     '__main__',
302 ))
303 
304 #: List of bad magic module functions.
305 MAGIC_MODULE_NAMES_BLACKLIST: Final = frozenset((
306     '__getattr__',
307     '__dir__',
308 ))
309 
310 #: Regex pattern to name modules.
311 MODULE_NAME_PATTERN: Final = re.compile(r'^_?_?[a-z][a-z\d_]*[a-z\d](__)?$')
312 
313 #: Common numbers that are allowed to be used without being called "magic".
314 MAGIC_NUMBERS_WHITELIST: Final = frozenset((
315     0,  # both int and float
316     0.1,
317     0.5,
318     1.0,
319     100,
320     1000,
321     1024,  # bytes
322     24,  # hours
323     60,  # seconds, minutes
324 
325     1j,  # imaginary part of a complex number
326 ))
327 
328 #: Maximum amount of ``pragma`` no-cover comments per module.
329 MAX_NO_COVER_COMMENTS: Final = 5
330 
331 #: Maximum length of ``yield`` ``tuple`` expressions.
332 MAX_LEN_YIELD_TUPLE: Final = 5
333 
334 #: Maximum number of compare nodes in a single expression.
335 MAX_COMPARES: Final = 2
336 
337 #: Maximum number of conditions in a single ``if`` or ``while`` statement.
338 MAX_CONDITIONS: Final = 4
339 
340 #: Maximum number of `elif` blocks in a single `if` condition:
341 MAX_ELIFS: Final = 3
342 
343 #: Maximum number of ``except`` cases in a single ``try`` clause.
344 MAX_EXCEPT_CASES: Final = 3
345 
346 #: Approximate constants which real values should be imported from math module.
347 MATH_APPROXIMATE_CONSTANTS: Final = frozenset((
348     math.pi,
349     math.e,
350     math.tau,
351 ))
352 
353 #: List of vague method names that may cause confusion if imported as is:
354 VAGUE_IMPORTS_BLACKLIST: Final = frozenset((
355     'read',
356     'write',
357     'load',
358     'loads',
359     'dump',
360     'dumps',
361     'parse',
362     'safe_load',
363     'safe_dump',
364     'load_all',
365     'dump_all',
366     'safe_load_all',
367     'safe_dump_all',
368 ))
369 
370 #: List of literals without arguments we forbid to use.
371 LITERALS_BLACKLIST: Final = frozenset((
372     'int',
373     'float',
374     'str',
375     'bytes',
376     'bool',
377     'complex',
378 ))
379 
380 #: List of functions in which arguments must be tuples.
381 TUPLE_ARGUMENTS_METHODS: Final = frozenset((
382     'frozenset',
383 ))
384 
385 #: Conditions that can appear in the ``if`` statement to allow nested imports.
386 ALLOWED_NESTED_IMPORTS_CONDITIONS: Final = frozenset((
387     'TYPE_CHECKING',
388 ))
389 
390 #: List of commonly used aliases
391 ALIAS_NAMES_WHITELIST: Final = frozenset((
392     'np',
393     'pd',
394     'df',
395     'plt',
396     'sns',
397     'tf',
398     'cv',
399 ))
400 
401 # Internal variables
402 # ==================
403 
404 # Please, do not touch values beyond this line!
405 # ---------------------------------------------
406 
407 # They are not publicly documented since they are not used by the end user.
408 # But, we still need them to be defined here.
409 
410 # Used as a default filename, when it is not passed by flake8:
411 STDIN: Final = 'stdin'
412 
413 # Used to specify as a placeholder for `__init__`:
414 INIT: Final = '__init__'
415 
416 # Used to determine when we are running on Windows:
417 WINDOWS_OS: Final = 'nt'
418 
419 # Used as a placeholder for special `_` variable:
420 UNUSED_PLACEHOLDER: Final = '_'
421
```
--- 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/wemake_python_styleguide/constants.py b/wemake_python_styleguide/constants.py
--- a/wemake_python_styleguide/constants.py
+++ b/wemake_python_styleguide/constants.py
@@ -266,6 +266,7 @@
     '__anext__',
     '__aenter__',
     '__aexit__',
+    '__call__',
 })
 
 #: List of builtin classes that are allowed to subclass.

{"golden_diff": "diff --git a/wemake_python_styleguide/constants.py b/wemake_python_styleguide/constants.py\n--- a/wemake_python_styleguide/constants.py\n+++ b/wemake_python_styleguide/constants.py\n@@ -266,6 +266,7 @@\n     '__anext__',\n     '__aenter__',\n     '__aexit__',\n+    '__call__',\n })\n \n #: List of builtin classes that are allowed to subclass.\n", "issue": "Allow async magic __call__\n#  Thesis\r\n\r\n`__call__` method should be asyncable.\r\n\r\n```python\r\nimport asyncio\r\nimport os\r\n\r\nclass RequestHandler(object):\r\n    async def __call__(self, reader, writer):\r\n        ipc_input = (await reader.readline()).decode('utf8').strip()\r\n        writer.write('You sent: \"{0}\"\\n'.format(ipc_input).encode('utf8'))\r\n\r\nasync def bootstrap():\r\n    handler = RequestHandler()\r\n    server = await asyncio.start_unix_server(handler, path='/var/tmp/my_sock')\r\n    os.chmod('/var/tmp/my_sock', 0o666)\r\n    while True:\r\n        try:\r\n            await asyncio.sleep(120)\r\n        except asyncio.CancelledError:\r\n            server.close()\r\n            break\r\n\r\nasyncio.run(bootstrap())\r\n```\r\n\r\n## Reasoning\r\n\r\nMuch like how `__call__` can be a generator there is no reason it can't be async.\r\n\n", "before_files": [{"content": "\"\"\"\nThis module contains list of white- and black-listed ``python`` members.\n\nWe add values here when we want to make them public.\nOr when a value is reused in several places.\nThen, we automatically have to add it here and document it.\n\nOther constants that are not used across modules\nand does not require to be documented can be defined where they are used.\n\nAll values here must be documented with ``#:`` comments.\n\"\"\"\n\nimport math\nimport re\n\nfrom typing_extensions import Final\n\n#: List of functions we forbid to use.\nFUNCTIONS_BLACKLIST: Final = frozenset((\n    # Code generation:\n    'eval',\n    'exec',\n    'compile',\n\n    # Termination:\n    'exit',\n    'quit',\n\n    # Magic:\n    'globals',\n    'locals',\n    'vars',\n    'dir',\n\n    # IO:\n    'print',\n    'pprint',\n    'input',\n    'breakpoint',\n\n    # Attribute access:\n    'hasattr',\n    'delattr',\n\n    # Gratis:\n    'copyright',\n    'help',\n    'credits',\n\n    # Dynamic imports:\n    '__import__',\n\n    # OOP:\n    'staticmethod',\n\n    # Mypy:\n    'reveal_type',\n))\n\n#: List of module metadata we forbid to use.\nMODULE_METADATA_VARIABLES_BLACKLIST: Final = frozenset((\n    '__author__',\n    '__all__',\n    '__version__',\n    '__about__',\n))\n\n#: List of variable names we forbid to use.\nVARIABLE_NAMES_BLACKLIST: Final = frozenset((\n    # Meaningless words:\n    'data',\n    'result',\n    'results',\n    'item',\n    'items',\n    'value',\n    'values',\n    'val',\n    'vals',\n    'var',\n    'vars',\n    'variable',\n    'content',\n    'contents',\n    'info',\n    'handle',\n    'handler',\n    'file',\n    'obj',\n    'objects',\n    'objs',\n    'some',\n    'do',\n    'param',\n    'params',\n    'parameters',\n\n    # Confuseables:\n    'no',\n    'true',\n    'false',\n\n    # Names from examples:\n    'foo',\n    'bar',\n    'baz',\n))\n\n#: List of characters sequences that are hard to read.\nUNREADABLE_CHARACTER_COMBINATIONS: Final = frozenset((\n    '1l',\n    '1I',\n    '0O',\n    'O0',\n    # Not included: 'lI', 'l1', 'Il'\n    # Because these names are quite common in real words.\n))\n\n#: List of special names that are used only as first argument in methods.\nSPECIAL_ARGUMENT_NAMES_WHITELIST: Final = frozenset((\n    'self',\n    'cls',\n    'mcs',\n))\n\n#: List of all magic methods from the python docs.\nALL_MAGIC_METHODS: Final = frozenset((\n    '__new__',\n    '__init__',\n    '__del__',\n\n    '__repr__',\n    '__str__',\n    '__bytes__',\n    '__format__',\n\n    '__lt__',\n    '__le__',\n    '__eq__',\n    '__ne__',\n    '__gt__',\n    '__ge__',\n\n    '__hash__',\n    '__bool__',\n\n    '__getattr__',\n    '__getattribute__',\n    '__setattr__',\n    '__delattr__',\n    '__dir__',\n\n    '__get__',\n    '__set__',\n    '__delete__',\n    '__set_name__',\n\n    '__init_subclass__',\n    '__instancecheck__',\n    '__subclasscheck__',\n    '__class_getitem__',\n\n    '__call__',\n    '__len__',\n    '__length_hint__',\n    '__getitem__',\n    '__setitem__',\n    '__delitem__',\n    '__missing__',\n    '__iter__',\n    '__reversed__',\n    '__contains__',\n\n    '__add__',\n    '__sub__',\n    '__mul__',\n    '__matmul__',\n    '__truediv__',\n    '__floordiv__',\n    '__mod__',\n    '__divmod__',\n    '__pow__',\n    '__lshift__',\n    '__rshift__',\n    '__and__',\n    '__xor__',\n    '__or__',\n    '__radd__',\n    '__rsub__',\n    '__rmul__',\n    '__rmatmul__',\n    '__rtruediv__',\n    '__rfloordiv__',\n    '__rmod__',\n    '__rdivmod__',\n    '__rpow__',\n    '__rlshift__',\n    '__rrshift__',\n    '__rand__',\n    '__rxor__',\n    '__ror__',\n    '__iadd__',\n    '__isub__',\n    '__imul__',\n    '__imatmul__',\n    '__itruediv__',\n    '__ifloordiv__',\n    '__imod__',\n    '__ipow__',\n    '__ilshift__',\n    '__irshift__',\n    '__iand__',\n    '__ixor__',\n    '__ior__',\n    '__neg__',\n    '__pos__',\n    '__abs__',\n    '__invert__',\n    '__complex__',\n    '__int__',\n    '__float__',\n    '__index__',\n    '__round__',\n    '__trunc__',\n    '__floor__',\n    '__ceil__',\n\n    '__enter__',\n    '__exit__',\n\n    '__await__',\n    '__aiter__',\n    '__anext__',\n    '__aenter__',\n    '__aexit__',\n))\n\n#: List of magic methods that are forbidden to use.\nMAGIC_METHODS_BLACKLIST: Final = frozenset((\n    # Since we don't use `del`:\n    '__del__',\n    '__delitem__',\n    '__delete__',\n\n    # Since we don't use `pickle`:\n    '__reduce__',\n    '__reduce_ex__',\n\n    '__dir__',  # since we don't use `dir()`\n    '__delattr__',  # since we don't use `delattr()`\n))\n\n#: List of magic methods that are not allowed to be generators.\nYIELD_MAGIC_METHODS_BLACKLIST: Final = ALL_MAGIC_METHODS.difference({\n    # Allowed to be used with ``yield`` keyword:\n    '__call__',  # Fixes Issue:146\n    '__iter__',\n})\n\n#: List of magic methods that are not allowed to be async.\nASYNC_MAGIC_METHODS_BLACKLIST: Final = ALL_MAGIC_METHODS.difference({\n    # In order of appearance on\n    # https://docs.python.org/3/reference/datamodel.html#basic-customization\n    # Allowed magic methods are:\n    '__anext__',\n    '__aenter__',\n    '__aexit__',\n})\n\n#: List of builtin classes that are allowed to subclass.\nALLOWED_BUILTIN_CLASSES: Final = frozenset((\n    'type',\n    'object',\n))\n\n#: List of nested functions' names we allow to use.\nNESTED_FUNCTIONS_WHITELIST: Final = frozenset((\n    'decorator',\n    'factory',\n    'wrapper',\n))\n\n#: List of allowed ``__future__`` imports.\nFUTURE_IMPORTS_WHITELIST: Final = frozenset((\n    'annotations',\n    'generator_stop',\n))\n\n#: List of blacklisted module names.\nMODULE_NAMES_BLACKLIST: Final = frozenset((\n    'util',\n    'utils',\n    'utilities',\n    'helpers',\n))\n\n#: List of allowed module magic names.\nMAGIC_MODULE_NAMES_WHITELIST: Final = frozenset((\n    '__init__',\n    '__main__',\n))\n\n#: List of bad magic module functions.\nMAGIC_MODULE_NAMES_BLACKLIST: Final = frozenset((\n    '__getattr__',\n    '__dir__',\n))\n\n#: Regex pattern to name modules.\nMODULE_NAME_PATTERN: Final = re.compile(r'^_?_?[a-z][a-z\\d_]*[a-z\\d](__)?$')\n\n#: Common numbers that are allowed to be used without being called \"magic\".\nMAGIC_NUMBERS_WHITELIST: Final = frozenset((\n    0,  # both int and float\n    0.1,\n    0.5,\n    1.0,\n    100,\n    1000,\n    1024,  # bytes\n    24,  # hours\n    60,  # seconds, minutes\n\n    1j,  # imaginary part of a complex number\n))\n\n#: Maximum amount of ``pragma`` no-cover comments per module.\nMAX_NO_COVER_COMMENTS: Final = 5\n\n#: Maximum length of ``yield`` ``tuple`` expressions.\nMAX_LEN_YIELD_TUPLE: Final = 5\n\n#: Maximum number of compare nodes in a single expression.\nMAX_COMPARES: Final = 2\n\n#: Maximum number of conditions in a single ``if`` or ``while`` statement.\nMAX_CONDITIONS: Final = 4\n\n#: Maximum number of `elif` blocks in a single `if` condition:\nMAX_ELIFS: Final = 3\n\n#: Maximum number of ``except`` cases in a single ``try`` clause.\nMAX_EXCEPT_CASES: Final = 3\n\n#: Approximate constants which real values should be imported from math module.\nMATH_APPROXIMATE_CONSTANTS: Final = frozenset((\n    math.pi,\n    math.e,\n    math.tau,\n))\n\n#: List of vague method names that may cause confusion if imported as is:\nVAGUE_IMPORTS_BLACKLIST: Final = frozenset((\n    'read',\n    'write',\n    'load',\n    'loads',\n    'dump',\n    'dumps',\n    'parse',\n    'safe_load',\n    'safe_dump',\n    'load_all',\n    'dump_all',\n    'safe_load_all',\n    'safe_dump_all',\n))\n\n#: List of literals without arguments we forbid to use.\nLITERALS_BLACKLIST: Final = frozenset((\n    'int',\n    'float',\n    'str',\n    'bytes',\n    'bool',\n    'complex',\n))\n\n#: List of functions in which arguments must be tuples.\nTUPLE_ARGUMENTS_METHODS: Final = frozenset((\n    'frozenset',\n))\n\n#: Conditions that can appear in the ``if`` statement to allow nested imports.\nALLOWED_NESTED_IMPORTS_CONDITIONS: Final = frozenset((\n    'TYPE_CHECKING',\n))\n\n#: List of commonly used aliases\nALIAS_NAMES_WHITELIST: Final = frozenset((\n    'np',\n    'pd',\n    'df',\n    'plt',\n    'sns',\n    'tf',\n    'cv',\n))\n\n# Internal variables\n# ==================\n\n# Please, do not touch values beyond this line!\n# ---------------------------------------------\n\n# They are not publicly documented since they are not used by the end user.\n# But, we still need them to be defined here.\n\n# Used as a default filename, when it is not passed by flake8:\nSTDIN: Final = 'stdin'\n\n# Used to specify as a placeholder for `__init__`:\nINIT: Final = '__init__'\n\n# Used to determine when we are running on Windows:\nWINDOWS_OS: Final = 'nt'\n\n# Used as a placeholder for special `_` variable:\nUNUSED_PLACEHOLDER: Final = '_'\n", "path": "wemake_python_styleguide/constants.py"}], "after_files": [{"content": "\"\"\"\nThis module contains list of white- and black-listed ``python`` members.\n\nWe add values here when we want to make them public.\nOr when a value is reused in several places.\nThen, we automatically have to add it here and document it.\n\nOther constants that are not used across modules\nand does not require to be documented can be defined where they are used.\n\nAll values here must be documented with ``#:`` comments.\n\"\"\"\n\nimport math\nimport re\n\nfrom typing_extensions import Final\n\n#: List of functions we forbid to use.\nFUNCTIONS_BLACKLIST: Final = frozenset((\n    # Code generation:\n    'eval',\n    'exec',\n    'compile',\n\n    # Termination:\n    'exit',\n    'quit',\n\n    # Magic:\n    'globals',\n    'locals',\n    'vars',\n    'dir',\n\n    # IO:\n    'print',\n    'pprint',\n    'input',\n    'breakpoint',\n\n    # Attribute access:\n    'hasattr',\n    'delattr',\n\n    # Gratis:\n    'copyright',\n    'help',\n    'credits',\n\n    # Dynamic imports:\n    '__import__',\n\n    # OOP:\n    'staticmethod',\n\n    # Mypy:\n    'reveal_type',\n))\n\n#: List of module metadata we forbid to use.\nMODULE_METADATA_VARIABLES_BLACKLIST: Final = frozenset((\n    '__author__',\n    '__all__',\n    '__version__',\n    '__about__',\n))\n\n#: List of variable names we forbid to use.\nVARIABLE_NAMES_BLACKLIST: Final = frozenset((\n    # Meaningless words:\n    'data',\n    'result',\n    'results',\n    'item',\n    'items',\n    'value',\n    'values',\n    'val',\n    'vals',\n    'var',\n    'vars',\n    'variable',\n    'content',\n    'contents',\n    'info',\n    'handle',\n    'handler',\n    'file',\n    'obj',\n    'objects',\n    'objs',\n    'some',\n    'do',\n    'param',\n    'params',\n    'parameters',\n\n    # Confuseables:\n    'no',\n    'true',\n    'false',\n\n    # Names from examples:\n    'foo',\n    'bar',\n    'baz',\n))\n\n#: List of characters sequences that are hard to read.\nUNREADABLE_CHARACTER_COMBINATIONS: Final = frozenset((\n    '1l',\n    '1I',\n    '0O',\n    'O0',\n    # Not included: 'lI', 'l1', 'Il'\n    # Because these names are quite common in real words.\n))\n\n#: List of special names that are used only as first argument in methods.\nSPECIAL_ARGUMENT_NAMES_WHITELIST: Final = frozenset((\n    'self',\n    'cls',\n    'mcs',\n))\n\n#: List of all magic methods from the python docs.\nALL_MAGIC_METHODS: Final = frozenset((\n    '__new__',\n    '__init__',\n    '__del__',\n\n    '__repr__',\n    '__str__',\n    '__bytes__',\n    '__format__',\n\n    '__lt__',\n    '__le__',\n    '__eq__',\n    '__ne__',\n    '__gt__',\n    '__ge__',\n\n    '__hash__',\n    '__bool__',\n\n    '__getattr__',\n    '__getattribute__',\n    '__setattr__',\n    '__delattr__',\n    '__dir__',\n\n    '__get__',\n    '__set__',\n    '__delete__',\n    '__set_name__',\n\n    '__init_subclass__',\n    '__instancecheck__',\n    '__subclasscheck__',\n    '__class_getitem__',\n\n    '__call__',\n    '__len__',\n    '__length_hint__',\n    '__getitem__',\n    '__setitem__',\n    '__delitem__',\n    '__missing__',\n    '__iter__',\n    '__reversed__',\n    '__contains__',\n\n    '__add__',\n    '__sub__',\n    '__mul__',\n    '__matmul__',\n    '__truediv__',\n    '__floordiv__',\n    '__mod__',\n    '__divmod__',\n    '__pow__',\n    '__lshift__',\n    '__rshift__',\n    '__and__',\n    '__xor__',\n    '__or__',\n    '__radd__',\n    '__rsub__',\n    '__rmul__',\n    '__rmatmul__',\n    '__rtruediv__',\n    '__rfloordiv__',\n    '__rmod__',\n    '__rdivmod__',\n    '__rpow__',\n    '__rlshift__',\n    '__rrshift__',\n    '__rand__',\n    '__rxor__',\n    '__ror__',\n    '__iadd__',\n    '__isub__',\n    '__imul__',\n    '__imatmul__',\n    '__itruediv__',\n    '__ifloordiv__',\n    '__imod__',\n    '__ipow__',\n    '__ilshift__',\n    '__irshift__',\n    '__iand__',\n    '__ixor__',\n    '__ior__',\n    '__neg__',\n    '__pos__',\n    '__abs__',\n    '__invert__',\n    '__complex__',\n    '__int__',\n    '__float__',\n    '__index__',\n    '__round__',\n    '__trunc__',\n    '__floor__',\n    '__ceil__',\n\n    '__enter__',\n    '__exit__',\n\n    '__await__',\n    '__aiter__',\n    '__anext__',\n    '__aenter__',\n    '__aexit__',\n))\n\n#: List of magic methods that are forbidden to use.\nMAGIC_METHODS_BLACKLIST: Final = frozenset((\n    # Since we don't use `del`:\n    '__del__',\n    '__delitem__',\n    '__delete__',\n\n    # Since we don't use `pickle`:\n    '__reduce__',\n    '__reduce_ex__',\n\n    '__dir__',  # since we don't use `dir()`\n    '__delattr__',  # since we don't use `delattr()`\n))\n\n#: List of magic methods that are not allowed to be generators.\nYIELD_MAGIC_METHODS_BLACKLIST: Final = ALL_MAGIC_METHODS.difference({\n    # Allowed to be used with ``yield`` keyword:\n    '__call__',  # Fixes Issue:146\n    '__iter__',\n})\n\n#: List of magic methods that are not allowed to be async.\nASYNC_MAGIC_METHODS_BLACKLIST: Final = ALL_MAGIC_METHODS.difference({\n    # In order of appearance on\n    # https://docs.python.org/3/reference/datamodel.html#basic-customization\n    # Allowed magic methods are:\n    '__anext__',\n    '__aenter__',\n    '__aexit__',\n    '__call__',\n})\n\n#: List of builtin classes that are allowed to subclass.\nALLOWED_BUILTIN_CLASSES: Final = frozenset((\n    'type',\n    'object',\n))\n\n#: List of nested functions' names we allow to use.\nNESTED_FUNCTIONS_WHITELIST: Final = frozenset((\n    'decorator',\n    'factory',\n    'wrapper',\n))\n\n#: List of allowed ``__future__`` imports.\nFUTURE_IMPORTS_WHITELIST: Final = frozenset((\n    'annotations',\n    'generator_stop',\n))\n\n#: List of blacklisted module names.\nMODULE_NAMES_BLACKLIST: Final = frozenset((\n    'util',\n    'utils',\n    'utilities',\n    'helpers',\n))\n\n#: List of allowed module magic names.\nMAGIC_MODULE_NAMES_WHITELIST: Final = frozenset((\n    '__init__',\n    '__main__',\n))\n\n#: List of bad magic module functions.\nMAGIC_MODULE_NAMES_BLACKLIST: Final = frozenset((\n    '__getattr__',\n    '__dir__',\n))\n\n#: Regex pattern to name modules.\nMODULE_NAME_PATTERN: Final = re.compile(r'^_?_?[a-z][a-z\\d_]*[a-z\\d](__)?$')\n\n#: Common numbers that are allowed to be used without being called \"magic\".\nMAGIC_NUMBERS_WHITELIST: Final = frozenset((\n    0,  # both int and float\n    0.1,\n    0.5,\n    1.0,\n    100,\n    1000,\n    1024,  # bytes\n    24,  # hours\n    60,  # seconds, minutes\n\n    1j,  # imaginary part of a complex number\n))\n\n#: Maximum amount of ``pragma`` no-cover comments per module.\nMAX_NO_COVER_COMMENTS: Final = 5\n\n#: Maximum length of ``yield`` ``tuple`` expressions.\nMAX_LEN_YIELD_TUPLE: Final = 5\n\n#: Maximum number of compare nodes in a single expression.\nMAX_COMPARES: Final = 2\n\n#: Maximum number of conditions in a single ``if`` or ``while`` statement.\nMAX_CONDITIONS: Final = 4\n\n#: Maximum number of `elif` blocks in a single `if` condition:\nMAX_ELIFS: Final = 3\n\n#: Maximum number of ``except`` cases in a single ``try`` clause.\nMAX_EXCEPT_CASES: Final = 3\n\n#: Approximate constants which real values should be imported from math module.\nMATH_APPROXIMATE_CONSTANTS: Final = frozenset((\n    math.pi,\n    math.e,\n    math.tau,\n))\n\n#: List of vague method names that may cause confusion if imported as is:\nVAGUE_IMPORTS_BLACKLIST: Final = frozenset((\n    'read',\n    'write',\n    'load',\n    'loads',\n    'dump',\n    'dumps',\n    'parse',\n    'safe_load',\n    'safe_dump',\n    'load_all',\n    'dump_all',\n    'safe_load_all',\n    'safe_dump_all',\n))\n\n#: List of literals without arguments we forbid to use.\nLITERALS_BLACKLIST: Final = frozenset((\n    'int',\n    'float',\n    'str',\n    'bytes',\n    'bool',\n    'complex',\n))\n\n#: List of functions in which arguments must be tuples.\nTUPLE_ARGUMENTS_METHODS: Final = frozenset((\n    'frozenset',\n))\n\n#: Conditions that can appear in the ``if`` statement to allow nested imports.\nALLOWED_NESTED_IMPORTS_CONDITIONS: Final = frozenset((\n    'TYPE_CHECKING',\n))\n\n#: List of commonly used aliases\nALIAS_NAMES_WHITELIST: Final = frozenset((\n    'np',\n    'pd',\n    'df',\n    'plt',\n    'sns',\n    'tf',\n    'cv',\n))\n\n# Internal variables\n# ==================\n\n# Please, do not touch values beyond this line!\n# ---------------------------------------------\n\n# They are not publicly documented since they are not used by the end user.\n# But, we still need them to be defined here.\n\n# Used as a default filename, when it is not passed by flake8:\nSTDIN: Final = 'stdin'\n\n# Used to specify as a placeholder for `__init__`:\nINIT: Final = '__init__'\n\n# Used to determine when we are running on Windows:\nWINDOWS_OS: Final = 'nt'\n\n# Used as a placeholder for special `_` variable:\nUNUSED_PLACEHOLDER: Final = '_'\n", "path": "wemake_python_styleguide/constants.py"}]}