Skip to content

Commit

Permalink
chore(deps): update dev dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
bellini666 committed Sep 11, 2023
1 parent 54aba17 commit 9b2c6fc
Show file tree
Hide file tree
Showing 13 changed files with 223 additions and 464 deletions.
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ repos:
- id: ruff
args:
- --fix
- repo: https://github.com/psf/black
rev: 23.7.0
- repo: https://github.com/psf/black-pre-commit-mirror
rev: 23.9.1
hooks:
- id: black
- repo: https://github.com/patrick91/pre-commit-alex
Expand Down
468 changes: 139 additions & 329 deletions poetry.lock

Large diffs are not rendered by default.

56 changes: 29 additions & 27 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@ mkdocs-markdownextradata-plugin = "^0.2.5"
mkdocs-material = "^9.0.4"
mkdocs-minify-plugin = "^0.7.1"
pymdown-extensions = "^10.0.1"
mkdocstrings = { version = "^0.22.0", extras = ["python"] }
ruff = "^0.0.285"
mkdocstrings = { version = "^0.23.0", extras = ["python"] }
ruff = "^0.0.287"
django-types = "^0.17.0"
Markdown = "^3.3.7"
Pygments = "^2.15.1"
Expand All @@ -77,46 +77,48 @@ select = [
"ASYNC100",
"ASYNC101",
"ASYNC102",
"E",
"F",
"W",
"I",
"N",
"B",
"BLE",
"C4",
"COM",
"D",
"UP",
"YTT",
"D2",
"D3",
"D4",
"BLE",
"B",
"A",
"COM",
"C4",
"DTZ",
"T10",
"E",
"ERA",
"EXE",
"ISC",
"ICN001",
"F",
"FURB",
"G",
"I",
"ICN001",
"INP",
"ISC",
"N",
"PERF",
"PGH",
"PIE",
"T20",
"PYI",
"PL",
"PT",
"PTH",
"PYI",
"Q",
"RET",
"SIM",
"TID",
"TCH",
"PTH",
"ERA",
"PGH",
"PL",
"RSE",
"RUF",
"TRY",
"SIM",
"SLF",
"SLOT",
"T10",
"T20",
"TCH",
"TID",
"TRY",
"UP",
"W",
"YTT",
]
ignore = ["D1", "D203", "D213", "PLR09", "SLF001", "TRY003", "PGH003", "D417"]
# FIXME: Enable autofix for UP006 when we don't need to support django 3.8 anymore
Expand Down
12 changes: 4 additions & 8 deletions strawberry_django/descriptors.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,12 +65,10 @@ def __set_name__(self, owner: Type[_M], name: str):
self.name = name

@overload
def __get__(self, obj: _M, cls: Type[_M]) -> _R:
...
def __get__(self, obj: _M, cls: Type[_M]) -> _R: ...

@overload
def __get__(self, obj: None, cls: Type[_M]) -> Self:
...
def __get__(self, obj: None, cls: Type[_M]) -> Self: ...

def __get__(self, obj, cls=None):
if obj is None:
Expand Down Expand Up @@ -110,8 +108,7 @@ def model_property(
only: Optional["TypeOrSequence[str]"] = None,
select_related: Optional["TypeOrSequence[str]"] = None,
prefetch_related: Optional["TypeOrSequence[PrefetchType]"] = None,
) -> ModelProperty[_M, _R]:
...
) -> ModelProperty[_M, _R]: ...


@overload
Expand All @@ -123,8 +120,7 @@ def model_property(
only: Optional["TypeOrSequence[str]"] = None,
select_related: Optional["TypeOrSequence[str]"] = None,
prefetch_related: Optional["TypeOrSequence[PrefetchType]"] = None,
) -> Callable[[Callable[[_M], _R]], ModelProperty[_M, _R]]:
...
) -> Callable[[Callable[[_M], _R]], ModelProperty[_M, _R]]: ...


def model_property(
Expand Down
15 changes: 5 additions & 10 deletions strawberry_django/fields/field.py
Original file line number Diff line number Diff line change
Expand Up @@ -398,8 +398,7 @@ def field(
select_related: TypeOrSequence[str] | None = None,
prefetch_related: TypeOrSequence[PrefetchType] | None = None,
disable_optimization: bool = False,
) -> _T:
...
) -> _T: ...


@overload
Expand All @@ -426,8 +425,7 @@ def field(
select_related: TypeOrSequence[str] | None = None,
prefetch_related: TypeOrSequence[PrefetchType] | None = None,
disable_optimization: bool = False,
) -> Any:
...
) -> Any: ...


@overload
Expand All @@ -454,8 +452,7 @@ def field(
select_related: TypeOrSequence[str] | None = None,
prefetch_related: TypeOrSequence[PrefetchType] | None = None,
disable_optimization: bool = False,
) -> StrawberryDjangoField:
...
) -> StrawberryDjangoField: ...


