

def get_metadata_generator(install_req):
    if install_req.use_pep517:
        return install_req.prepare_pep517_metadata
    else:
        return install_req.run_egg_info



def get_metadata_generator(install_req):
    if not install_req.use_pep517:
        return install_req.run_egg_info

    return install_req.prepare_pep517_metadata

Return early for legacy processes
Return early for legacy processes

  
  
  def get_metadata_generator(install_req):
-     if install_req.use_pep517:
+     if not install_req.use_pep517:
-         return install_req.prepare_pep517_metadata
-     else:
          return install_req.run_egg_info
  
+     return install_req.prepare_pep517_metadata
+ 
Return early for legacy processes
## Code Before:


def get_metadata_generator(install_req):
    if install_req.use_pep517:
        return install_req.prepare_pep517_metadata
    else:
        return install_req.run_egg_info

## Instruction:
Return early for legacy processes
## Code After:


def get_metadata_generator(install_req):
    if not install_req.use_pep517:
        return install_req.run_egg_info

    return install_req.prepare_pep517_metadata
