Skip to content

Commit

Permalink
Adds dependabot support
Browse files Browse the repository at this point in the history
  • Loading branch information
sobolevn committed Dec 25, 2021
1 parent e41b53d commit 2655a8f
Show file tree
Hide file tree
Showing 7 changed files with 44 additions and 9 deletions.
15 changes: 15 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
version: 2
updates:
- package-ecosystem: pip
directory: "/"
schedule:
interval: daily
time: "02:00"
open-pull-requests-limit: 10

- package-ecosystem: github-actions
directory: "/"
schedule:
interval: daily
time: "02:00"
open-pull-requests-limit: 10
10 changes: 5 additions & 5 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# See https://pre-commit.com/hooks.html for more hooks
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v3.2.0
rev: v4.1.0
hooks:
- id: check-yaml
- id: trailing-whitespace
Expand All @@ -11,20 +11,20 @@ repos:
- id: check-merge-conflict
- id: end-of-file-fixer
- repo: https://github.com/asottile/pyupgrade
rev: v2.7.2
rev: v2.29.1
hooks:
- id: pyupgrade
args: ["--py36-plus"]
- repo: https://github.com/pre-commit/mirrors-isort
rev: v5.6.3
rev: v5.9.3
hooks:
- id: isort
- repo: https://github.com/psf/black
rev: 20.8b1
rev: 21.12b0
hooks:
- id: black
- repo: https://gitlab.com/pycqa/flake8
rev: 3.8.4
rev: 3.9.2
hooks:
- id: flake8
- repo: local
Expand Down
File renamed without changes.
4 changes: 3 additions & 1 deletion rest_framework-stubs/generics.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,9 @@ class UsesQuerySet(Protocol[_MT_co]):
# Can't just use BaseFilterBackend because there's also things like django_filters.rest_framework.DjangoFilterBackend that are
# valid options but don't extend it
class BaseFilterProtocol(Protocol[_MT_inv]):
def filter_queryset(self, request: Request, queryset: QuerySet[_MT_inv], view: views.APIView) -> QuerySet[_MT_inv]: ...
def filter_queryset(
self, request: Request, queryset: QuerySet[_MT_inv], view: views.APIView
) -> QuerySet[_MT_inv]: ...
def get_schema_fields(self, view: views.APIView) -> List[Any]: ...
def get_schema_operation_parameters(self, view: views.APIView): ...

Expand Down
2 changes: 1 addition & 1 deletion rest_framework-stubs/serializers.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ class ModelSerializer(Serializer, BaseSerializer[_MT]):
url_field_name: Optional[str] = ...
instance: Optional[Union[_MT, Sequence[_MT]]] # type: ignore[override]
class Meta:
model: Type[_MT] # type: ignore
model: Type[_MT] # type: ignore
fields: Union[Sequence[str], Literal["__all__"]]
read_only_fields: Optional[Sequence[str]]
exclude: Optional[Sequence[str]]
Expand Down
2 changes: 2 additions & 0 deletions rest_framework-stubs/throttling.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ from typing import Any, Callable, Dict, List, MutableMapping, Optional, Tuple
from rest_framework.request import Request
from rest_framework.views import APIView
from django.core.cache.backends.base import BaseCache

class BaseThrottle:
def allow_request(self, request: Request, view: APIView) -> bool: ...
def get_ident(self, request: Request) -> str: ...
Expand All @@ -27,5 +28,6 @@ class SimpleRateThrottle(BaseThrottle):

class AnonRateThrottle(SimpleRateThrottle): ...
class UserRateThrottle(SimpleRateThrottle): ...

class ScopedRateThrottle(SimpleRateThrottle):
scope_attr: str = ...
20 changes: 18 additions & 2 deletions rest_framework-stubs/views.pyi
Original file line number Diff line number Diff line change
@@ -1,4 +1,18 @@
from typing import Any, Callable, Dict, List, Mapping, NoReturn, Optional, Sequence, Tuple, Type, Union, Protocol, TypeVar
from typing import (
Any,
Callable,
Dict,
List,
Mapping,
NoReturn,
Optional,
Sequence,
Tuple,
Type,
Union,
Protocol,
TypeVar,
)

from django.http import HttpRequest
from django.http.response import HttpResponseBase
Expand Down Expand Up @@ -58,7 +72,9 @@ class APIView(View):
@classmethod
def as_view(cls, **initkwargs: Any) -> AsView[GenericView]: ...
def http_method_not_allowed(self, request: Request, *args: Any, **kwargs: Any) -> Response: ... # type: ignore[override]
def permission_denied(self, request: Request, message: Optional[str] = ..., code: Optional[str] = ...) -> NoReturn: ...
def permission_denied(
self, request: Request, message: Optional[str] = ..., code: Optional[str] = ...
) -> NoReturn: ...
def throttled(self, request: Request, wait: float) -> NoReturn: ...
def get_authenticate_header(self, request: Request) -> str: ...
def get_parser_context(self, http_request: HttpRequest) -> Dict[str, Any]: ...
Expand Down

0 comments on commit 2655a8f

Please sign in to comment.