最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

python 3.x - Dash: Linting for callbacks of all-in-one (AIO) components - Stack Overflow

programmeradmin0浏览0评论

I'm building my own all-in-one component for a dash app based on the example in the dash documentation.

My implementation works fine, but pylint throws as excepted the E0213:no-self-argument error for all callbacks, as the callbacks are defined as class methods but do not have or use the "self" argument.

What would be the best or pythonic solution to counteract those errors? My ideas are:

  • manually disable the pylint error for all callback methods
  • decorate the callback with @staticmethod. This requires further changes necessary as the ids class is no longer acessible, so all those calls must be changed to MyOnAIO.ids.id_name(...).
发布评论

评论列表(0)

  1. 暂无评论