Skip to content
Closed
Changes from all commits
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
6 changes: 3 additions & 3 deletions pulser-core/pulser/pulse.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,9 +106,9 @@ def __init__(
)
if np.any(amplitude.samples.as_array(detach=True) < 0):
raise ValueError(
"All samples of an amplitude waveform must be "
"greater than or equal to zero."
)
f"All samples of an amplitude waveform must be >= 0; "

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

flake8 is complaining because this f-string doesn't have any value to fill in. Delete the f to pass the tests.

f"found invalid values in amplitude waveform: {amplitude}."

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I find the suggestion of @HGSilveri better:

Suggested change
f"found invalid values in amplitude waveform: {amplitude}."
f"found negative values in amplitude waveform: {amplitude}."

)
object.__setattr__(self, "amplitude", amplitude)
object.__setattr__(self, "detuning", detuning)
assert not isinstance(phase, Parametrized)
Expand Down
Loading