Skip to content

Commit

Permalink
Added "--version" invocation to mypy after installation to eliminate …
Browse files Browse the repository at this point in the history
…the artificial time associated with malware scanning on MacOS.
  • Loading branch information
erictraut committed Oct 10, 2024
1 parent e25184b commit fd98fde
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 6 deletions.
2 changes: 1 addition & 1 deletion conformance/results/mypy/version.toml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
version = "mypy 1.11.2"
test_duration = 12.7
test_duration = 1.9
2 changes: 1 addition & 1 deletion conformance/results/pyre/version.toml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
version = "pyre 0.9.22"
test_duration = 4.6
test_duration = 4.5
2 changes: 1 addition & 1 deletion conformance/results/pytype/version.toml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
version = "pytype 2024.09.13"
test_duration = 34.1
test_duration = 32.8
6 changes: 3 additions & 3 deletions conformance/results/results.html
Original file line number Diff line number Diff line change
Expand Up @@ -159,16 +159,16 @@ <h3>Python Type System Conformance Test Results</h3>
<div class="table_container"><table><tbody>
<tr><th class="col1">&nbsp;</th>
<th class='tc-header'><div class='tc-name'>mypy 1.11.2</div>
<div class='tc-time'>12.7sec</div>
<div class='tc-time'>1.9sec</div>
</th>
<th class='tc-header'><div class='tc-name'>pyright 1.1.384</div>
<div class='tc-time'>1.3sec</div>
</th>
<th class='tc-header'><div class='tc-name'>pyre 0.9.22</div>
<div class='tc-time'>4.6sec</div>
<div class='tc-time'>4.5sec</div>
</th>
<th class='tc-header'><div class='tc-name'>pytype 2024.09.13</div>
<div class='tc-time'>34.1sec</div>
<div class='tc-time'>32.8sec</div>
</th>
</tr>
<tr><th class="column" colspan="5">
Expand Down
5 changes: 5 additions & 0 deletions conformance/src/type_checker.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,11 @@ def install(self) -> bool:
[sys.executable, "-m", "pip", "install", "mypy"],
check=True,
)

# Run "mypy --version" to ensure that it's installed and to work
# around timing issues caused by malware scanners on some systems.
self.get_version()

return True
except CalledProcessError:
print("Unable to install mypy")
Expand Down

0 comments on commit fd98fde

Please sign in to comment.