Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated flake8 dependency, added autoflake #1060

Merged
merged 1 commit into from
Feb 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 9 additions & 5 deletions requirements/ci.txt
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ attrs==21.2.0
# -r requirements/base.txt
# glom
# jsonschema
autoflake==2.3.0
# via -r requirements/test-tools.in
beautifulsoup4==4.10.0
# via webtest
billiard==3.6.4.0
Expand Down Expand Up @@ -518,7 +520,7 @@ factory-boy==3.2.0
# via -r requirements/test-tools.in
faker==9.9.0
# via factory-boy
flake8==3.9.2
flake8==7.0.0
# via -r requirements/test-tools.in
fonttools[woff]==4.43.0
# via
Expand Down Expand Up @@ -647,7 +649,7 @@ maykin-python3-saml==1.14.0.post0
# -c requirements/base.txt
# -r requirements/base.txt
# django-digid-eherkenning
mccabe==0.6.1
mccabe==0.7.0
# via
# flake8
# pylint
Expand Down Expand Up @@ -732,7 +734,7 @@ psycopg2==2.9.9
# via
# -c requirements/base.txt
# -r requirements/base.txt
pycodestyle==2.7.0
pycodestyle==2.11.1
# via flake8
pycparser==2.20
# via
Expand All @@ -749,8 +751,10 @@ pyee==11.0.1
# -c requirements/base.txt
# -r requirements/base.txt
# playwright
pyflakes==2.3.1
# via flake8
pyflakes==3.2.0
# via
# autoflake
# flake8
pyjwt==2.8.0
# via
# -c requirements/base.txt
Expand Down
13 changes: 9 additions & 4 deletions requirements/dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,10 @@ attrs==21.2.0
# -r requirements/ci.txt
# glom
# jsonschema
autoflake==2.3.0
# via
# -c requirements/ci.txt
# -r requirements/ci.txt
autopep8==1.5.7
# via django-silk
babel==2.9.1
Expand Down Expand Up @@ -575,7 +579,7 @@ faker==9.9.0
# -c requirements/ci.txt
# -r requirements/ci.txt
# factory-boy
flake8==3.9.2
flake8==7.0.0
# via
# -c requirements/ci.txt
# -r requirements/ci.txt
Expand Down Expand Up @@ -748,7 +752,7 @@ maykin-python3-saml==1.14.0.post0
# -c requirements/ci.txt
# -r requirements/ci.txt
# django-digid-eherkenning
mccabe==0.6.1
mccabe==0.7.0
# via
# -c requirements/ci.txt
# -r requirements/ci.txt
Expand Down Expand Up @@ -857,7 +861,7 @@ psycopg2==2.9.9
# via
# -c requirements/ci.txt
# -r requirements/ci.txt
pycodestyle==2.7.0
pycodestyle==2.11.1
# via
# -c requirements/ci.txt
# -r requirements/ci.txt
Expand All @@ -878,10 +882,11 @@ pyee==11.0.1
# -c requirements/ci.txt
# -r requirements/ci.txt
# playwright
pyflakes==2.3.1
pyflakes==3.2.0
# via
# -c requirements/ci.txt
# -r requirements/ci.txt
# autoflake
# flake8
pygments==2.12.0
# via sphinx
Expand Down
1 change: 1 addition & 0 deletions requirements/test-tools.in
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ tblib
black
isort
flake8
autoflake

# DigidLocal
pyopenssl
2 changes: 0 additions & 2 deletions src/open_inwoner/accounts/gateways.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@ class GatewayError(Exception):
text message.
"""

pass


class Gateway(object):
def get_message(self, token):
Expand Down
12 changes: 6 additions & 6 deletions src/open_inwoner/components/templatetags/form_tags.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,18 +167,18 @@ def autorender_field(form_object, field_name, **kwargs):
fn = input
tmplt = WIDGET_TEMPLATES["INPUT"]

if type(field) == forms.fields.DateField:
if type(field) is forms.fields.DateField:
tmplt = WIDGET_TEMPLATES["DATE"]
elif type(field) == forms.models.ModelMultipleChoiceField:
elif type(field) is forms.models.ModelMultipleChoiceField:
tmplt = WIDGET_TEMPLATES["MULTIPLECHECKBOX"]
elif type(field) == forms.fields.BooleanField:
elif type(field) is forms.fields.BooleanField:
fn = checkbox
tmplt = WIDGET_TEMPLATES["CHECKBOX"]
elif type(field.widget) == forms.fields.HiddenInput:
elif type(field.widget) is forms.fields.HiddenInput:
tmplt = WIDGET_TEMPLATES["HIDDEN"]
elif type(field.widget) == forms.widgets.RadioSelect:
elif type(field.widget) is forms.widgets.RadioSelect:
tmplt = WIDGET_TEMPLATES["RADIO"]
elif type(field.widget) == forms.fields.Textarea:
elif type(field.widget) is forms.fields.Textarea:
tmplt = WIDGET_TEMPLATES["TEXTAREA"]

context = fn(bound_field, **kwargs)
Expand Down
2 changes: 1 addition & 1 deletion src/open_inwoner/media/admin/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
from .video import VideoAdmin
from .video import VideoAdmin # noqa
Loading