Skip to content

Commit

Permalink
Fix few extra errors
Browse files Browse the repository at this point in the history
  • Loading branch information
alan-cooney committed Nov 5, 2023
1 parent 22b6ed1 commit 9a93ca7
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
"python.analysis.autoFormatStrings": true,
"python.analysis.autoImportCompletions": true,
"python.analysis.inlayHints.functionReturnTypes": false,
"python.analysis.typeCheckingMode": "strict",
"python.analysis.typeCheckingMode": "basic",
"python.languageServer": "Pylance",
"python.terminal.activateEnvInCurrentTerminal": true,
"python.testing.pytestEnabled": true,
Expand Down
12 changes: 6 additions & 6 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -49,13 +49,11 @@
exclude=["*/snapshots/", "/.venv"]
ignore=[
"ANN101", # self type annotation (it's inferred)
"ANN204", # __init__() return type (it's inferred)
"E731", # No lambdas (can be useful)
"F722", # Forward annotations check (conflicts with jaxtyping)
"FA102", # Annotations support (Python >= 3.9 is fine)
"FIX002", # TODO issue link (overkill)
"INP001", # __init__.py for all packages (Python >= 3.3 is fine)
"PGH003", # No general type: ignore (too strict)
"PGH003", # No general type: ignore (not supported with pyright)
"TCH002", # Type checking imports (conflicts with beartype)
"TD00", # TODO banned (we're in alpha)
# Rules that conflict with ruff format
Expand All @@ -64,17 +62,19 @@
]
ignore-init-module-imports=true
line-length=100
required-version="0.1.4"
select=["ALL"]

[tool.ruff.lint]
[tool.ruff.lint.per-file-ignores]
"**/tests/*"=["S101"] # Assert is needed in PyTest
[tool.ruff.lint.flake8-annotations]
mypy-init-return=true

[tool.ruff.lint.isort]
force-sort-within-sections=true
lines-after-imports=2

[tool.ruff.lint.per-file-ignores]
"**/tests/*"=["S101"] # Assert is needed in PyTest

[tool.ruff.lint.pydocstyle]
convention="google"

Expand Down
2 changes: 1 addition & 1 deletion sparse_autoencoder/activation_store/disk_store.py
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ def __len__(self) -> int:

return self._disk_n_activation_vectors.value

def __del__(self):
def __del__(self) -> None:
"""Delete Dunder Method."""
# Shutdown the thread pool after everything is complete
self._thread_pool.shutdown(wait=True, cancel_futures=False)
Expand Down
2 changes: 1 addition & 1 deletion sparse_autoencoder/activation_store/list_store.py
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,7 @@ def empty(self) -> None:
# Clearing a list like this works for both standard and multiprocessing lists
self._data[:] = []

def __del__(self):
def __del__(self) -> None:
"""Delete Dunder Method."""
if self._pool:
self._pool.shutdown(wait=False, cancel_futures=True)

0 comments on commit 9a93ca7

Please sign in to comment.