Browse Source

fix shadows name 'k' from outer scope

while syntactically correct this triggers a false Unresolved reference 'k' error in PyCharms
w-e-w 7 tháng trước cách đây
mục cha
commit
dc34c0041c
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      modules/ui_settings.py

+ 1 - 1
modules/ui_settings.py

@@ -335,7 +335,7 @@ class UiSettings:
 
 
             for method in methods:
             for method in methods:
                 method(
                 method(
-                    fn=lambda value, k=k: self.run_settings_single(value, key=k),
+                    fn=lambda value, key=k: self.run_settings_single(value, key=key),
                     inputs=[component],
                     inputs=[component],
                     outputs=[component, self.text_settings],
                     outputs=[component, self.text_settings],
                     show_progress=info.refresh is not None,
                     show_progress=info.refresh is not None,