Skip to content

Commit

Permalink
Upgrade deps, fix test fixtures (hasgeek#1412)
Browse files Browse the repository at this point in the history
  • Loading branch information
jace authored Jul 6, 2022
1 parent d9c04d3 commit dedf0c4
Show file tree
Hide file tree
Showing 8 changed files with 25 additions and 36 deletions.
12 changes: 8 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
default_stages: [commit]
# Enable this to enforce common Python version between dev and CI:
# Enable this to enforce a common Python version:
# default_language_version:
# python: python3.7
# python: python3.9
ci:
skip: ['pip-compile', 'yesqa', 'no-commit-to-branch']
repos:
- repo: https://github.com/pre-commit-ci/pre-commit-ci-config
rev: v1.5.1
hooks:
- id: check-pre-commit-ci-config
- repo: https://github.com/jazzband/pip-tools
rev: 6.8.0
hooks:
Expand Down Expand Up @@ -99,7 +103,7 @@ repos:
- types-simplejson==3.17.6
- types-six==1.16.17
- types-toml==0.10.7
- types-urllib3==1.26.15
- types-urllib3==1.26.16
- types-werkzeug==1.0.9
- typing-extensions==4.3.0
- repo: https://github.com/PyCQA/flake8
Expand Down Expand Up @@ -162,7 +166,7 @@ repos:
args: ['--single-quote', '--trailing-comma', 'es5']
exclude: funnel/templates/js/
- repo: https://github.com/Riverside-Healthcare/djLint
rev: v1.3.0
rev: v1.4.0
hooks:
- id: djlint-jinja
files: \.(jinja2|j2)$
10 changes: 5 additions & 5 deletions funnel/views/comment.py
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ def new(self) -> ReturnView:
submit=_("Post comment"),
ajax=False,
with_chrome=False,
)
).get_data(as_text=True)
return {'status': 'ok', 'form': commentform_html}

@route('subscribe', methods=['POST'])
Expand Down Expand Up @@ -349,7 +349,7 @@ def reply(self) -> ReturnView:
submit=_("Post comment"),
ajax=False,
with_chrome=False,
)
).get_data(as_text=True)
return {'status': 'ok', 'form': commentform_html}

@route('edit', methods=['GET', 'POST'])
Expand All @@ -373,7 +373,7 @@ def edit(self) -> ReturnView:
submit=_("Edit comment"),
ajax=False,
with_chrome=False,
)
).get_data(as_text=True)
return {'status': 'ok', 'form': commentform_html}

@route('delete', methods=['GET', 'POST'])
Expand All @@ -399,7 +399,7 @@ def delete(self) -> ReturnView:
submit=_("Delete"),
ajax=False,
with_chrome=False,
)
).get_data(as_text=True)
return {'status': 'ok', 'form': delcommentform_html}

@route('report_spam', methods=['GET', 'POST'])
Expand Down Expand Up @@ -444,7 +444,7 @@ def report_spam(self) -> ReturnView:
submit=_("Confirm"),
ajax=False,
with_chrome=False,
)
).get_data(as_text=True)
return {'status': 'ok', 'form': reportspamform_html}


Expand Down
12 changes: 6 additions & 6 deletions funnel/views/membership.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ def new_member(self) -> ReturnView:
submit='Add member',
ajax=False,
with_chrome=False,
)
).get_data(as_text=True)
return {'status': 'ok', 'form': membership_form_html}


Expand Down Expand Up @@ -241,7 +241,7 @@ def edit(self) -> ReturnView:
submit='Edit membership',
ajax=False,
with_chrome=False,
)
).get_data(as_text=True)
return {'status': 'ok', 'form': membership_form_html}

@route('delete', methods=['GET', 'POST'])
Expand Down Expand Up @@ -295,7 +295,7 @@ def delete(self) -> ReturnView:
submit=_("Remove"),
ajax=False,
with_chrome=False,
)
).get_data(as_text=True)
return {'status': 'ok', 'form': form_html}


Expand Down Expand Up @@ -403,7 +403,7 @@ def new_member(self) -> ReturnView:
submit='Add member',
ajax=False,
with_chrome=False,
)
).get_data(as_text=True)
return {'status': 'ok', 'form': membership_form_html}


