指定 pylint 应该评估哪个 python 版本 [英] Specify which python version pylint should evaluate for

查看:34
本文介绍了指定 pylint 应该评估哪个 python 版本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用带有 Pylinter 的 Sublime Text 3 来运行 pylint我的文件.

I'm using Sublime Text 3 With Pylinter to run pylint on my files.

但是,在同一台机器上,我处理 python 2 和 python 3 项目的文件(代码在几个远程测试虚拟机之一上执行,通过 SSH.我通过打开文件来修改文件SMB.这是我的家庭测试实验室,我终于可以坐下来学习 py3k)了.

However, on the same machine, I work on files for both python 2, and python 3 projects (the code is executed on one of several remote test-VMs, via SSH. I'm modifying the files by opening them over SMB. This is my home test-lab, and I'm finally sitting down to learn py3k).

我是否可以轻松地覆盖 pylint 用于确定它应该 lint 的 python 版本的机制?理想情况下,会有一个内联指令,但我没有找到任何东西.

Can I easily override the mechanism pylint uses to determine the python version it should lint for? Ideally, there would be an inline directive, but I have not had much luck finding anything.

我在 Windows 上(正在编辑)(远程 VM 是 linux,但这在这里无关紧要),这是值得的.

I'm (editing) on Windows (the remote VMs are linux, but that' irrelevant here), for what it's worth.

推荐答案

AFAIK Pylint lints 适用于它运行的 Python 版本,并且无法覆盖它.

AFAIK Pylint lints for the version of Python it is running on and it is not possible to override it.

这篇关于指定 pylint 应该评估哪个 python 版本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