badboy · GitHub

Merged

Merged

Conversation

@badboy

@badboy

@badboy

This is implemented the same way time_unit is implemented for others:
The specific metric class takes the argument, not the generic one.
Because the schema enforces `unit` to be required for `quantity` we can
just `pop` it with the guarantee it's there.
The error message for other metrics if they do set `unit` is less nice:
    Metric.__init__() got an unexpected keyword argument 'unit'
But that's in line with what `time_unit` also does.

@badboy

@chutten

@chutten

chutten deleted the disallow-unit-everywhere-but-quantity branch

October 3, 2023 14:31

badboy added a commit that referenced this pull request

Nov 3, 2023
This partially reverts #630 (and subsequent fixes) and should unblock
all failures in probe-scraper and co.

badboy added a commit that referenced this pull request

Nov 3, 2023
This partially reverts #630 (and subsequent fixes) and should unblock
all failures in probe-scraper and co.

Merged

3 tasks

badboy added a commit that referenced this pull request

Nov 3, 2023
This partially reverts #630 (and subsequent fixes) and should unblock
all failures in probe-scraper and co.

badboy added a commit that referenced this pull request

Nov 3, 2023
This partially reverts #630 (and subsequent fixes) and should unblock
all failures in probe-scraper and co.

Labels

None yet

Read the original on github.com ↗