Skip to content
This repository was archived by the owner on May 25, 2026. It is now read-only.

refactor: add specific type hints for all side: str#313

Open
RecRanger wants to merge 1 commit into
Polymarket:mainfrom
RecRanger:literal-buy-sell
Open

refactor: add specific type hints for all side: str#313
RecRanger wants to merge 1 commit into
Polymarket:mainfrom
RecRanger:literal-buy-sell

Conversation

@RecRanger
Copy link
Copy Markdown

@RecRanger RecRanger commented Mar 26, 2026

Overview

Description

Add specific type hints for all side: str. Generally, they are side: Literal["BUY", "SELL"]

Types of changes

  • Refactor/enhancement
  • Bug fix/behavior correction
  • New feature
  • Breaking change
  • Other, additional

Notes

Status

  • Prefix PR title with [WIP] if necessary (changes not yet made).
  • Add tests to cover changes as needed.
  • Update documentation/changelog as needed.
  • Verify all tests run correctly in CI and pass.
  • Ready for review/merge.

Note

Low Risk
Low risk refactor limited to type annotations; runtime behavior is unchanged, though stricter typing may surface downstream mypy/IDE warnings where non-supported side strings are passed.

Overview
Tightens type hints across the client, order builder, and RFQ types by replacing generic side: str parameters with Literal["BUY", "SELL"] (and "" where optional) to make valid order sides explicit.

Updates affected function signatures and dataclass fields (e.g., OrderArgs, MarketOrderArgs, BookParams, RFQ user inputs, and calculate_market_price) and adds the necessary Literal imports.

Written by Cursor Bugbot for commit 83edd53. This will update automatically on new commits. Configure here.

@RecRanger RecRanger requested a review from a team as a code owner March 26, 2026 21:43
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant