Pylint 抱怨功能报告

Pylint complaining about function reports

我正在尝试从名为

的几个文件中导入函数
mysql_calls.py

system_calls.py

如果我用

导入
from mysql_calls import *

pylint 抱怨通配符导入,如果我这样做

import mysql_calls

pylint 当我使用来自导入模块的函数时抱怨未定义的变量。

alert_feeder.py:215:17: E0602: Undefined variable 'mysql_query' (undefined-variable)

正确的做法是什么?我也没有(还没有?)使用导入模块中的每个函数,pylint 也对此有所抱怨。

当您 运行 import mysql_calls 时,其函数 mysql_query 可访问为 mysql_calls.mysql_query

更多详情:Modules - Python 3 documentation