Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 29 additions & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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/
Expand All @@ -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
Expand Down
4 changes: 0 additions & 4 deletions .pylintrc
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down
4 changes: 0 additions & 4 deletions whoisdomain/cache/simpleCacheBase.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,3 @@ def get(
return None

return cData[1]


if __name__ == "__main__":
pass
4 changes: 0 additions & 4 deletions whoisdomain/cache/simpleCacheWithFile.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,3 @@ def get(
) -> Optional[str]:
self._fileLoad()
return super().get(keyString=keyString)


if __name__ == "__main__":
pass
4 changes: 0 additions & 4 deletions whoisdomain/handleDateStrings.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,3 @@ def str_to_date(

msg = f"Unknown date format: '{text}'"
raise UnknownDateFormat(msg)


if __name__ == "__main__":
pass