Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
クラスとサブクラスを取得し、フレームワークprefect.ioからデコレータ@taskを使用してメソッドを継承したいと考えています。
コードサンプル:
クラス
@task def test1(self): pass
サブクラス
def test2(self): print("succeed")
しかし今、メソッドtest2にはデコレータ@taskがありません。サブクラスで@taskを宣言できません。メソッドを上書きして @task を保持することは可能ですか?