From 39c6e8bd16ee45f5089f2de3b7d659dc2e98480c Mon Sep 17 00:00:00 2001 From: GreatBahram Date: Mon, 3 Mar 2025 09:23:54 +0100 Subject: [PATCH 1/9] it turnsout we have python-version but pyproject.toml --- .github/workflows/publish.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index b7fc5a3..651c437 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -23,4 +23,4 @@ jobs: with: name: dist path: dist/ - retention-days: 5 \ No newline at end of file + retention-days: 5 From 304c43a45f8393de941422e422e47fdcbedc3536 Mon Sep 17 00:00:00 2001 From: GreatBahram Date: Tue, 4 Mar 2025 23:20:30 +0100 Subject: [PATCH 2/9] remove useless directories --- src/tests/func/__init__.py | 0 src/tests/{unit => }/test_alaki.py | 0 src/tests/unit/__init__.py | 0 3 files changed, 0 insertions(+), 0 deletions(-) delete mode 100644 src/tests/func/__init__.py rename src/tests/{unit => }/test_alaki.py (100%) delete mode 100644 src/tests/unit/__init__.py diff --git a/src/tests/func/__init__.py b/src/tests/func/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/src/tests/unit/test_alaki.py b/src/tests/test_alaki.py similarity index 100% rename from src/tests/unit/test_alaki.py rename to src/tests/test_alaki.py diff --git a/src/tests/unit/__init__.py b/src/tests/unit/__init__.py deleted file mode 100644 index e69de29..0000000 From 82c623d54bd3adb64c665c09b33cc1fa02617072 Mon Sep 17 00:00:00 2001 From: GreatBahram Date: Tue, 4 Mar 2025 23:29:15 +0100 Subject: [PATCH 3/9] Remove commented documentation and update logging warning format in Shecan CLI project. --- src/shecan/__init__.py | 6 ------ src/shecan/api.py | 6 ------ src/shecan/cli.py | 4 ++-- 3 files changed, 2 insertions(+), 14 deletions(-) diff --git a/src/shecan/__init__.py b/src/shecan/__init__.py index 328d8c4..e82bada 100644 --- a/src/shecan/__init__.py +++ b/src/shecan/__init__.py @@ -1,9 +1,3 @@ -""" -Shecan CLI -~~~~~~~~~~~~~~~~~~~~~ -The Shecan CLI https://shecan.ir -""" - from .api import current_dns, list_dns, update from .utils import get_shecan_ips as get_ips diff --git a/src/shecan/api.py b/src/shecan/api.py index 23136e9..a43b4a5 100644 --- a/src/shecan/api.py +++ b/src/shecan/api.py @@ -1,9 +1,3 @@ -""" -shecan.api -~~~~~~~~~~~~ -This module implements Main API for shecan-cli project.. -""" - import sys from typing import NamedTuple diff --git a/src/shecan/cli.py b/src/shecan/cli.py index 6ac8a64..55821b5 100644 --- a/src/shecan/cli.py +++ b/src/shecan/cli.py @@ -42,7 +42,7 @@ def update_resolv_file(content: list[str]) -> None: try: shutil.copy(resolv_file, tmp_resolv_file) except FileNotFoundError: - logger.warn(f"Resolv file not found ({resolv_file!s}).") + logger.warning(f"Resolv file not found ({resolv_file!s}).") except OSError as e: logger.error( f"Could not move resolv file ({resolv_file!s}) to " @@ -140,7 +140,7 @@ def shecan_cli() -> Optional[int]: args = parser.parse_args() - if len(sys.argv) == 1: + if len(sys.argv) == 1 or not hasattr(args, "op"): parser.print_help(sys.stderr) return 1 From e49c341b5362399b8c351e2a443c8c8fe1d69e30 Mon Sep 17 00:00:00 2001 From: GreatBahram Date: Tue, 4 Mar 2025 23:36:59 +0100 Subject: [PATCH 4/9] add the bumpversion to the .bumpversion.cfg --- .bumpversion.cfg | 1 + 1 file changed, 1 insertion(+) diff --git a/.bumpversion.cfg b/.bumpversion.cfg index dfffab7..f7af568 100644 --- a/.bumpversion.cfg +++ b/.bumpversion.cfg @@ -4,3 +4,4 @@ commit = True tag = True [bumpversion:file:src/shecan/__init__.py] +[bumpversion:file:pyproject.toml] From fe547124c03c6e1daa593a696da9eb9aa4419c47 Mon Sep 17 00:00:00 2001 From: GreatBahram Date: Tue, 4 Mar 2025 23:37:24 +0100 Subject: [PATCH 5/9] =?UTF-8?q?Bump=20version:=200.4.2=20=E2=86=92=200.4.2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .bumpversion.cfg | 1 + 1 file changed, 1 insertion(+) diff --git a/.bumpversion.cfg b/.bumpversion.cfg index f7af568..cd510eb 100644 --- a/.bumpversion.cfg +++ b/.bumpversion.cfg @@ -4,4 +4,5 @@ commit = True tag = True [bumpversion:file:src/shecan/__init__.py] + [bumpversion:file:pyproject.toml] From e44ddafc540a78512f0fccd237aec52b01b1cb5b Mon Sep 17 00:00:00 2001 From: GreatBahram Date: Tue, 4 Mar 2025 23:41:35 +0100 Subject: [PATCH 6/9] =?UTF-8?q?Bump=20version:=200.4.2=20=E2=86=92=200.4.3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .bumpversion.cfg | 2 +- pyproject.toml | 2 +- src/shecan/__init__.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.bumpversion.cfg b/.bumpversion.cfg index cd510eb..30f3494 100644 --- a/.bumpversion.cfg +++ b/.bumpversion.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 0.4.2 +current_version = 0.4.3 commit = True tag = True diff --git a/pyproject.toml b/pyproject.toml index 0fe45bb..0ac4d64 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "shecan" -version = "0.4.2" +version = "0.4.3" description = "The Shecan CLI is used to configure your DNS configuration based on Shecan website from the command line." readme = "README.md" authors = [ diff --git a/src/shecan/__init__.py b/src/shecan/__init__.py index e82bada..9a6fea0 100644 --- a/src/shecan/__init__.py +++ b/src/shecan/__init__.py @@ -8,4 +8,4 @@ "update", ] -version = "0.4.2" +version = "0.4.3" From 13cf118267b88e8c7d9c86234bedab504f32c171 Mon Sep 17 00:00:00 2001 From: GreatBahram Date: Tue, 4 Mar 2025 23:41:56 +0100 Subject: [PATCH 7/9] fuck bumpversion --- .bumpversion.cfg | 8 -------- 1 file changed, 8 deletions(-) delete mode 100644 .bumpversion.cfg diff --git a/.bumpversion.cfg b/.bumpversion.cfg deleted file mode 100644 index 30f3494..0000000 --- a/.bumpversion.cfg +++ /dev/null @@ -1,8 +0,0 @@ -[bumpversion] -current_version = 0.4.3 -commit = True -tag = True - -[bumpversion:file:src/shecan/__init__.py] - -[bumpversion:file:pyproject.toml] From 5b61e4c43dbc0d50eee78dc0bd8782607075b98d Mon Sep 17 00:00:00 2001 From: GreatBahram Date: Tue, 4 Mar 2025 23:42:43 +0100 Subject: [PATCH 8/9] remove the bumpversion file --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 0ac4d64..a72dcb8 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -78,4 +78,4 @@ select = [ "PLR0904", # Ignores "Too many public methods" "PLR0913", # Ignores "Too many arguments to function call" "PLR0917", # Ignores "Too many positional arguments" -] \ No newline at end of file +] From 7aae040bb7bf961122c85a0cdae6ed10fab0c9c5 Mon Sep 17 00:00:00 2001 From: GreatBahram Date: Tue, 4 Mar 2025 23:44:35 +0100 Subject: [PATCH 9/9] make ruff happy --- src/tests/__init__.py | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 src/tests/__init__.py diff --git a/src/tests/__init__.py b/src/tests/__init__.py new file mode 100644 index 0000000..e69de29