103 def _select_action(page):
104 """Manage interactive choices."""
105
106 def create_new_title_change(page, new_title=None):107 """Change helper function."""
108 if new_title is None:
109 return pywikibot.input('New page name:')
2065 return str(d[site])
2066 else:
2067 # Use short format, just the language code
2068 def fmt(d, site):2069 return site.code
2070
2071 mods = mcomment = ''
201
202 :return: the filename which was used to upload the image
203 """
204 def delete_source(old_filename, target_filename):205 """Delete source image or tag nowCommons template to it.
206
207 This function is called when upload to Commons was
135willstop = False
136
137
138def _signal_handler(signum, frame) -> None:139 global willstop
140 if not willstop:
141 willstop = True
135willstop = False
136
137
138def _signal_handler(signum, frame) -> None:139 global willstop
140 if not willstop:
141 willstop = True
An unused argument can lead to confusions. It should be removed. If this variable is necessary, name the variable _
or start the name with unused
or _unused
.
def square(x, y=1):
return x * x
class MySubClass(MyClass):
def __init__(self, number):
self.value = 42 # argument `number` remains unused
def square(x):
return x * x
class MySubClass(MyClass):
def __init__(self, _):
self.value = 42