tholo / pytest-flake8

pytest plugin to run flake8
Other
117 stars 47 forks source link

UnicodeDecodeError with "И" letter #89

Open Karpovich-alex opened 2 years ago

Karpovich-alex commented 2 years ago

There is some trouble with "И" letter in comments or strings. You can reproduce this error with code print("И") And you will get " File "C:\ ...\venv\lib\site-packages\flake8_pytest.py", line 33, in run noqa = _get_noqa_lines(file_to_check.readlines()) File "C:\ ...\Python\Python310\lib\encodings\cp1251.py", line 23, in decode return codecs.charmap_decode(input,self.errors,decoding_table)[0] UnicodeDecodeError: 'charmap' codec can't decode byte 0x98 in position 8: character maps to \" error. But with letter "и" it goes well.