Skip to content

Commit dd3bae0

Browse files
authored
Improvement (#23)
* it turnsout we have python-version but pyproject.toml * remove useless directories * Remove commented documentation and update logging warning format in Shecan CLI project. * add the bumpversion to the .bumpversion.cfg * Bump version: 0.4.2 → 0.4.2 * Bump version: 0.4.2 → 0.4.3 * fuck bumpversion * remove the bumpversion file * make ruff happy
1 parent 4773063 commit dd3bae0

File tree

9 files changed

+6
-24
lines changed

9 files changed

+6
-24
lines changed

.bumpversion.cfg

Lines changed: 0 additions & 6 deletions
This file was deleted.

.github/workflows/publish.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,4 +23,4 @@ jobs:
2323
with:
2424
name: dist
2525
path: dist/
26-
retention-days: 5
26+
retention-days: 5

pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
44

55
[project]
66
name = "shecan"
7-
version = "0.4.2"
7+
version = "0.4.3"
88
description = "The Shecan CLI is used to configure your DNS configuration based on Shecan website from the command line."
99
readme = "README.md"
1010
authors = [
@@ -78,4 +78,4 @@ select = [
7878
"PLR0904", # Ignores "Too many public methods"
7979
"PLR0913", # Ignores "Too many arguments to function call"
8080
"PLR0917", # Ignores "Too many positional arguments"
81-
]
81+
]

src/shecan/__init__.py

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,3 @@
1-
"""
2-
Shecan CLI
3-
~~~~~~~~~~~~~~~~~~~~~
4-
The Shecan CLI https://shecan.ir
5-
"""
6-
71
from .api import current_dns, list_dns, update
82
from .utils import get_shecan_ips as get_ips
93

@@ -14,4 +8,4 @@
148
"update",
159
]
1610

17-
version = "0.4.2"
11+
version = "0.4.3"

src/shecan/api.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,3 @@
1-
"""
2-
shecan.api
3-
~~~~~~~~~~~~
4-
This module implements Main API for shecan-cli project..
5-
"""
6-
71
import sys
82
from typing import NamedTuple
93

src/shecan/cli.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ def update_resolv_file(content: list[str]) -> None:
4242
try:
4343
shutil.copy(resolv_file, tmp_resolv_file)
4444
except FileNotFoundError:
45-
logger.warn(f"Resolv file not found ({resolv_file!s}).")
45+
logger.warning(f"Resolv file not found ({resolv_file!s}).")
4646
except OSError as e:
4747
logger.error(
4848
f"Could not move resolv file ({resolv_file!s}) to "
@@ -140,7 +140,7 @@ def shecan_cli() -> Optional[int]:
140140

141141
args = parser.parse_args()
142142

143-
if len(sys.argv) == 1:
143+
if len(sys.argv) == 1 or not hasattr(args, "op"):
144144
parser.print_help(sys.stderr)
145145
return 1
146146

File renamed without changes.
File renamed without changes.

src/tests/unit/__init__.py

Whitespace-only changes.

0 commit comments

Comments
 (0)