# HG changeset patch # User Manuel Jacob # Date 1654040749 -7200 # Node ID 5c01ca5f9f1e4fa0f5d6615719f74fbe06281da2 # Parent fce59125608538fda8e669224f1b843c081a05f2 cleanup: return directly instead of assigning variable diff -r fce591256085 -r 5c01ca5f9f1e mercurial/localrepo.py --- a/mercurial/localrepo.py Wed Jun 01 01:30:48 2022 +0200 +++ b/mercurial/localrepo.py Wed Jun 01 01:45:49 2022 +0200 @@ -523,12 +523,11 @@ # which means very old repositories may not have one. We assume # a missing file translates to no requirements. try: - requirements = set(vfs.read(b'requires').splitlines()) + return set(vfs.read(b'requires').splitlines()) except FileNotFoundError: if not allowmissing: raise - requirements = set() - return requirements + return set() def makelocalrepository(baseui, path, intents=None):