Skip to content

Commit

Permalink
Fix linting and testing errors (#272)
Browse files Browse the repository at this point in the history
- Fixes Black formatting and import order in `django-stubs/db/transaction.pyi`.
- ~~Fixes expected Pyright error messages in `tests/pyright/test_arrays.py` and `tests/pyright/test_fields.py`.~~ Edit: With Python pinned to 3.8.18, these message changes are no longer necessary.

These changes allow `./s/lint` to run successfully on my machine.
  • Loading branch information
noelleleigh authored Nov 23, 2024
1 parent 0570ee8 commit d7c95ba
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
1 change: 0 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ jobs:
- uses: actions/setup-python@v4
with:
python-version: "3.8"
cache: "poetry"

- name: Use Node.js
Expand Down
2 changes: 1 addition & 1 deletion .python-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.8.19
3.8.18
5 changes: 3 additions & 2 deletions django-stubs/db/transaction.pyi
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
from collections.abc import Callable, Iterator
from contextlib import contextmanager
from types import TracebackType
from typing import Any, TypeVar, overload

from types import TracebackType
from django.db import ProgrammingError

class TransactionManagementError(ProgrammingError): ...
Expand Down Expand Up @@ -40,8 +40,9 @@ class Atomic:
self,
exc_type: type[BaseException] | None,
exc_value: BaseException | None,
traceback: TracebackType | None, /
traceback: TracebackType | None,
) -> None: ...

# Bare decorator
@overload
def atomic(using: _C) -> _C: ...
Expand Down

0 comments on commit d7c95ba

Please sign in to comment.