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" 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