Skip to content

refactor: reorder if clause#81

Open
asmfstatoil wants to merge 4 commits into
equinor:mainfrom
asmfstatoil:logging
Open

refactor: reorder if clause#81
asmfstatoil wants to merge 4 commits into
equinor:mainfrom
asmfstatoil:logging

Conversation

@asmfstatoil

Copy link
Copy Markdown
Contributor

doc: type hinting

Description

Simplified code and reduced some function calls, and added type hinting.

Type of change

Refactor.

How Has This Been Tested?

Running test cases.

Checklist:

  • I have performed a self-review of my own code
  • My changes generate no new warnings
  • New and existing unit tests pass locally with my changes

Copilot AI review requested due to automatic review settings May 26, 2026 16:45

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

Refines the retry decorator by adding type hints and simplifying the retry logging logic.

Changes:

  • Added logging and Optional imports and typed the logger parameter.
  • Refactored retry-warning logging to avoid duplicated logger is not None checks.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines 40 to 41
time.sleep(_delay)
_delay *= backoff_factor
Comment thread src/omnia_timeseries/helpers.py Outdated
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

@franktore franktore left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks good, but agree with copilot on avoiding unnecessary delay for _tries=0 case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants