fix: end_point コンストラクタ引数が無視される問題の修正#25
Open
aobathree wants to merge 1 commit into
Open
Conversation
これまで 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>
Collaborator
|
プルリクエストの作成ありがとうございます。 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
概要
bitbankcc_private.__init__のend_point引数は現在使用されておらず、config['end_point']のみが参照されています。そのためprivate(KEY, SECRET, 'https://example.com/v1')のようにエンドポイントを引数で指定しても、実際には本番 API(https://api.bitbank.cc/v1)に接続されます。変更内容
configにend_pointがある場合は従来どおりconfigを優先configにend_pointがない場合はend_point引数を使用config=default_config)をconfig=Noneに変更し、共有辞書の意図しない書き換えを防止互換性への影響
既存の呼び出し(
configでend_pointを指定、または引数を省略)の挙動は変わりません。configと引数の両方で指定された場合にconfigを優先するのは、従来動いていたコードの挙動を維持するためです。🤖 Generated with Claude Code