公众授权版:normal · 1000 次 · 有效期至 2026-12-31
副本编号 LY-20261007-AC63(水印指纹已嵌入) 含 README、.gitignore;排除 .DS_Store / __pycache__ / .pytest_cache
This commit is contained in:
+38
@@ -0,0 +1,38 @@
|
||||
# -*- coding:utf-8 -*-
|
||||
from __future__ import annotations
|
||||
|
||||
from abc import ABC, abstractmethod
|
||||
from typing import TYPE_CHECKING
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from tyme4py.eightchar import EightChar
|
||||
from tyme4py.lunar import LunarHour
|
||||
from tyme4py.solar import SolarTime, SolarTerm
|
||||
from tyme4py.eightchar import ChildLimitInfo
|
||||
|
||||
|
||||
class EightCharProvider(ABC):
|
||||
"""八字计算接口"""
|
||||
|
||||
@abstractmethod
|
||||
def get_eight_char(self, hour: LunarHour) -> EightChar:
|
||||
"""
|
||||
八字
|
||||
:param hour: 农历时辰
|
||||
:return: 八字 EightChar
|
||||
"""
|
||||
pass
|
||||
|
||||
|
||||
class ChildLimitProvider(ABC):
|
||||
"""童限计算接口"""
|
||||
|
||||
@abstractmethod
|
||||
def get_info(self, birth_time: SolarTime, term: SolarTerm) -> ChildLimitInfo:
|
||||
"""
|
||||
童限信息
|
||||
:param birth_time:出生公历时刻
|
||||
:param term: 节令
|
||||
:return: 童限信息
|
||||
"""
|
||||
pass
|
||||
Reference in New Issue
Block a user