Skip to content

fix: end_point コンストラクタ引数が無視される問題の修正#25

Open
aobathree wants to merge 1 commit into
bitbankinc:masterfrom
aobathree:fix/end-point-argument
Open

fix: end_point コンストラクタ引数が無視される問題の修正#25
aobathree wants to merge 1 commit into
bitbankinc:masterfrom
aobathree:fix/end-point-argument

Conversation

@aobathree

Copy link
Copy Markdown

概要

bitbankcc_private.__init__end_point 引数は現在使用されておらず、config['end_point'] のみが参照されています。そのため private(KEY, SECRET, 'https://example.com/v1') のようにエンドポイントを引数で指定しても、実際には本番 API(https://api.bitbank.cc/v1)に接続されます。

変更内容

  • configend_point がある場合は従来どおり config を優先
  • configend_point がない場合は end_point 引数を使用
  • あわせてミュータブルなデフォルト引数(config=default_config)を config=None に変更し、共有辞書の意図しない書き換えを防止

互換性への影響

既存の呼び出し(configend_point を指定、または引数を省略)の挙動は変わりません。config と引数の両方で指定された場合に config を優先するのは、従来動いていたコードの挙動を維持するためです。

🤖 Generated with Claude Code

これまで bitbankcc_private の end_point 引数は実際には使われず、
config['end_point'] のみが参照されていました。そのため
private(KEY, SECRET, 'https://example.com/v1') のように
エンドポイントを引数で指定しても本番 API に接続されていました。

- config に 'end_point' がある場合は従来どおり config を優先
- config に 'end_point' がない場合は end_point 引数を使用
- あわせてミュータブルなデフォルト引数 (config=default_config) を
  config=None に変更(共有辞書の意図しない書き換えを防止)

既存の呼び出し(config 指定・引数省略)の挙動は変わりません。

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@soichirokodama

Copy link
Copy Markdown
Collaborator

プルリクエストの作成ありがとうございます。
内容について社内で確認させていただきます。
よろしくお願いします。

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