-
Notifications
You must be signed in to change notification settings - Fork 0
Release 0.5.0: jitter, refresh opt-out, perf improvements #12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
fa60e16
8202219
767a73e
f55f87e
9e78970
079e31d
4e90782
64b7310
428bad7
b96c07d
ac51509
32211c9
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2,9 +2,13 @@ | |
| "venvPath": ".", | ||
| "venv": ".venv", | ||
| "pythonVersion": "3.11", | ||
| "typeCheckingMode": "basic", | ||
| "typeCheckingMode": "standard", | ||
| "reportMissingImports": "warning", | ||
| "reportMissingModuleSource": "warning", | ||
| "reportIncompatibleMethodOverride": false, | ||
| "reportIncompatibleVariableOverride": false, | ||
|
Comment on lines
+8
to
+9
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧩 Analysis chain🏁 Script executed: #!/bin/bash
# Compare current pyright output vs. output with override checks enabled.
python - <<'PY'
import json, tempfile, subprocess, pathlib
cfg_path = pathlib.Path("pyrightconfig.json")
cfg = json.loads(cfg_path.read_text())
strict = dict(cfg)
strict["reportIncompatibleMethodOverride"] = True
strict["reportIncompatibleVariableOverride"] = True
tmp = tempfile.NamedTemporaryFile("w", suffix=".json", delete=False)
json.dump(strict, tmp, indent=2)
tmp.close()
print("=== Current config ===")
subprocess.run([".venv/bin/pyright", "-p", str(cfg_path)], check=False)
print("\n=== With override diagnostics enabled ===")
subprocess.run([".venv/bin/pyright", "-p", tmp.name], check=False)
PYRepository: lfctech/snipeit-python-api Length of output: 678 🏁 Script executed: cat -n pyrightconfig.jsonRepository: lfctech/snipeit-python-api Length of output: 700 🏁 Script executed: # Find all Python files in the snipeit directory
find snipeit -name "*.py" -type f | head -20Repository: lfctech/snipeit-python-api Length of output: 649 🏁 Script executed: wc -l snipeit/resources/base.py && cat -n snipeit/resources/base.pyRepository: lfctech/snipeit-python-api Length of output: 19642 🏁 Script executed: # Search for classes that inherit from ApiObject or Manager
rg "class\s+\w+\((ApiObject|Manager|BaseResourceManager)" snipeit/Repository: lfctech/snipeit-python-api Length of output: 2378 🏁 Script executed: # Search for __init__ method overrides in subclasses
rg "__init__" snipeit/resources/ | grep -v "base.py" | grep "def __init__"Repository: lfctech/snipeit-python-api Length of output: 52 🏁 Script executed: # Check if any resource subclasses override common base class methods
rg "def (save|refresh|delete|_dirty_set|mark_dirty|_apply_server_data|_get|_create|_patch)" snipeit/resources/ | grep -v "base.py"Repository: lfctech/snipeit-python-api Length of output: 329 🏁 Script executed: cat -n snipeit/resources/assets/model.py | head -100Repository: lfctech/snipeit-python-api Length of output: 4587 🏁 Script executed: wc -l snipeit/resources/assets/model.py && tail -250 snipeit/resources/assets/model.pyRepository: lfctech/snipeit-python-api Length of output: 11388 🏁 Script executed: # Check Asset.save() signature more carefully and compare with base
sed -n '335,340p' snipeit/resources/assets/model.py
sed -n '244,246p' snipeit/resources/base.pyRepository: lfctech/snipeit-python-api Length of output: 407 🏁 Script executed: # Get exact line numbers for Asset.save() signature
sed -n '335,340p' snipeit/resources/assets/model.pyRepository: lfctech/snipeit-python-api Length of output: 321 🏁 Script executed: # Find the exact line where save() is defined in Asset
grep -n "def save" snipeit/resources/assets/model.pyRepository: lfctech/snipeit-python-api Length of output: 103 🏁 Script executed: # Compare Asset.save() signature with ApiObject.save() signature
sed -n '139,145p' snipeit/resources/assets/model.py
echo "---BASE CLASS---"
sed -n '244,250p' snipeit/resources/base.pyRepository: lfctech/snipeit-python-api Length of output: 783 🏁 Script executed: # Search for other method overrides that might have signature differences
find snipeit/resources -name "*.py" -exec grep -l "def save\|def _apply_server_data\|def _dirty_set\|def refresh" {} \;Repository: lfctech/snipeit-python-api Length of output: 130 🏁 Script executed: # Check if there are any subclasses of Asset that might have their own overrides
grep -r "class.*Asset" snipeit/ | grep -v "test" | grep -v ".pyc"Repository: lfctech/snipeit-python-api Length of output: 364 🏁 Script executed: # Check AssetsManager for any method overrides
cat -n snipeit/resources/assets/manager.pyRepository: lfctech/snipeit-python-api Length of output: 5014 Re-enable override compatibility diagnostics. Disabling 🤖 Prompt for AI Agents |
||
| "reportPrivateUsage": false, | ||
| "reportUnnecessaryTypeIgnoreComment": true, | ||
| "include": [ | ||
| "snipeit" | ||
| ], | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -5,6 +5,7 @@ | |
| """ | ||
|
|
||
| from typing import Any | ||
|
|
||
| from .base import ApiObject, BaseResourceManager | ||
|
|
||
|
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Update
mut-quickdescription (or restore scoped behavior).Line 29 says “scoped to highest-value source files”, but Line 31 runs the same full command as
mut. Please align comment and behavior to avoid misleading usage.🤖 Prompt for AI Agents