mirror of
https://github.com/trustedsec/hate_crack.git
synced 2026-06-27 17:03:16 -07:00
refactor: add optional dev dependencies and mypy configuration
- Add optional [dev] dependency group with mypy, ruff, pytest, and type stubs - Include types-requests, types-beautifulsoup4, and types-openpyxl - Add mypy config to exclude submodule directories - Update GitHub workflow to install with optional dev dependencies - Remove --ignore-missing-imports flag from mypy for stricter type checking
This commit is contained in:
@@ -25,14 +25,13 @@ jobs:
|
||||
- name: Install project dependencies
|
||||
run: |
|
||||
uv venv .venv
|
||||
uv pip install --python .venv/bin/python pytest pytest-cov ruff mypy
|
||||
uv pip install --python .venv/bin/python .
|
||||
uv pip install --python .venv/bin/python ".[dev]"
|
||||
|
||||
- name: Run ruff
|
||||
run: .venv/bin/ruff check hate_crack
|
||||
|
||||
- name: Run mypy
|
||||
run: .venv/bin/mypy --ignore-missing-imports hate_crack
|
||||
run: .venv/bin/mypy hate_crack
|
||||
|
||||
- name: Run tests
|
||||
env:
|
||||
|
||||
+1
-1
@@ -29,7 +29,7 @@ requests: Any = None
|
||||
REQUESTS_AVAILABLE = False
|
||||
|
||||
try:
|
||||
import requests as requests # type: ignore[import-untyped] # noqa: F401
|
||||
import requests as requests # type: ignore[import-untyped, no-redef] # noqa: F401
|
||||
|
||||
REQUESTS_AVAILABLE = True
|
||||
except Exception:
|
||||
|
||||
@@ -16,6 +16,17 @@ dependencies = [
|
||||
[project.scripts]
|
||||
hate_crack = "hate_crack.__main__:main"
|
||||
|
||||
[project.optional-dependencies]
|
||||
dev = [
|
||||
"mypy>=1.8.0",
|
||||
"ruff>=0.3.0",
|
||||
"pytest>=7.0.0",
|
||||
"pytest-cov>=4.0.0",
|
||||
"types-requests>=2.31.0",
|
||||
"types-beautifulsoup4>=4.12.0",
|
||||
"types-openpyxl>=3.0.0",
|
||||
]
|
||||
|
||||
[tool.setuptools.packages.find]
|
||||
include = ["hate_crack*"]
|
||||
|
||||
@@ -36,6 +47,17 @@ exclude = [
|
||||
"wordlists",
|
||||
]
|
||||
|
||||
[tool.mypy]
|
||||
exclude = [
|
||||
"^build/",
|
||||
"^dist/",
|
||||
"^PACK/",
|
||||
"^wordlists/",
|
||||
"^hate_crack/hashcat-utils/",
|
||||
"^hate_crack/princeprocessor/",
|
||||
]
|
||||
ignore_missing_imports = false
|
||||
|
||||
[tool.pytest.ini_options]
|
||||
testpaths = [
|
||||
"tests",
|
||||
|
||||
Reference in New Issue
Block a user