diff --git a/.bumpversion.cfg b/.bumpversion.cfg deleted file mode 100644 index dfffab7..0000000 --- a/.bumpversion.cfg +++ /dev/null @@ -1,6 +0,0 @@ -[bumpversion] -current_version = 0.4.2 -commit = True -tag = True - -[bumpversion:file:src/shecan/__init__.py] 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 diff --git a/pyproject.toml b/pyproject.toml index 0fe45bb..a72dcb8 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 = [ @@ -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 +] diff --git a/src/shecan/__init__.py b/src/shecan/__init__.py index 328d8c4..9a6fea0 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 @@ -14,4 +8,4 @@ "update", ] -version = "0.4.2" +version = "0.4.3" 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 diff --git a/src/tests/func/__init__.py b/src/tests/__init__.py similarity index 100% rename from src/tests/func/__init__.py rename to src/tests/__init__.py 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