Skip to content

Conversation

@xingarr
Copy link

@xingarr xingarr commented Nov 4, 2025

Description

This PR addresses two code quality issues found during codebase review:

Changes

  1. Remove duplicate import - OptionsDepthCacheManager was imported twice in binance/init.py (lines 13 and 16)
  2. Improve type checking - Replaced type(ts_str) == int with isinstance(ts_str, int) in helpers.py for better Python practices

Why?

  • Duplicate imports are redundant and can cause confusion
  • isinstance() is the Pythonic way to check types and respects inheritance, while type() comparison does not

Testing

  • Existing tests pass
  • No breaking changes
  • Code follows project style guidelines

@xingarr xingarr requested a review from carlosmiei as a code owner November 4, 2025 11:55
Copy link
Collaborator

@pcriadoperez pcriadoperez left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks for the contribution!

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