Skip to content

Commit

Permalink
use walrus operator
Browse files Browse the repository at this point in the history
Co-authored-by: jaimergp <[email protected]>
  • Loading branch information
isuruf and jaimergp authored Jan 13, 2025
1 parent 1729889 commit aa72898
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions conda_build/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -1445,8 +1445,8 @@ def create_info_files(m, replacements, files, prefix):

def get_short_path(m, target_file):
if m.python_version_independent:
if target_file.find("site-packages") >= 0:
return target_file[target_file.find("site-packages") :]
if (site_packages_idx := target_file.find("site-packages")) >= 0:
return target_file[site_packages_idx:]
if m.noarch == "python":
entry_point_script_names = get_entry_point_script_names(
m.get_value("build/entry_points")
Expand Down

0 comments on commit aa72898

Please sign in to comment.