Skip to content

Commit 7c6699b

Browse files
committed
run pre-commit formatting
1 parent 68178a3 commit 7c6699b

File tree

3 files changed

+12
-11
lines changed

3 files changed

+12
-11
lines changed

python/private/py_wheel_normalize_pep440.bzl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -683,7 +683,7 @@ def parse_version(version):
683683
for p, fn in fns:
684684
fn(parser)
685685
parts[p] = parser.context()["norm"]
686-
parser.context()["norm"] = "" # Clear out the buffer so that it is easy to separate the fields
686+
parser.context()["norm"] = "" # Clear out the buffer so that it is easy to separate the fields
687687

688688
is_prefix = version.endswith(".*")
689689
parts["is_prefix"] = is_prefix

python/private/pypi/pep508_evaluate.bzl

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
load("//python/private:enum.bzl", "enum")
1919
load("//python/private:py_wheel_normalize_pep440.bzl", "parse_version")
2020

21-
2221
# The expression parsing and resolution for the PEP508 is below
2322
#
2423

tests/pypi/pep508/evaluate_tests.bzl

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,11 @@ load("//python/private/pypi:pep508_evaluate.bzl", "evaluate", "tokenize") # bui
1919

2020
_tests = []
2121

22-
def _check_evaluate(env, expr, expected, values, strict=True):
22+
def _check_evaluate(env, expr, expected, values, strict = True):
2323
env.expect.where(
24-
expression=expr, values=values
25-
).that_bool(evaluate(expr, env=values, strict=strict)).equals(expected)
24+
expression = expr,
25+
values = values,
26+
).that_bool(evaluate(expr, env = values, strict = strict)).equals(expected)
2627

2728
def _tokenize_tests(env):
2829
for input, want in {
@@ -91,7 +92,7 @@ def _evaluate_non_version_env_tests(env):
9192

9293
# Check that the non-strict eval gives us back the input when no
9394
# env is supplied.
94-
_check_evaluate(env, input, input.replace("'", '"'), {}, strict=False)
95+
_check_evaluate(env, input, input.replace("'", '"'), {}, strict = False)
9596

9697
_tests.append(_evaluate_non_version_env_tests)
9798

@@ -129,7 +130,7 @@ def _evaluate_version_env_tests(env):
129130

130131
# Check that the non-strict eval gives us back the input when no
131132
# env is supplied.
132-
_check_evaluate(env, input, input.replace("'", '"'), {}, strict=False)
133+
_check_evaluate(env, input, input.replace("'", '"'), {}, strict = False)
133134

134135
_tests.append(_evaluate_version_env_tests)
135136

@@ -147,7 +148,7 @@ def _evaluate_platform_version_is_special(env):
147148

148149
# Check that the non-strict eval gives us back the input when no
149150
# env is supplied.
150-
_check_evaluate(env, input, input.replace("'", '"'), {}, strict=False)
151+
_check_evaluate(env, input, input.replace("'", '"'), {}, strict = False)
151152

152153
_tests.append(_evaluate_platform_version_is_special)
153154

@@ -207,7 +208,7 @@ def _logical_expression_tests(env):
207208

208209
# Check that the non-strict eval gives us back the input when no env
209210
# is supplied.
210-
_check_evaluate(env, input, input.replace("'", '"'), {}, strict=False)
211+
_check_evaluate(env, input, input.replace("'", '"'), {}, strict = False)
211212

212213
_tests.append(_logical_expression_tests)
213214

@@ -236,7 +237,7 @@ def _evaluate_partial_only_extra(env):
236237
strict = False,
237238
)
238239
env.expect.that_bool(got).equals(want)
239-
_check_evaluate(env, input, want, env = {"extra": extra}, strict=False)
240+
_check_evaluate(env, input, want, env = {"extra": extra}, strict = False)
240241

241242
_tests.append(_evaluate_partial_only_extra)
242243

@@ -266,9 +267,10 @@ def _evaluate_with_aliases(env):
266267
_tests.append(_evaluate_with_aliases)
267268

268269
def _expr_case(expr, want, env):
269-
return struct(expr=expr, want=want, env=env)
270+
return struct(expr = expr.strip(), want = want, env = env)
270271

271272
_MISC_EXPRESSIONS = [
273+
_expr_case('python_version == "3.*"', True, {"python_version": "3.10.1"}),
272274
]
273275

274276
def _misc_expressions(env):

0 commit comments

Comments
 (0)