Expand Down Expand Up @@ -535,7 +535,7 @@ def edit(self) -> ReturnView:
submit='Edit membership',
ajax=False,
with_chrome=False,
)
).get_data(as_text=True)
return {'status': 'ok', 'form': membership_form_html}

@route('delete', methods=['GET', 'POST'])
Expand Down Expand Up @@ -581,7 +581,7 @@ def delete(self) -> ReturnView:
submit=_("Remove"),
ajax=False,
with_chrome=False,
)
).get_data(as_text=True)
return {'status': 'ok', 'form': form_html}


Expand Down
1 change: 0 additions & 1 deletion requirements.in
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ base58
bcrypt
better_profanity!=0.7.0 # https://github.com/snguyenthanh/better_profanity/issues/19
blinker
boto3
Brotli
click
cryptography
Expand Down
16 changes: 1 addition & 15 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,6 @@ blinker==1.4
# via
# -r requirements.in
# coaster
boto3==1.24.22
# via -r requirements.in
botocore==1.27.22
# via
# boto3
# s3transfer
brotli==1.0.9
# via -r requirements.in
cachelib==0.9.0
Expand Down Expand Up @@ -88,7 +82,7 @@ coaster @ git+https://github.com/hasgeek/coaster.git
# baseframe
croniter==1.3.5
# via rq-scheduler
cryptography==37.0.2
cryptography==37.0.4
# via
# -r requirements.in
# paramiko
Expand Down Expand Up @@ -219,10 +213,6 @@ jinja2==3.1.2
# flask
# flask-babelhg
# flask-flatpages
jmespath==1.0.1
# via
# boto3
# botocore
joblib==1.1.0
# via nltk
js2py==0.71
Expand Down Expand Up @@ -344,7 +334,6 @@ python-dateutil==2.8.2
# via
# -r requirements.in
# baseframe
# botocore
# croniter
# icalendar
# rq-scheduler
Expand Down Expand Up @@ -408,8 +397,6 @@ rq-scheduler==0.11.0
# via flask-rq2
rsa==4.8
# via oauth2client
s3transfer==0.6.0
# via boto3
semantic-version==2.10.0
# via
# baseframe
Expand Down Expand Up @@ -490,7 +477,6 @@ url-normalize==1.4.3
# via -r requirements.in
urllib3==1.26.9
# via
# botocore
# geoip2
# requests
# sentry-sdk
Expand Down
4 changes: 2 additions & 2 deletions requirements_dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ dill==0.3.5.1
# via pylint
distlib==0.3.4
# via virtualenv
djlint==1.3.0
djlint==1.4.0
# via -r requirements_dev.in
filelock==3.7.1
# via virtualenv
Expand Down Expand Up @@ -256,7 +256,7 @@ types-six==1.16.17
# via -r requirements_dev.in
types-toml==0.10.7
# via -r requirements_dev.in
types-urllib3==1.26.15
types-urllib3==1.26.16
# via types-requests
types-werkzeug==1.0.9
# via
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/models/test_notification.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ def project_fixtures(db_session): # pylint: disable=too-many-locals

user_editor = User(username='user-editor', fullname="User Editor")
user_editor.add_email('[email protected]')
user_editor_phone = UserPhone(user=user_editor, phone='+1234567890')
user_editor_phone = UserPhone(user=user_editor, phone='+12345678900')

user_participant = User(username='user-participant', title="User Participant")

Expand Down
4 changes: 2 additions & 2 deletions tests/unit/models/test_profile.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,8 @@ def test_suspended_user_private_profile(db_session, user_wolfgang) -> None:
with pytest.raises(StateTransitionError):
user_wolfgang.profile.make_public()

# Add an email address to meet the criteria for having verified contact info
user_wolfgang.add_phone('+1234567890')
# Add a phone number to meet the criteria for having verified contact info
user_wolfgang.add_phone('+12345678900')

# Make profile public and confirm
user_wolfgang.profile.make_public()
Expand Down

0 comments on commit dedf0c4

Please sign in to comment.