Files
f7a92b3903 chore(lint): replace flake8 and black with ruff for unified linting and formatting (#544)
* Initial plan

* feat: replace flake8 and black with ruff for unified linting and formatting

Co-authored-by: NewFuture <6290356+NewFuture@users.noreply.github.com>

* refactor: use astral-sh/ruff-action@v3 for cleaner CI workflow

Co-authored-by: NewFuture <6290356+NewFuture@users.noreply.github.com>

* run format

* use fmt skip

* fix cloudflare

* fix cron

* fix cron

* fix fileio tests

* fix fileio tests

* fix cron

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: NewFuture <6290356+NewFuture@users.noreply.github.com>
Co-authored-by: New Future <NewFuture@users.noreply.github.com>
2025-08-09 11:29:35 +08:00

20 lines
586 B
Python

# coding=utf-8
"""
DebugProvider
仅打印出 IP 地址,不进行任何实际 DNS 更新。
"""
from ._base import SimpleProvider
class DebugProvider(SimpleProvider):
def _validate(self):
"""无需任何验证"""
pass
def set_record(self, domain, value, record_type="A", ttl=None, line=None, **extra):
self.logger.debug("DebugProvider: %s(%s) => %s", domain, record_type, value)
ip_type = "IPv4" if record_type == "A" else "IPv6" if record_type == "AAAA" else record_type
print("[{}] {}".format(ip_type, value))
return True