How can I check for unused import in many Python files?

后端 未结 11 2121
名媛妹妹
名媛妹妹 2020-12-13 01:58

I remember when I was developing in C++ or Java, the compiler usually complains for unused methods, functions or imports. In my Django project, I have a bunch of Python fil

11条回答
  •  心在旅途
    2020-12-13 02:13

    You can use the following user setting:

    "python.linting.pylintEnabled": true,
    "python.linting.pylintArgs": [
        "--enable=W0614"
    ]
    

    But I think, you'll need to go through all files yourself and hit "save".

提交回复
热议问题