Skip to content

Commit

Permalink
Fix mypy hook in pre-commit
Browse files Browse the repository at this point in the history
This removes the types-all package from the mypy hook after
types-pkg-resources has been deprecated and yanked from PyPI. We list
our typing dependencies explicitly now.
  • Loading branch information
replaceafill authored Aug 2, 2024
1 parent 9c3b31f commit c34bc1b
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 5 deletions.
8 changes: 5 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ repos:
src/(MCPClient/MCPServer|dashboard)/osdeps/.*\.json
)
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.5.1
rev: v0.5.6
hooks:
- id: ruff
args: [--fix, --exit-non-zero-on-fix]
Expand Down Expand Up @@ -46,7 +46,9 @@ repos:
hooks:
- id: validate-cff
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.10.1
rev: v1.11.1
hooks:
- id: mypy
additional_dependencies: [types-all]
additional_dependencies:
- types-requests
- types-python-dateutil
5 changes: 4 additions & 1 deletion src/dashboard/src/fpr/south_migrations/0001_initial.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
from typing import Any
from typing import Dict

from south.db import db
from south.v2 import SchemaMigration

Expand Down Expand Up @@ -449,7 +452,7 @@ def backwards(self, orm):
# Deleting model 'FileIDsBySingleID'
db.delete_table("FileIDsBySingleID")

models = {
models: Dict[str, Any] = {
"fpr.agent": {
"Meta": {"object_name": "Agent", "db_table": "u'Agent'"},
"agentIdentifierType": (
Expand Down
5 changes: 4 additions & 1 deletion src/dashboard/src/fpr/south_migrations/0002_api_v2.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
from typing import Any
from typing import Dict

from south.db import db
from south.v2 import SchemaMigration

Expand Down Expand Up @@ -549,7 +552,7 @@ def backwards(self, orm):
),
)

models = {
models: Dict[str, Any] = {
"fpr.agent": {
"Meta": {"object_name": "Agent", "db_table": "u'Agent'"},
"agentIdentifierType": (
Expand Down

0 comments on commit c34bc1b

Please sign in to comment.