Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/292.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
如何配置旺盛的CTAG以忽略python关键字参数?_Python_Ctags_Exuberant Ctags - Fatal编程技术网

如何配置旺盛的CTAG以忽略python关键字参数?

如何配置旺盛的CTAG以忽略python关键字参数?,python,ctags,exuberant-ctags,Python,Ctags,Exuberant Ctags,我正在使用丰富的CTAG为我的django项目生成标记。在许多地方,我使用关键字参数调用函数和类 $ cat models.py from django.db import models class Foo(models.Model): bar = models.CharField( help_text='The very important "bar" field', unique=True, max_length=100,

我正在使用丰富的CTAG为我的django项目生成标记。在许多地方,我使用关键字参数调用函数和类

$ cat models.py
from django.db import models

class Foo(models.Model):

    bar = models.CharField(
        help_text='The very important "bar" field',
        unique=True,
        max_length=100,
    )
但是当ctag解析这些文件时,关键字参数被分类为变量声明。这会用大量错误标记污染我的标记文件

$ ctags -x models.py
Foo              class         3 models.py        class Foo(models.Model):
bar              variable      5 models.py        bar = models.CharField(
help_text        variable      6 models.py        help_text='The very important "bar" field',
max_length       variable      8 models.py        max_length=100,
unique           variable      7 models.py        unique=True,
我读过这本书,但找不到任何明显相关的东西


CTAG中是否有我可以使用的内置功能?或者我必须通过类似于
awk
的管道将标记文件过滤掉错误匹配吗?

根据以下PR,ctags结束时似乎有一个bug:

确保ctags是最新的,因为修复程序现在已合并


由于pull请求涉及多行kwargs声明,因此可以假设将它们全部放在同一行将“修复”问题(但很可能会使您的代码中断PEP8建议)。

谢谢。我已经看过通用CTAG,但我还没有切换到它,因为它看起来比繁盛的CTAG更具前沿性,我必须自己构建它。如果没有更简单的解决方案,我可能不得不重新考虑。您应该能够通过将它们全部放在一行来防止问题,但这可能会使您的linter非常不高兴,这会使我的代码更难阅读和维护。不值得。我正在考虑从生成的
标记
文件中删除任何带有尾随
字符的匹配项。但这将是相当骇人的,而且也不是100%正确。好吧!请注意,universal ctags实际上并不是一个新项目,它只是在其开发停止后的一个蓬勃发展的ctags分支,所以您应该很好!