Skip to content

refactor(data_sources): remove duplicate unknown-market warning in normalize_market - #285

Merged
brokermr810 merged 1 commit into
OpenByteInc:mainfrom
kenylerich:refactor/dedupe-unknown-market-warning
Oct 15, 2026
Merged

brokermr810 merged 1 commit into
OpenByteInc:mainfrom
kenylerich:refactor/dedupe-unknown-market-warning

Conversation

@kenylerich

Copy link
Copy Markdown
Contributor

Summary

  • Remove the legacy logger.warning(...) block left over in DataSourceFactory.normalize_market() after the migration to _log_limited().
  • The unknown-market branch previously logged the same warning twice — once deduplicated via _log_limited(), and once via a plain logger.warning() that bypassed log deduplication.
  • This makes the branch consistent with the other failure branches in this factory (kline, ticker, fd-cooldown, ticker-batch), which all log via _log_limited().

Behavior

No caller-visible behavior change: unknown market categories are still logged (once per key per dedup window, with a suppressed-duplicate count) and passed through unchanged.

Testing

  • Syntax check via python3 -c "import ast; ast.parse(...)" — passed.
  • Pure log-statement removal; no logic or contract change.

…rmalize_market

The unknown-market branch in DataSourceFactory.normalize_market() emitted
the same warning twice: once through _log_limited() (deduplicated) and
once through a plain logger.warning() left over from an earlier
refactoring, which bypassed log deduplication.

Drop the legacy logger.warning() call so the branch logs exclusively via
_log_limited(), consistent with the other failure branches in this
factory (kline, ticker, fd-cooldown, ticker-batch). No behavior change
for callers: unknown market categories are still logged and passed
through unchanged.
@brokermr810
brokermr810 merged commit 5fd46d2 into OpenByteInc:main Oct 15, 2026
@kenylerich
kenylerich deleted the refactor/dedupe-unknown-market-warning branch October 19, 2026 16:36
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.

2 participants