Skip to content

Commit

Permalink
Minor code cleanups
Browse files Browse the repository at this point in the history
  • Loading branch information
ryoqun committed Jul 11, 2023
1 parent e0e3530 commit e237615
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions ci/order-crates-for-publishing.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit e237615

Please sign in to comment.