File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11from __future__ import annotations
22
3- import re
43from importlib .metadata import PackageNotFoundError , requires , version
54
65from dandischema .models import DandiBaseModel
6+ from packaging .requirements import Requirement
77from pytest import Config , Item , Parser
88
99from .tests .fixtures import * # noqa: F401, F403 # lgtm [py/polluting-import]
@@ -41,11 +41,7 @@ def pytest_report_header(config: Config) -> list[str]:
4141 # Extract package names from requirement strings.
4242 # Format: "package-name >= 1.0" or "package-name ; condition"
4343 # and by regex thus we skip extras (in square brackets like [test])
44- deps = {
45- match .group (1 )
46- for dep in (requires ("dandi" ) or [])
47- if (match := re .match (r"^([a-zA-Z0-9_-]+)" , dep ))
48- }
44+ deps = {Requirement (dep ).name for dep in (requires ("dandi" ) or [])}
4945 except PackageNotFoundError :
5046 # Use defaults if we didn't get deps from metadata
5147 deps = {"dandischema" , "h5py" , "hdmf" }
You can’t perform that action at this time.
0 commit comments