Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我不知道问题是否与 freezegun 库有关,还是与 SonarQube/PyCharm 有关。freezegun.freeze_time(用作装饰器)按预期工作。但是... SQ 和 Pycharm 都将 freeze_time 的参数之一(即as_kwarg)检测为意外参数。PyCharm 没有将其放在函数列表中(如您在随附的屏幕截图中所见)