def field(
Expand Down Expand Up @@ -614,8 +611,7 @@ def connection(
select_related: TypeOrSequence[str] | None = None,
prefetch_related: TypeOrSequence[PrefetchType] | None = None,
disable_optimization: bool = False,
) -> Any:
...
) -> Any: ...


@overload
Expand All @@ -641,8 +637,7 @@ def connection(
select_related: TypeOrSequence[str] | None = None,
prefetch_related: TypeOrSequence[PrefetchType] | None = None,
disable_optimization: bool = False,
) -> Any:
...
) -> Any: ...


def connection(
Expand Down
18 changes: 6 additions & 12 deletions strawberry_django/mutations/mutations.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,7 @@ def mutation(
graphql_type: Optional[Any] = None,
extensions: List[FieldExtension] = (), # type: ignore
handle_django_errors: Optional[bool] = None,
) -> _T:
...
) -> _T: ...


@overload
Expand All @@ -69,8 +68,7 @@ def mutation(
graphql_type: Optional[Any] = None,
extensions: List[FieldExtension] = (), # type: ignore
handle_django_errors: Optional[bool] = None,
) -> Any:
...
) -> Any: ...


@overload
Expand All @@ -90,8 +88,7 @@ def mutation(
graphql_type: Optional[Any] = None,
extensions: List[FieldExtension] = (), # type: ignore
handle_django_errors: Optional[bool] = None,
) -> DjangoMutationBase:
...
) -> DjangoMutationBase: ...


def mutation(
Expand Down Expand Up @@ -157,8 +154,7 @@ def input_mutation(
graphql_type: Optional[Any] = None,
extensions: List[FieldExtension] = (), # type: ignore
handle_django_errors: Optional[bool] = None,
) -> _T:
...
) -> _T: ...


@overload
Expand All @@ -178,8 +174,7 @@ def input_mutation(
graphql_type: Optional[Any] = None,
extensions: List[FieldExtension] = (), # type: ignore
handle_django_errors: Optional[bool] = None,
) -> Any:
...
) -> Any: ...


@overload
Expand All @@ -199,8 +194,7 @@ def input_mutation(
graphql_type: Optional[Any] = None,
extensions: List[FieldExtension] = (), # type: ignore
handle_django_errors: Optional[bool] = None,
) -> DjangoMutationBase:
...
) -> DjangoMutationBase: ...


def input_mutation(
Expand Down
30 changes: 10 additions & 20 deletions strawberry_django/mutations/resolvers.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,23 +119,19 @@ class ParsedObjectList:


@overload
def parse_input(info: Info, data: dict[str, _T]) -> dict[str, _T]:
...
def parse_input(info: Info, data: dict[str, _T]) -> dict[str, _T]: ...


@overload
def parse_input(info: Info, data: list[_T]) -> list[_T]:
...
def parse_input(info: Info, data: list[_T]) -> list[_T]: ...


@overload
def parse_input(info: Info, data: relay.GlobalID) -> relay.Node:
...
def parse_input(info: Info, data: relay.GlobalID) -> relay.Node: ...


@overload
def parse_input(info: Info, data: Any) -> Any:
...
def parse_input(info: Info, data: Any) -> Any: ...


def parse_input(info: Info, data: Any):
Expand Down Expand Up @@ -197,8 +193,7 @@ def create(
*,
full_clean: bool | FullCleanOptions = True,
pre_save_hook: Callable[[_M], None] | None = None,
) -> _M:
...
) -> _M: ...


@overload
Expand All @@ -209,8 +204,7 @@ def create(
*,
full_clean: bool | FullCleanOptions = True,
pre_save_hook: Callable[[_M], None] | None = None,
) -> list[_M]:
...
) -> list[_M]: ...


@transaction.atomic
Expand Down Expand Up @@ -245,8 +239,7 @@ def update(
*,
full_clean: bool | FullCleanOptions = True,
pre_save_hook: Callable[[_M], None] | None = None,
) -> _M:
...
) -> _M: ...


@overload
Expand All @@ -257,8 +250,7 @@ def update(
*,
full_clean: bool | FullCleanOptions = True,
pre_save_hook: Callable[[_M], None] | None = None,
) -> list[_M]:
...
) -> list[_M]: ...


@transaction.atomic
Expand Down Expand Up @@ -370,8 +362,7 @@ def delete(
instance: _M,
*,
data: dict[str, Any] | None = None,
) -> _M:
...
) -> _M: ...


@overload
Expand All @@ -380,8 +371,7 @@ def delete(
instance: Iterable[_M],
*,
data: dict[str, Any] | None = None,
) -> list[_M]:
...
) -> list[_M]: ...


@transaction.atomic
Expand Down
Loading

0 comments on commit 9b2c6fc

Please sign in to comment.