From fac2bd8843f6d959e2566a872d1863abf52d6b62 Mon Sep 17 00:00:00 2001
From: Rylan Polster <rslpolster@gmail.com>
Date: Fri, 20 Nov 2020 01:55:34 -0500
Subject: [PATCH] use auto update list when --print-only is passed

---
 Library/Homebrew/utils/pypi.rb | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/Library/Homebrew/utils/pypi.rb b/Library/Homebrew/utils/pypi.rb
index ad75aa6f0e..1822951775 100644
--- a/Library/Homebrew/utils/pypi.rb
+++ b/Library/Homebrew/utils/pypi.rb
@@ -55,13 +55,15 @@ module PyPI
                                print_only: false, silent: false, ignore_non_pypi_packages: false)
 
     auto_update_list = formula.tap.formula_lists[:pypi_automatic_resource_update_list]
-    if package_name.blank? && extra_packages.blank? && exclude_packages.blank? && !print_only &&
-       auto_update_list.present? && auto_update_list.key?(formula.full_name)
+    if auto_update_list.present? && auto_update_list.key?(formula.full_name) &&
+       package_name.blank? && extra_packages.blank? && exclude_packages.blank?
 
       list_entry = auto_update_list[formula.full_name]
       case list_entry
       when false
-        odie "The resources for \"#{formula.name}\" need special attention. Please update them manually."
+        unless print_only
+          odie "The resources for \"#{formula.name}\" need special attention. Please update them manually."
+        end
       when String
         package_name = list_entry
       when Hash
-- 
GitLab