Run pylint on the snippet below which performs several emoji substitutions.
Commenting various lines out, I thought the hippos were to blame. Yet, if I actually remove everything but the hippos, pylint runs just fine. I couldn't isolate the problem; maybe it's the number of substitutions?
def emoji(msg):
msg = msg.replace('[:-)]', '๐')
msg = msg.replace('[:->]', '๐')
msg = msg.replace('[:-D]', '๐')
msg = msg.replace('[;-D]', '๐คฃ')
msg = msg.replace('[;-)]', '๐')
msg = msg.replace('[:-|]', '๐')
msg = msg.replace('[:-P]', '๐')
msg = msg.replace('[8-D]', '๐')
msg = msg.replace('[8-o]', '๐ฒ')
msg = msg.replace('[:-o]', '๐ฎ')
msg = msg.replace('[:-(]', '๐')
msg = msg.replace('[:-E]', '๐ก')
msg = msg.replace('[;-(]', '๐ข')
msg = msg.replace('[:-c]', '๐ฉ')
msg = msg.replace('[:-Q]', '๐คฎ')
msg = msg.replace('[8-P]', '๐')
msg = msg.replace('[:-3]', '๐')
msg = msg.replace('[:-$]', '๐คข')
msg = msg.replace('[O:-)]', '๐')
msg = msg.replace('[]:-)]', '๐')
msg = msg.replace('[Z]', 'โก')
msg = msg.replace('[?]', 'โ')
msg = msg.replace('[!]', 'โ')
msg = msg.replace('[R^]', '๐')
msg = msg.replace('[Rv]', '๐')
msg = msg.replace('[O=]', '๐ก')
msg = msg.replace('[@)->-]', '๐น')
msg = msg.replace('[@=]', '๐ฃ')
msg = msg.replace('[8=]', '๐')
msg = msg.replace('[$>]', '๐')
msg = msg.replace('B-)', '๐')
msg = msg.replace(':-[)', '๐ท')
msg = msg.replace('8-[)', '๐ท')
msg = msg.replace('(8:O)', '๐ฆ')
msg = msg.replace('(8:o)', '๐ฆ')
msg = msg.replace('(8:ยฐ)', '๐ฆ')
msg = msg.replace('(รรร)', '๐ฐ')
return msg
pylint crashes with RecursionError: maximum recursion depth exceeded
pylint works just fine.
pylint 2.6.0
astroid 2.4.2
Python 3.7.9 (default, Oct 22 2020, 15:11:35)
[GCC 10.2.0]
@contyk thanks for the report!
Let me know if I can provide more details, such as the exception stack. But it's quite long (duh) and if you can reproduce it, it will be simpler.
@contyk thanks for the report!
And now I've just notice your handle...
I'm not able to reproduce this with:
pylint 2.6.1-dev1
astroid 2.5.0
Python 3.8.1 (default, Feb 13 2020, 10:17:07)
[Clang 8.1.0 (clang-802.0.42)]
It would be great to see the traceback you are getting but emojis should not affect the parser or the inference resulting in recursion errors. I'm closing this for now but let's reopen if you are able to reproduce and can provide the traceback. Also if you can test with the astroid version installed from the master branch, that would be great.
Most helpful comment
And now I've just notice your handle...