【问题标题】:Error running flake8 [duplicate]运行 flake8 时出错 [重复]
【发布时间】:2019-01-16 14:58:55
【问题描述】:

我最近尝试为 Python3 安装 Flake8,从那时起我收到以下错误消息:

/Users/dorsam/.atom/packages/linter/lib/linter-registry.js:159 [Linter] Error running Flake8 Error: /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/pycodestyle.py:113: FutureWarning: Possible nested set at position 1
  EXTRANEOUS_WHITESPACE_REGEX = re.compile(r'[[({] | []}),;:]')
    at ChildProcess.<anonymous> (/Users/dorsam/.atom/packages/linter-flake8/node_modules/sb-exec/lib/index.js:56:20)
    at emitTwo (events.js:126:13)
    at ChildProcess.emit (events.js:214:7)
    at maybeClose (internal/child_process.js:925:16)
    at Socket.stream.socket.on (internal/child_process.js:346:11)
    at emitOne (events.js:116:13)
    at Socket.emit (events.js:211:7)
    at Pipe._handle.close [as _onclose] (net.js:554:12)

【问题讨论】:

标签: python flake8


【解决方案1】:

看这里:https://docs.python.org/3/library/re.html

支持 Unicode 技术中的嵌套集合和集合操作 未来可能会添加标准#18。这将改变 语法,因此为了促进这种变化,将引发 FutureWarning 模棱两可的案件暂时。这包括以 a 开头的集合 文字 '[' 或包含文字字符序列 '--', '&&', '~~'和'||'。为了避免警告,请用反斜杠转义它们。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2016-11-27
    • 1970-01-01
    • 2012-03-08
    • 1970-01-01
    • 2021-04-04
    • 2013-03-22
    • 2019-12-12
    相关资源
    最近更新 更多