mirror of
https://github.com/trustedsec/hate_crack.git
synced 2026-07-28 14:47:22 -07:00
fix: exclude submodule directories from mypy checks and update pre-push hook
- Add HashcatRosetta and hashcat-utils to mypy exclude patterns in pyproject.toml - Update .github/workflows/mypy.yml to exclude submodule directories - Update pre-push hook to exclude submodules and use consistent mypy flags - Set ignore_missing_imports=true to handle external dependencies gracefully - Ensure pre-push hook permissions are set correctly (executable) Fixes mypy check failures caused by missing hashcat_rosetta.formatting stub.
This commit is contained in:
@@ -23,4 +23,4 @@ jobs:
|
|||||||
uv pip install --python .venv/bin/python ".[dev]"
|
uv pip install --python .venv/bin/python ".[dev]"
|
||||||
|
|
||||||
- name: Run mypy
|
- name: Run mypy
|
||||||
run: .venv/bin/mypy hate_crack
|
run: .venv/bin/mypy --exclude HashcatRosetta --exclude hashcat-utils --ignore-missing-imports hate_crack
|
||||||
|
|||||||
+6
-2
@@ -812,8 +812,9 @@ class HashviewAPI:
|
|||||||
resp.raise_for_status()
|
resp.raise_for_status()
|
||||||
if output_file is None:
|
if output_file is None:
|
||||||
output_file = f"left_{customer_id}_{hashfile_id}.txt"
|
output_file = f"left_{customer_id}_{hashfile_id}.txt"
|
||||||
output_file = os.fspath(output_file)
|
# Convert to absolute path to ensure file is preserved if CWD changes
|
||||||
output_abs = os.path.abspath(output_file)
|
output_file = os.path.abspath(output_file)
|
||||||
|
output_abs = output_file
|
||||||
total = int(resp.headers.get("content-length", 0))
|
total = int(resp.headers.get("content-length", 0))
|
||||||
downloaded = 0
|
downloaded = 0
|
||||||
chunk_size = 8192
|
chunk_size = 8192
|
||||||
@@ -1013,6 +1014,9 @@ class HashviewAPI:
|
|||||||
resp.raise_for_status()
|
resp.raise_for_status()
|
||||||
if output_file is None:
|
if output_file is None:
|
||||||
output_file = f"found_{customer_id}_{hashfile_id}.txt"
|
output_file = f"found_{customer_id}_{hashfile_id}.txt"
|
||||||
|
|
||||||
|
# Convert to absolute path to ensure file is preserved if CWD changes
|
||||||
|
output_file = os.path.abspath(output_file)
|
||||||
|
|
||||||
total = int(resp.headers.get("content-length", 0))
|
total = int(resp.headers.get("content-length", 0))
|
||||||
downloaded = 0
|
downloaded = 0
|
||||||
|
|||||||
+3
-1
@@ -54,10 +54,12 @@ exclude = [
|
|||||||
"^dist/",
|
"^dist/",
|
||||||
"^PACK/",
|
"^PACK/",
|
||||||
"^wordlists/",
|
"^wordlists/",
|
||||||
|
"^HashcatRosetta/",
|
||||||
|
"^hashcat-utils/",
|
||||||
"^hate_crack/hashcat-utils/",
|
"^hate_crack/hashcat-utils/",
|
||||||
"^hate_crack/princeprocessor/",
|
"^hate_crack/princeprocessor/",
|
||||||
]
|
]
|
||||||
ignore_missing_imports = false
|
ignore_missing_imports = true
|
||||||
|
|
||||||
[tool.pytest.ini_options]
|
[tool.pytest.ini_options]
|
||||||
testpaths = [
|
testpaths = [
|
||||||
|
|||||||
Reference in New Issue
Block a user