changeset 49321:5c01ca5f9f1e

cleanup: return directly instead of assigning variable
author Manuel Jacob <me@manueljacob.de>
date Wed, 01 Jun 2022 01:45:49 +0200
parents fce591256085
children ce50d95cfa57
files mercurial/localrepo.py
diffstat 1 files changed, 2 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- 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):