Split metric-bench's main into run_scores and measured, find the checkout from the history, drop an ambiguous shortened path, write places from the repository root, and give item 85 the history's reader
This commit is contained in:
@@ -14,6 +14,12 @@ class Unit:
|
||||
shared_state: int
|
||||
|
||||
|
||||
def measured(path: str) -> bool:
|
||||
"""A Python file outside the tests."""
|
||||
folders, _, name = path.rpartition("/")
|
||||
return name.endswith(".py") and not name.startswith("test_") and not name.endswith("_test.py") and "tests" not in folders.split("/")
|
||||
|
||||
|
||||
def python_units(path: str, source: str) -> list[Unit]:
|
||||
"""Each module-level function and each method in source, with its metrics; a source that does not parse has none."""
|
||||
try:
|
||||
|
||||
Reference in New Issue
Block a user