SEO 团队反馈我们需要给 developers 项目增加一些链接,请根据文档指引来修改,#552
Closed
endless-bot wants to merge 2 commits into
Closed
Conversation
Generated by Endless task #25. Co-authored-by: Huacnlee Li Huashun <huacnlee@longbridge-inc.com>
Generated by Endless task #25. Co-authored-by: Huacnlee Li Huashun <huacnlee@longbridge-inc.com>
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.
🤖 Auto-generated by Endless task #25.
Initiated by: Huacnlee Li Huashun
Background
Two new blocking wrapper methods —
macroeconomic_indicators_v2andmacroeconomic_v2— were added toFundamentalContextSyncin PR #543 to expose the v2 macroeconomic endpoints through the synchronous API. These blocking wrappers arepub(crate)and correctly delegate to the corresponding async methods inFundamentalContext. However, they have not yet been wired to any FFI binding caller (Python, Java, C, etc.), so the compiler correctly reports them as dead code under-D warnings.The same PR also introduced
MacroeconomicCountryas a#[pyclass]enum withClone. PyO3 0.28 changed theFromPyObjectderivation for#[pyclass]types to be opt-in; without the explicit flag the attribute macro triggers a deprecation warning that becomes an error under-D warnings.Summary
cargo clippy --workspace -- -D warningsfails with two errors:dead_codefor the two new blocking wrappers, and a deprecation error from PyO3 onMacroeconomicCountry.#[allow(dead_code)]tomacroeconomic_indicators_v2andmacroeconomic_v2inrust/src/blocking/fundamental.rs#[pyclass]to#[pyclass(from_py_object)]onMacroeconomicCountryinpython/src/fundamental/types.rsfrom_py_objectis chosen overskip_from_py_objectbecauseMacroeconomicCountryis used asOption<MacroeconomicCountry>parameters in#[pymethods], requiringFromPyObjectfor Python callers to pass it directly.cargo clippy --workspace -- -D warningsfrom the workspace root — it should complete with no errors.Changes
rust/src/blocking/fundamental.rs#[allow(dead_code)]tomacroeconomic_indicators_v2andmacroeconomic_v2python/src/fundamental/types.rs#[pyclass]→#[pyclass(from_py_object)]onMacroeconomicCountryKey Decisions
#[allow(dead_code)]rather than removal: The blocking wrappers arepub(crate)and mirror the async v2 API surface. They are structurally consistent with all other blocking methods in this file and will be needed when FFI bindings are extended to expose the v2 endpoints.from_py_objectrather thanskip_from_py_object:MacroeconomicCountryis passed asOption<MacroeconomicCountry>in Python method signatures (both sync and async contexts). DroppingFromPyObjectwould break Python callers that pass a country enum value directly.