Skip to content

Commit

Permalink
Try make mypy happy about str
Browse files Browse the repository at this point in the history
  • Loading branch information
spencerwooo committed Feb 10, 2025
1 parent a83d969 commit aedd558
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
8 changes: 4 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,13 @@ Repository = "https://github.com/spencerwooo/torchattack"
Documentation = "https://github.com/spencerwooo/torchattack/blob/main/README.md"

[dependency-groups]
dev = ["mypy>=1.13.0", "rich>=13.9.4", "timm>=1.0.12"]
dev = ["mypy>=1.15.0", "rich>=13.9.4", "timm>=1.0.14"]
test = ["pytest-cov>=6.0.0", "pytest>=8.3.4"]
docs = [
"mkdocs-awesome-pages-plugin>=2.9.3",
"mkdocs-awesome-pages-plugin>=2.10.1",
"mkdocs-gen-files>=0.5.0",
"mkdocs-material>=9.5.48",
"mkdocstrings[python]>=0.27.0",
"mkdocs-material>=9.6.3",
"mkdocstrings[python]>=0.28.0",
]

[build-system]
Expand Down
2 changes: 1 addition & 1 deletion torchattack/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
from torchattack.vmifgsm import VMIFGSM
from torchattack.vnifgsm import VNIFGSM

__version__ = '1.2.1'
__version__ = '1.3.0'

__all__ = [
# Helper function to create an attack by its name
Expand Down
1 change: 1 addition & 0 deletions torchattack/vdc.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ def __init__(
elif hasattr(model, 'model_name'):
# If model is initialized via `torchattack.AttackModel`, the model_name
# is automatically attached to the model during instantiation.
assert isinstance(str, model.model_name)
self.hook_cfg = model.model_name

self.eps = eps
Expand Down

0 comments on commit aedd558

Please sign in to comment.