dreadatour / Flake8Lint

Sublime Text plugin for lint Python files
233 stars 58 forks source link

[Bug] E501 error, if non-ASCII symbols in the line #102

Open Kristinita opened 7 years ago

Kristinita commented 7 years ago

1. Summary

I get error E501, if my lines contains Cyrillic characters and less than 79 symbols.

2. Settings

I have a pelicanconf.py file with line:

# Для того чтобы Pelican видел плагины из этой папки

This line contains 52 characters.

My User\Flake8Lint.sublime-settings file:

{
    "debug": true,
    "import-order": true,
    "lint_on_save": false,
    "live_mode": true
}

3. Expected behavior

If I run flake8 command in terminal:

D:\Kristinita.bitbucket.org>flake8 pelicanconf.py

I don't get warnings and errors.

4. Actual behavior

I saw errors in my pelicanconf.py, example:

Flake8

My line 14 contains 52 characters, not 87.

If "debug": true, I get output:

[Flake8Lint DEBUG] run delayed lint (live_mode)
[Flake8Lint DEBUG] run flake8 lint
[Flake8Lint DEBUG] ignore file patterns: []
[Flake8Lint DEBUG] python interpreter: auto
[Flake8Lint DEBUG] interpreter is external
[Flake8Lint DEBUG] guess interpreter: 'pythonw'
[Flake8Lint DEBUG] linter file: D:\Sublime Text 3 x64\Data\Packages\Python Flake8 Lint\lint.py
[Flake8Lint DEBUG] interpreter is external
[Flake8Lint DEBUG] lint time: 0.163ms
[Flake8Lint DEBUG] lint errors found: 6
[Flake8Lint DEBUG] 'select' setting: []
[Flake8Lint DEBUG] 'ignore' setting: []
[Flake8Lint DEBUG] 'is_highlight' setting: True
[Flake8Lint DEBUG] 'is_popup' setting: True
[Flake8Lint DEBUG] prepare flake8 lint errors
[Flake8Lint DEBUG] error to show: (1, 0, 'D100: Missing docstring in public module')
[Flake8Lint DEBUG] error to show: (14, 79, 'E501 line too long (87 > 79 characters)')
[Flake8Lint DEBUG] error to show: (51, 79, 'E501 line too long (123 > 79 characters)')
[Flake8Lint DEBUG] error to show: (78, 79, 'E501 line too long (110 > 79 characters)')
[Flake8Lint DEBUG] error to show: (82, 79, 'E501 line too long (121 > 79 characters)')
[Flake8Lint DEBUG] error to show: (85, 79, 'E501 line too long (123 > 79 characters)')
[Flake8Lint DEBUG] show flake8 lint errors
[Flake8Lint DEBUG] use default colors because our color scheme was not loaded
[Flake8Lint DEBUG] highlight errors in view (regions: warning)
[Flake8Lint DEBUG] highlight errors in view (regions: error)

5. Steps to reproduce

I reproduce the problem in a version of Sublime Text without plugins and user settings.

I install Python Flake8 Lint via Package Control → I restart Sublime Text → I open pelicanconf.py file → I get actual behavior.

6. Environment

Operating system and version: Windows 10 Enterprise LTSB 64-bit EN Sublime Text: Build 3126 Python: 3.6.0 flake8: 3.3.0 (mccabe: 0.6.1, pycodestyle: 2.3.1, pyflakes: 1.5.0) CPython 3.6.0 on Windows

Thanks.