Skip to content

Commit

Permalink
🩹 fix: util function typo
Browse files Browse the repository at this point in the history
  • Loading branch information
YounesOMK committed Dec 22, 2023
1 parent c4bbe6a commit fc23a57
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions metricheq/extractors/git_providers/github.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
GitProviderLastCommitFreshnessExtractor,
GitProviderLastWorkFlowDurationExtractor,
)
from metricheq.extractors.utils import convert_seconds
from metricheq.extractors.utils import convert_to_seconds


class GitHubFileExistsExtractor(GitProviderFileExistsExtractor):
Expand Down Expand Up @@ -41,7 +41,7 @@ def process_data(self, response):
response.raise_for_status()

def finalize(self, duration_in_seconds: float):
return convert_seconds(duration_in_seconds, self.params_model.format)
return convert_to_seconds(duration_in_seconds, self.params_model.format)


class GitHubLastCommitFreshnessExtractor(GitProviderLastCommitFreshnessExtractor):
Expand All @@ -63,4 +63,4 @@ def process_data(self, response):
response.raise_for_status()

def finalize(self, time_elapsed_in_seconds):
return convert_seconds(time_elapsed_in_seconds, self.params_model.format)
return convert_to_seconds(time_elapsed_in_seconds, self.params_model.format)
2 changes: 1 addition & 1 deletion metricheq/extractors/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ class DurationFormat(str, Enum):
DAYS = "days"


def convert_seconds(duration_in_seconds, format: DurationFormat):
def convert_to_seconds(duration_in_seconds, format: DurationFormat):
if format == DurationFormat.SECONDS:
return duration_in_seconds
elif format == DurationFormat.MINUTES:
Expand Down

0 comments on commit fc23a57

Please sign in to comment.