add python_requires to pylint_plugin
@@ -24,6 +24,8 @@ def transform_conanfile(node):
"conans.client.file_copier").lookup("FileCopier")
file_importer_class = MANAGER.ast_from_module_name(
"conans.client.importer").lookup("_FileImporter")
+ python_requires_class = MANAGER.ast_from_module_name(
+ "conans.client.graph.python_requires").lookup("PyRequires")
dynamic_fields = {
"source_folder": str_class,
@@ -36,6 +38,7 @@ def transform_conanfile(node):
"info": info_class,
"copy": file_copier_class,
"copy_deps": file_importer_class,
+ "python_requires": [str_class, python_requires_class],
}
for f, t in dynamic_fields.items():
