Skip to content

Commit f21ff5e

Browse files
[pre-commit.ci] pre-commit autoupdate (#1914)
* [pre-commit.ci] pre-commit autoupdate updates: - [github.com/astral-sh/ruff-pre-commit: v0.4.10 → v0.5.0](astral-sh/ruff-pre-commit@v0.4.10...v0.5.0) - [github.com/pre-commit/mirrors-mypy: v1.10.0 → v1.10.1](pre-commit/mirrors-mypy@v1.10.0...v1.10.1) * style follow suggestion Signed-off-by: Henry Schreiner <[email protected]> --------- Signed-off-by: Henry Schreiner <[email protected]> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Henry Schreiner <[email protected]>
1 parent 973946b commit f21ff5e

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

.pre-commit-config.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,14 @@ repos:
1414
- id: trailing-whitespace
1515

1616
- repo: https://github.com/astral-sh/ruff-pre-commit
17-
rev: v0.4.10
17+
rev: v0.5.0
1818
hooks:
1919
- id: ruff
2020
args: ["--fix", "--show-fixes"]
2121
- id: ruff-format
2222

2323
- repo: https://github.com/pre-commit/mirrors-mypy
24-
rev: v1.10.0
24+
rev: v1.10.1
2525
hooks:
2626
- id: mypy
2727
name: mypy 3.8 on cibuildwheel/

cibuildwheel/projectfiles.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,8 @@ def is_main(parent: ast.AST | None) -> bool:
3939
if len(mains) != 1:
4040
return False
4141
consts = {x for x in values if isinstance(x, ast.Name) and x.id == "__name__"}
42-
if len(consts) != 1:
43-
return False
4442

45-
return True
43+
return len(consts) == 1
4644

4745

4846
class Analyzer(ast.NodeVisitor):

0 commit comments

Comments
 (0)