Skip to content
This repository was archived by the owner on Aug 12, 2025. It is now read-only.

Commit 77aa1cd

Browse files
authored
Merge pull request #14 from palfrey/github-ci
Add Github Actions CI
2 parents 94153f8 + ec17f1a commit 77aa1cd

File tree

10 files changed

+205
-713
lines changed

10 files changed

+205
-713
lines changed

.github/workflows/ci.yml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: CI
2+
on:
3+
push:
4+
branches:
5+
- master
6+
pull_request:
7+
branches:
8+
- master
9+
10+
jobs:
11+
ci:
12+
runs-on: ubuntu-22.04
13+
strategy:
14+
fail-fast: false
15+
matrix:
16+
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
17+
steps:
18+
- name: Checkout
19+
uses: actions/checkout@v3
20+
21+
- name: Setup Python
22+
uses: actions/setup-python@v4
23+
with:
24+
python-version: ${{ matrix.python-version }}
25+
cache: 'pip'
26+
27+
- name: Upgrade pip
28+
run: pip install --upgrade pip
29+
30+
- name: Install requirements (3.7+)
31+
run: |
32+
pip install -r requirements.txt
33+
34+
35+
- name: Black
36+
run: black --check django_filters-stubs/
37+
38+
- name: isort
39+
run: isort --check django_filters-stubs
40+
41+
- name: flake8
42+
run: flake8
43+
44+
- name: pytest
45+
run: pytest -vvv

.travis.yml

Lines changed: 0 additions & 30 deletions
This file was deleted.

Pipfile

Lines changed: 0 additions & 16 deletions
This file was deleted.

Pipfile.lock

Lines changed: 0 additions & 658 deletions
This file was deleted.

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# PEP-484 Stubs for django-filter ::: Beta
22

