fix(verify): add generic type params to dict annotation#20
Open
Coding-Dev-Tools wants to merge 25 commits into
Open
fix(verify): add generic type params to dict annotation#20Coding-Dev-Tools wants to merge 25 commits into
Coding-Dev-Tools wants to merge 25 commits into
Conversation
…xit-on-revoked - verify command now auto-detects JWT tokens (3 dot-separated segments) and dispatches to verify_jwt_token; previously all tokens were checked as API keys, making JWT verification silently return INVALID - audit command now accepts --exit-on-expired and --exit-on-revoked flags for CI/CD pipeline use (documented in README but not implemented) - add 9 new tests covering the above; 67 tests pass (was 58)
* pin actions to SHAs, add CI/PyPI badges * fix: correct author email TOML syntax; update CI workflow * refactor(keygen): pre-compute datetime.now before loops in verify_api_key/verify_jwt_token; remove repeated inner imports
* fix: add MIT license classifier to pyproject.toml * fix: resolve mypy type errors (keygen now_str rename, cli list→list_keys) * chore: add .gitattributes to normalize line endings * feat: add return type annotations to public functions * feat: add py.typed marker and package-data for PEP 561 type checking support
…tes and .editorconfig (#5) - Fix AttributeError when check_expiry receives a non-string expires_at value (e.g. int). Added isinstance check before calling .replace(). - Add tests for malformed and non-string expiry date handling (verify.py now at 100% coverage, was 89%). - Add .gitattributes for consistent line endings across platforms. - Add .editorconfig matching existing ruff config (4-space indent, LF line endings, 2-space for YAML/TOML). Co-authored-by: DevForge Engineer <engineer@devforge.dev>
Resolves the merge of cowork/improve-apiauth into master: - src/apiauth/cli.py: kept the @cli.command() decorator (uses function name) over the broken @cli.command(name="list") variant that mis-registered 8 subcommands under a single "list" name. All 69 tests pass. - Normalized CRLF -> LF across 8 files (dependabot.yml, auto-code-review.yml, CHANGELOG.md, LICENSE, README.md, SECURITY.md, __init__.py, keystore.py) per the new .gitattributes and .editorconfig. - Stripped trailing whitespace from src/apiauth/cli.py. Verification: ruff check clean, pytest 69/69 pass.
…it/stats) and fix Windows UTF-8 encoding - 7 commands were registered with name='list' instead of their proper names, causing silent overwrites — only the last registered 'list' command worked - Add sys.stdout/stderr.reconfigure(encoding='utf-8') on Windows to prevent cp1252 encoding crashes with Rich library Unicode symbols
No content changes. Pure CRLF->LF normalization for: - .github/workflows/auto-code-review.yml - .gitignore, LICENSE, CHANGELOG.md, README.md, SECURITY.md - src/apiauth/__init__.py, src/apiauth/keystore.py Required because the merge commit ee08ecf stored CRLF blobs despite the repo's eol=lf rule, causing perpetual dirty working tree.
Repin to current release v3.95.6 (30d5bb91af1a771378349dbbb0c82129392acf70) to fix broken SHA reference that was preventing security CI from running.
Align tracked files with the repo's declared standards: - .editorconfig sets insert_final_newline = true - the end-of-file-fixer pre-commit hook enforces a single trailing newline Add a missing final newline to AGENTS.md, CONTRIBUTING.md, and requirements.txt; collapse a stray trailing blank line in README.md and .gitignore. No code or logic changes; ruff clean and all tests pass. Co-authored-by: repo-improver[bot] <repo-improver-bot@users.noreply.github.com>
…+ fallback for apiauth (#18) Co-authored-by: Senior Dev Rotation <senior-dev@devforge.dev>
Automated batch commit. Files changed: UU .gitignore UU README.md ?? .github/workflows/release-audit.yml ?? Makefile ?? uv.lock
Update check_expiry signature from dict to dict[str, object] for stricter type checking and modern Python style.
🤖 Automated Code Review✅ Ruff Lint — No issues
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Update
check_expirysignature fromdicttodict[str, object]for stricter type checking and modern Python style.Changes
src/apiauth/verify.py: Add generic type parameters todictannotationTesting
CI will run test/coverage/security jobs on this branch.