Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Apply suggestions from code review
Co-authored-by: Brandt Bucher <brandtbucher@gmail.com>
  • Loading branch information
AlexWaygood and brandtbucher authored Apr 27, 2023
commit a27d70888c116ea64e13ae45142cf4240641b9b3
3 changes: 1 addition & 2 deletions pyperformance/_benchmark.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,8 +167,7 @@ def extra_opts(self):

@property
def python(self):
req = self._get_metadata_value("python", None)
return None if req is None else SpecifierSet(req)
return SpecifierSet(self._get_metadata_value("python", ""))

# Other metadata keys:
# * base
Expand Down
2 changes: 1 addition & 1 deletion pyperformance/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ def parse_entry(o, s):
logging.warning(f"no benchmark named {bench!r}")
continue
# Filter out any benchmarks that can't be run on the Python version we're running
if bench.python is not None and this_python_version in bench.python:
if this_python_version in bench.python:
selected.append(bench)

return selected
Expand Down