Navi2ch for Emacs (Part 22) (390レス)
上下前次1-新
抽出解除 レス栞
318(2): 2024/08/29(木)10:39 AAS
>>317
まだこうなっちゃう
Traceback (most recent call last):
File "/home/*/navi2ch/scripts/default_options.py", line 12, in <module>
def find_emacs_in_path() -> pathlib.Path | None:
TypeError: unsupported operand type(s) for |: 'type' and 'NoneType'
meson.build:6:25: ERROR: Command `/usr/bin/python scripts/default_options.py` failed with status 1.
319: 2024/08/29(木)12:07 AAS
>>317
>>318
全く問題なくできましたm(__)m
321(1): 2024/08/29(木)15:57 AAS
>>318
> def find_emacs_in_path() -> pathlib.Path | None:
> TypeError: unsupported operand type(s) for |: 'type' and 'NoneType'
pythonのバージョンが古くて、新しいタイプヒントの記法を解釈できないのかな?
何ヶ所かある戻り値のタイプヒントをお手軽修正は↓
import typing
しておいて↓のようになおすだけど、
-def find_emacs_in_path() -> pathlib.Path | None:
+def find_emacs_in_path() -> typing.Union[pathlib.Path, None]:
default_options.pyはオプションのデフォルト値を求めるスクリプトなので、
省10
上下前次1-新書関写板覧索設栞歴
スレ情報 赤レス抽出 画像レス抽出 歴の未読スレ AAサムネイル
ぬこの手 ぬこTOP 1.064s*