3-
[![Build Status](https://travis-ci.org/DavisRayM/django-filter-stubs.svg?branch=master)](https://travis-ci.org/DavisRayM/django-filter-stubs)
3+
[![CI](https://github.com/DavisRayM/django-filter-stubs/actions/workflows/ci.yml/badge.svg)](https://github.com/DavisRayM/django-filter-stubs/actions/workflows/ci.yml)
44
[![Checked with mypy](http://www.mypy-lang.org/static/mypy_badge.svg)](http://mypy-lang.org/)
55

66
This package contains type subs to provide more precise static types for Django Filters.

django_filters-stubs/widgets.pyi

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
from typing import Any, Dict, Optional, Tuple
22

33
from django import forms
4-
from django.forms.renderers import EngineMixin
4+
from django.forms.renderers import BaseRenderer
55
from django.utils.safestring import SafeText
66

77
_OptAttrs = Dict[str, Any]
@@ -11,13 +11,13 @@ class LinkWidget(forms.Widget):
1111
def __init__(self, attrs: Optional[Any] = ..., choices: Any = ...) -> None: ...
1212
data: Any = ...
1313
def value_from_datadict(self, data: Any, files: Any, name: Any): ...
14-
def render(
14+
def render( # type: ignore[override]
1515
self,
1616
name: str,
1717
value: Any,
1818
attrs: Optional[_OptAttrs] = ...,
1919
choices: Tuple = ...,
20-
renderer: Optional[EngineMixin] = ...,
20+
renderer: Optional[BaseRenderer] = ...,
2121
) -> SafeText: ...
2222
def render_options(self, choices: Any, selected_choices: Any, name: Any): ...
2323
def render_option(

requirements.in

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
-e .
2+
3+
black
4+
flake8
5+
isort
6+
pytest-mypy-plugins
7+
pip-tools

requirements.txt

Lines changed: 146 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,146 @@
1+
#
2+
# This file is autogenerated by pip-compile with Python 3.7
3+
# by the following command:
4+
#
5+
# pip-compile
6+
#
7+
-e .
8+
# via -r requirements.in
9+
asgiref==3.6.0
10+
# via django
11+
attrs==22.2.0
12+
# via pytest
13+
black==22.12.0
14+
# via -r requirements.in
15+
build==0.9.0
16+
# via pip-tools
17+
certifi==2022.12.7
18+
# via requests
19+
charset-normalizer==2.1.1
20+
# via requests
21+
chevron==0.14.0
22+
# via pytest-mypy-plugins
23+
click==8.1.3
24+
# via
25+
# black
26+
# pip-tools
27+
decorator==5.1.1
28+
# via pytest-mypy-plugins
29+
django==3.2.16
30+
# via
31+
# django-stubs
32+
# django-stubs-ext
33+
django-stubs==1.13.1
34+
# via
35+
# django-filter-stubs
36+
# djangorestframework-stubs
37+
django-stubs-ext==0.7.0
38+
# via django-stubs
39+
djangorestframework-stubs==1.8.0
40+
# via django-filter-stubs
41+
exceptiongroup==1.1.0
42+
# via pytest
43+
flake8==5.0.4
44+
# via -r requirements.in
45+
idna==3.4
46+
# via requests
47+
importlib-metadata==4.2.0
48+
# via
49+
# build
50+
# click
51+
# flake8
52+
# pep517
53+
# pluggy
54+
# pytest
55+
iniconfig==1.1.1
56+
# via pytest
57+
isort==5.11.4
58+
# via -r requirements.in
59+
mccabe==0.7.0
60+
# via flake8
61+
mypy==0.991
62+
# via
63+
# django-filter-stubs
64+
# django-stubs
65+
# djangorestframework-stubs
66+
# pytest-mypy-plugins
67+
mypy-extensions==0.4.3
68+
# via
69+
# black
70+
# mypy
71+
packaging==22.0
72+
# via
73+
# build
74+
# pytest
75+
pathspec==0.10.3
76+
# via black
77+
pep517==0.13.0
78+
# via build
79+
pip-tools==6.12.1
80+
# via -r requirements.in
81+
platformdirs==2.6.2
82+
# via black
83+
pluggy==1.0.0
84+
# via pytest
85+
pycodestyle==2.9.1
86+
# via flake8
87+
pyflakes==2.5.0
88+
# via flake8
89+
pytest==7.2.0
90+
# via pytest-mypy-plugins
91+
pytest-mypy-plugins==1.10.1
92+
# via -r requirements.in
93+
pytz==2022.7
94+
# via django
95+
pyyaml==6.0
96+
# via pytest-mypy-plugins
97+
regex==2022.10.31
98+
# via pytest-mypy-plugins
99+
requests==2.28.1
100+
# via djangorestframework-stubs
101+
sqlparse==0.4.3
102+
# via django
103+
tomli==2.0.1
104+
# via
105+
# black
106+
# build
107+
# django-stubs
108+
# mypy
109+
# pep517
110+
# pytest
111+
typed-ast==1.5.4
112+
# via
113+
# black
114+
# mypy
115+
types-pytz==2022.7.0.0
116+
# via django-stubs
117+
types-pyyaml==6.0.12.2
118+
# via
119+
# django-stubs
120+
# djangorestframework-stubs
121+
types-requests==2.28.11.7
122+
# via djangorestframework-stubs
123+
types-urllib3==1.26.25.4
124+
# via types-requests
125+
typing-extensions==4.4.0
126+
# via
127+
# black
128+
# django-filter-stubs
129+
# django-stubs
130+
# django-stubs-ext
131+
# djangorestframework-stubs
132+
# importlib-metadata
133+
# mypy
134+
# platformdirs
135+
urllib3==1.26.13
136+
# via requests
137+
wheel==0.38.4
138+
# via pip-tools
139+
zipp==3.11.0
140+
# via
141+
# importlib-metadata
142+
# pep517
143+
144+
# The following packages are considered to be unsafe in a requirements file:
145+
# pip
146+
# setuptools

setup.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import os
2+
from pathlib import Path
23

34
from setuptools import setup
4-
from pathlib import Path
55

66
name = "django-filter-stubs"
77

@@ -17,6 +17,7 @@ def find_stub_files(name):
1717
result.append(f)
1818
return result
1919

20+
2021
long_description = (Path(__file__).parent / "README.md").read_text()
2122

2223

@@ -41,7 +42,6 @@ def find_stub_files(name):
4142
classifiers=[
4243
"Development Status :: 1 - Planning",
4344
"License :: OSI Approved :: MIT License",
44-
"Programming Language :: Python :: 3.6",
4545
"Programming Language :: Python :: 3.7",
4646
],
4747
)

tests/test_imports.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,4 @@
1313
import django_filters.widgets
1414
import django_filters.rest_framework.backends
1515
import django_filters.rest_framework.filters
16-
import django_filters.rest_framework.filterset
17-
out: |
18-
../../home/travis/build/DavisRayM/django-filter-stubs/django_filters-stubs/widgetsi:14: error: Signature of "render" incompatible with supertype "Widget"
16+
import django_filters.rest_framework.filterset

0 commit comments

Comments
 (0)