From bb3c5d9df2f09b52c9f741864fb7a7abf33233ab Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 27 Mar 2026 20:00:29 +0000 Subject: [PATCH 1/3] Initial plan From d01d98f9768f3a946db0da9eaa3d76aa8dc8677d Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 27 Mar 2026 20:01:45 +0000 Subject: [PATCH 2/3] Fix RUF050 and W391 ruff errors: remove empty if __name__ == main blocks Agent-Logs-Url: https://github.com/Misiu/WhoisDomain/sessions/a428e5ba-65f5-46c4-b0b7-e3a25613d9c4 Co-authored-by: Misiu <1741838+Misiu@users.noreply.github.com> --- whoisdomain/cache/simpleCacheBase.py | 4 ---- whoisdomain/cache/simpleCacheWithFile.py | 4 ---- whoisdomain/handleDateStrings.py | 4 ---- 3 files changed, 12 deletions(-) diff --git a/whoisdomain/cache/simpleCacheBase.py b/whoisdomain/cache/simpleCacheBase.py index c78ffd9..8f48922 100644 --- a/whoisdomain/cache/simpleCacheBase.py +++ b/whoisdomain/cache/simpleCacheBase.py @@ -47,7 +47,3 @@ def get( return None return cData[1] - - -if __name__ == "__main__": - pass diff --git a/whoisdomain/cache/simpleCacheWithFile.py b/whoisdomain/cache/simpleCacheWithFile.py index d146309..f06ac73 100644 --- a/whoisdomain/cache/simpleCacheWithFile.py +++ b/whoisdomain/cache/simpleCacheWithFile.py @@ -66,7 +66,3 @@ def get( ) -> Optional[str]: self._fileLoad() return super().get(keyString=keyString) - - -if __name__ == "__main__": - pass diff --git a/whoisdomain/handleDateStrings.py b/whoisdomain/handleDateStrings.py index 51e0f0f..069b8ef 100644 --- a/whoisdomain/handleDateStrings.py +++ b/whoisdomain/handleDateStrings.py @@ -142,7 +142,3 @@ def str_to_date( msg = f"Unknown date format: '{text}'" raise UnknownDateFormat(msg) - - -if __name__ == "__main__": - pass From c287daa20373b90682f97b76b92dedf3cb0cba80 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 27 Mar 2026 20:10:08 +0000 Subject: [PATCH 3/3] Add pylint to CI, add Python version matrix test job, fix requires-python Agent-Logs-Url: https://github.com/Misiu/WhoisDomain/sessions/c5dde6a2-962a-4e5f-a871-0b865b23036b Co-authored-by: Misiu <1741838+Misiu@users.noreply.github.com> --- .github/workflows/lint.yml | 30 +++++++++++++++++++++++++++++- .pylintrc | 4 ---- pyproject.toml | 2 +- 3 files changed, 30 insertions(+), 6 deletions(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 8ed8ebe..4adf89b 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -23,7 +23,7 @@ jobs: - name: Install dependencies run: | python -m pip install --upgrade pip - pip install ruff mypy tld types-redis types-requests python-dateutil + pip install ruff mypy pylint tld types-redis types-requests python-dateutil - name: Run ruff format check run: ruff format --check *.py whoisdomain/ @@ -34,6 +34,34 @@ jobs: - name: Run mypy (strict) run: mypy --strict --no-incremental *.py whoisdomain/ + - name: Run pylint + run: pylint --rcfile=.pylintrc whoisdomain/ + + test: + name: Test on Python ${{ matrix.python-version }} + runs-on: ubuntu-latest + timeout-minutes: 10 + strategy: + fail-fast: false + matrix: + python-version: ["3.10", "3.11", "3.12", "3.13"] + steps: + - name: Check out repository + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 + + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0 + with: + python-version: ${{ matrix.python-version }} + + - name: Install package + run: | + python -m pip install --upgrade pip + pip install . + + - name: Smoke test + run: python -c "import whoisdomain; print(whoisdomain.getVersion())" + build: name: Build distribution packages runs-on: ubuntu-latest diff --git a/.pylintrc b/.pylintrc index 7ee32e1..3f3bc8b 100644 --- a/.pylintrc +++ b/.pylintrc @@ -99,10 +99,6 @@ recursive=yes # source root. source-roots= -# When enabled, pylint would attempt to guess common misconfiguration and emit -# user-friendly hints instead of false-positive error messages. -suggestion-mode=no - # Allow loading of arbitrary C extensions. Extensions are imported into the # active Python interpreter and may run arbitrary code. unsafe-load-any-extension=no diff --git a/pyproject.toml b/pyproject.toml index 6e9dbb6..86ea288 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -16,7 +16,7 @@ description = "Python package for retrieving WHOIS information of domains." readme = "README.md" - requires-python = ">3.6" + requires-python = ">=3.10" license = "MIT"