Skip to content

Commit

Permalink
Updates
Browse files Browse the repository at this point in the history
  • Loading branch information
C4ptainCrunch committed Mar 21, 2024
1 parent 1302bea commit 48640c1
Show file tree
Hide file tree
Showing 4 changed files with 58 additions and 73 deletions.
8 changes: 4 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
repos:
- repo: https://github.com/psf/black
rev: 23.12.1
rev: 24.3.0
hooks:
- id: black

Expand All @@ -17,7 +17,7 @@ repos:
files: \.html$

- repo: https://github.com/asottile/pyupgrade
rev: v3.15.0
rev: v3.15.1
hooks:
- id: pyupgrade
args: [ "--py310-plus" ]
Expand All @@ -30,13 +30,13 @@ repos:
- id: djjs

- repo: https://github.com/adamchainz/django-upgrade
rev: 1.15.0
rev: 1.16.0
hooks:
- id: django-upgrade
args: [ --target-version, "4.1" ]

- repo: https://github.com/charliermarsh/ruff-pre-commit
rev: 'v0.1.14'
rev: 'v0.3.4'
hooks:
- id: ruff
args: [--fix, --exit-non-zero-on-fix]
8 changes: 4 additions & 4 deletions documents/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -257,10 +257,10 @@ def document_original_file(request, pk):
response = HttpResponse(body, content_type="application/octet-stream")
response["Content-Description"] = "File Transfer"
response["Content-Transfer-Encoding"] = "binary"
response[
"Content-Disposition"
] = f'attachment; filename="{document.safe_name}{document.file_type}"'.encode(
"ascii", "ignore"
response["Content-Disposition"] = (
f'attachment; filename="{document.safe_name}{document.file_type}"'.encode(
"ascii", "ignore"
)
)

document.downloads = F("downloads") + 1
Expand Down
109 changes: 47 additions & 62 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,38 +1,36 @@
#
# This file is autogenerated by pip-compile with Python 3.10
# This file is autogenerated by pip-compile with Python 3.11
# by the following command:
#
# pip-compile
#
amqp==5.2.0
# via kombu
asgiref==3.7.2
asgiref==3.8.0
# via django
asttokens==2.4.1
# via stack-data
async-timeout==4.0.3
# via redis
beautifulsoup4==4.12.3
# via
# -r requirements.in
# webtest
billiard==4.2.0
# via celery
black==23.12.1
black==24.3.0
# via -r requirements.in
boto3==1.34.26
boto3==1.34.68
# via -r requirements.in
botocore==1.34.26
botocore==1.34.68
# via
# boto3
# s3transfer
brotli==1.1.0
# via whitenoise
build==1.0.3
build==1.1.1
# via pip-tools
celery==5.3.6
# via -r requirements.in
certifi==2023.11.17
certifi==2024.2.2
# via
# requests
# sentry-sdk
Expand All @@ -56,13 +54,13 @@ click-repl==0.3.0
# via celery
coolname==2.2.0
# via -r requirements.in
crispy-bootstrap5==2023.10
crispy-bootstrap5==2024.2
# via -r requirements.in
decorator==5.1.1
# via ipython
distlib==0.3.8
# via virtualenv
django==5.0.1
django==5.0.3
# via
# -r requirements.in
# crispy-bootstrap5
Expand All @@ -84,7 +82,7 @@ django-crispy-forms==2.1
# via
# -r requirements.in
# crispy-bootstrap5
django-debug-toolbar==4.2.0
django-debug-toolbar==4.3.0
# via -r requirements.in
django-environ==0.11.2
# via -r requirements.in
Expand All @@ -108,10 +106,6 @@ django-stubs-ext==4.2.7
# via django-stubs
django-webtest==1.9.11
# via -r requirements.in
exceptiongroup==1.2.0
# via
# ipython
# pytest
executing==2.0.1
# via stack-data
filelock==3.13.1
Expand All @@ -126,13 +120,13 @@ honcho==1.1.0
# via -r requirements.in
html5lib==1.1
# via -r requirements.in
identify==2.5.33
identify==2.5.35
# via pre-commit
idna==3.6
# via requests
iniconfig==2.0.0
# via pytest
ipython==8.20.0
ipython==8.22.2
# via -r requirements.in
isort==5.13.2
# via -r requirements.in
Expand All @@ -154,7 +148,7 @@ mdurl==0.1.2
# via markdown-it-py
mock==5.1.0
# via -r requirements.in
mypy==1.8.0
mypy==1.9.0
# via -r requirements.in
mypy-extensions==1.0.0
# via
Expand All @@ -164,7 +158,7 @@ nodeenv==1.8.0
# via pre-commit
orderedmultidict==1.0.1
# via furl
packaging==23.2
packaging==24.0
# via
# black
# build
Expand All @@ -178,23 +172,23 @@ pexpect==4.9.0
# via ipython
pillow==10.2.0
# via -r requirements.in
pip-tools==7.3.0
pip-tools==7.4.1
# via -r requirements.in
platformdirs==4.1.0
platformdirs==4.2.0
# via
# black
# virtualenv
pluggy==1.3.0
pluggy==1.4.0
# via pytest
pre-commit==3.6.0
pre-commit==3.6.2
# via -r requirements.in
prompt-toolkit==3.0.43
# via
# click-repl
# ipython
psycopg[binary,pool]==3.1.17
psycopg[binary,pool]==3.1.18
# via -r requirements.in
psycopg-binary==3.1.17
psycopg-binary==3.1.18
# via psycopg
psycopg-pool==3.2.1
# via psycopg
Expand All @@ -207,26 +201,28 @@ pygments==2.17.2
# -r requirements.in
# ipython
# rich
pymupdf==1.23.18
pymupdf==1.24.0
# via -r requirements.in
pymupdfb==1.23.9
pymupdfb==1.24.0
# via pymupdf
pypdf==4.0.0
pypdf==4.1.0
# via -r requirements.in
pyproject-hooks==1.0.0
# via build
pytest==7.4.4
# via
# build
# pip-tools
pytest==8.1.1
# via pytest-django
pytest-django==4.7.0
pytest-django==4.8.0
# via -r requirements.in
python-dateutil==2.8.2
python-dateutil==2.9.0.post0
# via
# botocore
# celery
# time-machine
python-memcached==1.62
# via -r requirements.in
python-slugify==8.0.1
python-slugify==8.0.4
# via -r requirements.in
pyyaml==6.0.1
# via
Expand All @@ -235,21 +231,21 @@ pyyaml==6.0.1
# responses
rcssmin==1.1.1
# via django-compressor
redis==5.0.1
redis==5.0.3
# via -r requirements.in
requests==2.31.0
# via
# -r requirements.in
# responses
responses==0.24.1
responses==0.25.0
# via -r requirements.in
rich==13.7.0
rich==13.7.1
# via -r requirements.in
rjsmin==1.2.1
# via django-compressor
s3transfer==0.10.0
s3transfer==0.10.1
# via boto3
sentry-sdk==1.39.2
sentry-sdk==1.43.0
# via -r requirements.in
six==1.16.0
# via
Expand All @@ -269,43 +265,32 @@ stack-data==0.6.3
# via ipython
text-unidecode==1.3
# via python-slugify
time-machine==2.13.0
time-machine==2.14.0
# via -r requirements.in
tomli==2.0.1
# via
# black
# build
# django-stubs
# mypy
# pip-tools
# pyproject-hooks
# pytest
traitlets==5.14.1
traitlets==5.14.2
# via
# ipython
# matplotlib-inline
types-python-slugify==8.0.0.3
types-python-slugify==8.0.2.20240310
# via -r requirements.in
types-pytz==2023.3.1.1
types-pytz==2024.1.0.20240203
# via django-stubs
types-pyyaml==6.0.12.12
types-pyyaml==6.0.12.20240311
# via
# -r requirements.in
# django-stubs
types-requests==2.31.0.20240106
types-requests==2.31.0.20240311
# via -r requirements.in
typing-extensions==4.9.0
typing-extensions==4.10.0
# via
# asgiref
# black
# django-stubs
# django-stubs-ext
# mypy
# psycopg
# psycopg-pool
tzdata==2023.4
tzdata==2024.1
# via celery
urllib3==2.0.7
urllib3==2.2.1
# via
# botocore
# requests
Expand All @@ -317,9 +302,9 @@ vine==5.1.0
# amqp
# celery
# kombu
virtualenv==20.25.0
virtualenv==20.25.1
# via pre-commit
waitress==2.1.2
waitress==3.0.0
# via webtest
wcwidth==0.2.13
# via prompt-toolkit
Expand All @@ -329,7 +314,7 @@ webob==1.8.7
# via webtest
webtest==3.0.0
# via django-webtest
wheel==0.42.0
wheel==0.43.0
# via pip-tools
whitenoise[brotli]==6.6.0
# via -r requirements.in
Expand Down
6 changes: 3 additions & 3 deletions users/authBackend.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,9 +102,9 @@ def _parse_response(self, xml):
return {
"netid": netid,
"email": email,
"first_name": first_name_node.text
if first_name_node is not None
else netid,
"first_name": (
first_name_node.text if first_name_node is not None else netid
),
"last_name": last_name_node.text if last_name_node is not None else netid,
}

Expand Down

0 comments on commit 48640c1

Please sign in to comment.