Skip to content

Commit

Permalink
refactor(ruff): added config to pyproject.toml
Browse files Browse the repository at this point in the history
  • Loading branch information
shinybrar committed Mar 3, 2025
1 parent 9bfe357 commit 31145a8
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 6 deletions.
10 changes: 10 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -64,3 +64,13 @@ dev-dependencies = [
"types-defusedxml>=0.7.0.20240117",
"ipython>=8.18.1",
]

[tool.ruff.lint]
select = ["E", "F", "I", "B", "PIE"]
ignore = ["B904", "B028"]

[tool.ruff.lint.isort]
combine-as-imports = true

[tool.ruff.lint.per-file-ignores]
"__init__.py" = ["F403", "F405"]
3 changes: 2 additions & 1 deletion skaha/session.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,8 @@ def stats(self) -> Dict[str, Any]:
>>> from skaha.session import Session
>>> session = Session()
>>> session.stats()
{'instances': {'session': 88, 'desktopApp': 30, 'headless': 0, 'total': 118},
{'instances': {
'session': 88, 'desktopApp': 30, 'headless': 0, 'total': 118},
'cores': {'requestedCPUCores': 377,
'coresAvailable': 960,
'maxCores': {'cores': 32, 'withRam': '147Gi'}},
Expand Down
4 changes: 3 additions & 1 deletion skaha/utils/threaded.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,9 @@ async def scale(
>>> from skaha.threaded import scale
from asyncio import get_event_loop
loop = get_event_loop()
loop.run_until_complete(scale(lambda x: x**2, [{'x': i} for i in range(10)]))
loop.run_until_complete(
scale(lambda x: x**2, [{'x': i} for i in range(10)])
)
"""
workers = len(arguments)
with concurrent.futures.ThreadPoolExecutor(max_workers=workers) as executor:
Expand Down
2 changes: 1 addition & 1 deletion tests/test_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ def test_default_certificate():
try:
SkahaClient()
except ValidationError:
assert False
raise AssertionError()
assert True


Expand Down
7 changes: 4 additions & 3 deletions uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 31145a8

Please sign in to comment.