From e2376150dccdcad6a16a463c4030c226a3d32c90 Mon Sep 17 00:00:00 2001 From: Ryo Onodera Date: Tue, 11 Jul 2023 10:56:41 +0900 Subject: [PATCH] Minor code cleanups --- ci/order-crates-for-publishing.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/ci/order-crates-for-publishing.py b/ci/order-crates-for-publishing.py index 18ea6c5776ebc4..d1070abe0f5397 100755 --- a/ci/order-crates-for-publishing.py +++ b/ci/order-crates-for-publishing.py @@ -21,9 +21,6 @@ def load_metadata(): return json.loads(subprocess.Popen( cmd, shell=True, stdout=subprocess.PIPE).communicate()[0]) -no_explicit_version_specified = '*' - - # Consider a situation where a crate wants to use developing-oriented code # inside their integration tests and benchmarks, like creating malformed # data or omitting signature verifications. Ideally, the code should be @@ -51,13 +48,14 @@ def load_metadata(): # special-cased dev dependencies from its `dependency_graph` and further # processing. def is_self_dev_dep_with_dev_context_only_utils(package, dependency): - is_special_cased = False + no_explicit_version = '*' + is_special_cased = False if (dependency['kind'] == 'dev' and dependency['name'] == package['name'] and 'dev-context-only-utils' in dependency['features'] and 'path' in dependency): - if dependency['req'] == no_explicit_version_specified: + if dependency['req'] == no_explicit_version: is_special_cased = True else: # it's likely `{ workspace = true, ... }` is used, which implicitly pulls the