Skip to content

Commit

Permalink
Merge "[RET] remove unnecessary return None and elif after break"
Browse files Browse the repository at this point in the history
  • Loading branch information
xqt authored and Gerrit Code Review committed Nov 2, 2024
2 parents 31f8cae + a02b970 commit bddbb48
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion scripts/archivebot.py
Original file line number Diff line number Diff line change
Expand Up @@ -1019,7 +1019,7 @@ def signal_handler(signum, frame):
pywikibot.info(f'{canceled} done')
break

elif not process_page(pg, *botargs):
if not process_page(pg, *botargs):
break


Expand Down
2 changes: 1 addition & 1 deletion tests/interwikidata_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def create_item(self):

def try_to_add(self):
"""Prevent adding sitelinks to items."""
return None
return


class TestInterwikidataBot(SiteAttributeTestCase):
Expand Down
4 changes: 2 additions & 2 deletions tests/tools_deprecate_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ def deprecated_func_arg3(foo=None):
@remove_last_args(['foo', 'bar'])
def deprecated_all():
"""Test remove_last_args with all args removed."""
return None
return


@remove_last_args(['bar'])
Expand Down Expand Up @@ -232,7 +232,7 @@ def deprecated_instance_method_and_arg2(self, foo):
@remove_last_args(['foo', 'bar'])
def deprecated_all(self):
"""Deprecating positional parameters."""
return None
return

@remove_last_args(['bar'])
def deprecated_all2(self, foo):
Expand Down
2 changes: 1 addition & 1 deletion tests/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,7 @@ def is_cached(self, key: str) -> bool:

def is_recognised(self, key):
"""Return None."""
return None
return

def get_requested_time(self, key):
"""Return False."""
Expand Down

0 comments on commit bddbb48

Please sign in to comment.