Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pyright/Pylanceに対応する #719

Merged
merged 1 commit into from
Jan 1, 2024

Conversation

qryxip
Copy link
Member

@qryxip qryxip commented Dec 29, 2023

内容

Pyright/Pylanceに対応し、エラー/警告なく動くようにします。

(cd ./crates/voicevox_core_python_api && pyright) && (cd ./example/python && pyright)
0 errors, 0 warnings, 0 informations
0 errors, 0 warnings, 0 informations

関連 Issue

その他

CIでPyrightを動かすというのも考えたのですが、このPRではやっていません。mypyを入れるか次第ですね。両方サポートでもいい気はしますが。
(ちなみに私はNeovimでPythonを書いていますが、mypyではなくpyrightを使っています。LSPとしてフォーマッタが起動できないとかを除けば快適です)

@@ -22,6 +22,9 @@ build-backend = "maturin"
[tool.isort]
profile = "black"

[tool.pyright]
executionEnvironments = [{ root = "python/test" }, { root = "python" }]
Copy link
Member Author

@qryxip qryxip Dec 29, 2023

Choose a reason for hiding this comment

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

./pytest/testをroot扱いにしないと、test_….pyからのimport conftestが通らない。
(Pyright, Pylance共に)

Copy link
Member

@sevenc-nanashi sevenc-nanashi left a comment

Choose a reason for hiding this comment

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

LGTM。CIはあった方がいいと思います。

@Hiroshiba Hiroshiba merged commit 4e13bca into VOICEVOX:main Jan 1, 2024
32 checks passed
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.

3 participants