diff --git a/.github/workflows/python-black.yml b/.github/workflows/python-black.yml index eee55e69f..9536d5c96 100644 --- a/.github/workflows/python-black.yml +++ b/.github/workflows/python-black.yml @@ -8,9 +8,14 @@ name: Black on: [push, pull_request] +env: + INPUT_VERSION: 24.1.1 + jobs: lint: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - uses: psf/black@stable + with: + version: ${{ env.INPUT_VERSION }} diff --git a/SPRINTLOG.md b/SPRINTLOG.md index b6cd625ba..0f7c59971 100644 --- a/SPRINTLOG.md +++ b/SPRINTLOG.md @@ -343,3 +343,7 @@ _Nothing merged in CLI during this sprint_ - Minor update jinja2 package to address cve ([#1503](https://github.com/ScilifelabDataCentre/dds_web/pull/1503)) - Minor update jwcrypto package to address cve ([#1504](https://github.com/ScilifelabDataCentre/dds_web/pull/1504)) + +# 2024-01-29 - 2024-02-09 + +- Use of a fix version of black and linted files to 24.1.1 ([#1510](https://github.com/ScilifelabDataCentre/dds_web/pull/1510)) diff --git a/dds_web/api/project.py b/dds_web/api/project.py index ffe2c95ef..becf09d11 100644 --- a/dds_web/api/project.py +++ b/dds_web/api/project.py @@ -1063,9 +1063,9 @@ def give_project_access(project_list, current_user, user): from_user_token=dds_web.security.auth.obtain_current_encrypted_token(), ) except KeyNotFoundError as keyerr: - fix_errors[ - proj.public_id - ] = "You do not have access to this project. Please contact the responsible unit." + fix_errors[proj.public_id] = ( + "You do not have access to this project. Please contact the responsible unit." + ) return fix_errors diff --git a/dds_web/api/schemas/project_schemas.py b/dds_web/api/schemas/project_schemas.py index 3f1428d35..fc1452ce0 100644 --- a/dds_web/api/schemas/project_schemas.py +++ b/dds_web/api/schemas/project_schemas.py @@ -306,9 +306,9 @@ def return_items(self, data, **kwargs): { z.name: { **fileschema.dump(z), - "url": s3.generate_get_url(key=z.name_in_bucket) - if url - else None, + "url": ( + s3.generate_get_url(key=z.name_in_bucket) if url else None + ), } for z in y } diff --git a/dds_web/api/user.py b/dds_web/api/user.py index 177b4821a..d12122965 100644 --- a/dds_web/api/user.py +++ b/dds_web/api/user.py @@ -233,9 +233,9 @@ def invite_user(email, new_user_role, project=None, unit=None): project=unit_project, ) except ddserr.KeyNotFoundError as keyerr: - projects_not_shared[ - unit_project.public_id - ] = "You do not have access to the project(s)" + projects_not_shared[unit_project.public_id] = ( + "You do not have access to the project(s)" + ) else: goahead = True else: @@ -258,9 +258,9 @@ def invite_user(email, new_user_role, project=None, unit=None): is_project_owner=new_user_role == "Project Owner", ) except ddserr.KeyNotFoundError as keyerr: - projects_not_shared[ - project.public_id - ] = "You do not have access to the specified project." + projects_not_shared[project.public_id] = ( + "You do not have access to the specified project." + ) else: goahead = True else: diff --git a/dds_web/commands.py b/dds_web/commands.py index 00bdbe9dd..fa12d4856 100644 --- a/dds_web/commands.py +++ b/dds_web/commands.py @@ -277,15 +277,21 @@ def list_lost_files(project_id: str): # Connect to S3 resource = session.resource( service_name="s3", - endpoint_url=project.responsible_unit.sto4_endpoint - if sto4 - else project.responsible_unit.sto2_endpoint, - aws_access_key_id=project.responsible_unit.sto4_access - if sto4 - else project.responsible_unit.sto2_access, - aws_secret_access_key=project.responsible_unit.sto4_secret - if sto4 - else project.responsible_unit.sto2_secret, + endpoint_url=( + project.responsible_unit.sto4_endpoint + if sto4 + else project.responsible_unit.sto2_endpoint + ), + aws_access_key_id=( + project.responsible_unit.sto4_access + if sto4 + else project.responsible_unit.sto2_access + ), + aws_secret_access_key=( + project.responsible_unit.sto4_secret + if sto4 + else project.responsible_unit.sto2_secret + ), ) # List the lost files @@ -340,15 +346,21 @@ def list_lost_files(project_id: str): # Connect to S3 resource_unit = session.resource( service_name="s3", - endpoint_url=proj.responsible_unit.sto4_endpoint - if sto4 - else proj.responsible_unit.sto2_endpoint, - aws_access_key_id=proj.responsible_unit.sto4_access - if sto4 - else proj.responsible_unit.sto2_access, - aws_secret_access_key=proj.responsible_unit.sto4_secret - if sto4 - else proj.responsible_unit.sto2_secret, + endpoint_url=( + proj.responsible_unit.sto4_endpoint + if sto4 + else proj.responsible_unit.sto2_endpoint + ), + aws_access_key_id=( + proj.responsible_unit.sto4_access + if sto4 + else proj.responsible_unit.sto2_access + ), + aws_secret_access_key=( + proj.responsible_unit.sto4_secret + if sto4 + else proj.responsible_unit.sto2_secret + ), ) # List the lost files @@ -411,15 +423,17 @@ def add_missing_bucket(project_id: str): # Connect to S3 resource = session.resource( service_name="s3", - endpoint_url=project.responsible_unit.sto4_endpoint - if sto4 - else project.responsible_unit.sto2_endpoint, - aws_access_key_id=project.responsible_unit.sto4_access - if sto4 - else project.responsible_unit.sto2_access, - aws_secret_access_key=project.responsible_unit.sto4_secret - if sto4 - else project.responsible_unit.sto2_secret, + endpoint_url=( + project.responsible_unit.sto4_endpoint + if sto4 + else project.responsible_unit.sto2_endpoint + ), + aws_access_key_id=( + project.responsible_unit.sto4_access if sto4 else project.responsible_unit.sto2_access + ), + aws_secret_access_key=( + project.responsible_unit.sto4_secret if sto4 else project.responsible_unit.sto2_secret + ), ) # Check if bucket exists @@ -474,15 +488,17 @@ def delete_lost_files(project_id: str): # Connect to S3 resource = session.resource( service_name="s3", - endpoint_url=project.responsible_unit.sto4_endpoint - if sto4 - else project.responsible_unit.sto2_endpoint, - aws_access_key_id=project.responsible_unit.sto4_access - if sto4 - else project.responsible_unit.sto2_access, - aws_secret_access_key=project.responsible_unit.sto4_secret - if sto4 - else project.responsible_unit.sto2_secret, + endpoint_url=( + project.responsible_unit.sto4_endpoint + if sto4 + else project.responsible_unit.sto2_endpoint + ), + aws_access_key_id=( + project.responsible_unit.sto4_access if sto4 else project.responsible_unit.sto2_access + ), + aws_secret_access_key=( + project.responsible_unit.sto4_secret if sto4 else project.responsible_unit.sto2_secret + ), ) # Get list of lost files diff --git a/dds_web/security/project_user_keys.py b/dds_web/security/project_user_keys.py index 240bdcf29..8c27afb7a 100644 --- a/dds_web/security/project_user_keys.py +++ b/dds_web/security/project_user_keys.py @@ -1,4 +1,5 @@ """ Code for generating and maintaining project and user related keys """ + import os import argon2 diff --git a/dds_web/web/root.py b/dds_web/web/root.py index 57e644cab..db0440554 100644 --- a/dds_web/web/root.py +++ b/dds_web/web/root.py @@ -3,6 +3,7 @@ Most of the app routes are in `dds_web/web/user.py`. Here we have the routes that are not specific to a user. """ + from datetime import datetime, timedelta import functools import threading diff --git a/dds_web/web/user.py b/dds_web/web/user.py index 172b76b56..e7b4d58bb 100644 --- a/dds_web/web/user.py +++ b/dds_web/web/user.py @@ -596,9 +596,9 @@ def password_reset_completed(): unit_admins_to_contact = users else: if project.responsible_unit.external_display_name not in units_to_contact: - units_to_contact[ - project.responsible_unit.external_display_name - ] = project.responsible_unit.contact_email + units_to_contact[project.responsible_unit.external_display_name] = ( + project.responsible_unit.contact_email + ) if len(unit_admins_to_contact) > 0: for unit_admin in unit_admins_to_contact: diff --git a/migrations/versions/02acefb3057a_add_done_to_project.py b/migrations/versions/02acefb3057a_add_done_to_project.py index 012f84b80..e6143cec5 100644 --- a/migrations/versions/02acefb3057a_add_done_to_project.py +++ b/migrations/versions/02acefb3057a_add_done_to_project.py @@ -5,6 +5,7 @@ Create Date: 2022-08-17 08:32:57.578324 """ + from alembic import op import sqlalchemy as sa from sqlalchemy.dialects import mysql diff --git a/migrations/versions/0c9c237cced5_unit_quota_and_warning.py b/migrations/versions/0c9c237cced5_unit_quota_and_warning.py index 46ab85d6b..e7d290107 100644 --- a/migrations/versions/0c9c237cced5_unit_quota_and_warning.py +++ b/migrations/versions/0c9c237cced5_unit_quota_and_warning.py @@ -5,6 +5,7 @@ Create Date: 2023-01-10 14:30:57.089391 """ + from alembic import op import sqlalchemy as sa from sqlalchemy.dialects import mysql diff --git a/migrations/versions/1256117ad629_add_password_reset.py b/migrations/versions/1256117ad629_add_password_reset.py index 8cd23736d..6a1edff48 100644 --- a/migrations/versions/1256117ad629_add_password_reset.py +++ b/migrations/versions/1256117ad629_add_password_reset.py @@ -5,6 +5,7 @@ Create Date: 2022-03-14 16:23:44.287254 """ + from alembic import op import sqlalchemy as sa from sqlalchemy.dialects import mysql diff --git a/migrations/versions/19b877061c98_add_motd.py b/migrations/versions/19b877061c98_add_motd.py index fd5a3de38..c7ac486d4 100644 --- a/migrations/versions/19b877061c98_add_motd.py +++ b/migrations/versions/19b877061c98_add_motd.py @@ -5,6 +5,7 @@ Create Date: 2022-04-05 13:49:44.087517 """ + from alembic import op import sqlalchemy as sa from sqlalchemy.dialects import mysql diff --git a/migrations/versions/1ab892d08e16_change_public_id_length.py b/migrations/versions/1ab892d08e16_change_public_id_length.py index c0779a5e2..f162f4c36 100644 --- a/migrations/versions/1ab892d08e16_change_public_id_length.py +++ b/migrations/versions/1ab892d08e16_change_public_id_length.py @@ -5,6 +5,7 @@ Create Date: 2022-04-13 06:16:56.046361 """ + from alembic import op import sqlalchemy as sa from sqlalchemy.dialects import mysql diff --git a/migrations/versions/1e56b6212479_add_sto4_columns.py b/migrations/versions/1e56b6212479_add_sto4_columns.py index 26a720b3e..246b4deda 100644 --- a/migrations/versions/1e56b6212479_add_sto4_columns.py +++ b/migrations/versions/1e56b6212479_add_sto4_columns.py @@ -5,6 +5,7 @@ Create Date: 2023-07-26 10:40:22.591583 """ + from alembic import op import sqlalchemy as sa from sqlalchemy.dialects import mysql diff --git a/migrations/versions/1fbd604872e9_add_column_created_at.py b/migrations/versions/1fbd604872e9_add_column_created_at.py index eaaa5b672..5aace6199 100644 --- a/migrations/versions/1fbd604872e9_add_column_created_at.py +++ b/migrations/versions/1fbd604872e9_add_column_created_at.py @@ -5,6 +5,7 @@ Create Date: 2022-04-08 14:32:26.800385 """ + from alembic import op import sqlalchemy as sa from sqlalchemy.dialects import mysql diff --git a/migrations/versions/2cefec51b9bb_add_tbhours_since_start.py b/migrations/versions/2cefec51b9bb_add_tbhours_since_start.py index 1da10b121..786e7fce3 100644 --- a/migrations/versions/2cefec51b9bb_add_tbhours_since_start.py +++ b/migrations/versions/2cefec51b9bb_add_tbhours_since_start.py @@ -5,6 +5,7 @@ Create Date: 2023-06-02 12:07:01.372912 """ + from alembic import op import sqlalchemy as sa from sqlalchemy.dialects import mysql diff --git a/migrations/versions/399801a80e7a_change_researchuser_count_column.py b/migrations/versions/399801a80e7a_change_researchuser_count_column.py index d6206fdd2..74dbfa959 100644 --- a/migrations/versions/399801a80e7a_change_researchuser_count_column.py +++ b/migrations/versions/399801a80e7a_change_researchuser_count_column.py @@ -5,6 +5,7 @@ Create Date: 2023-05-29 09:37:31.007336 """ + from alembic import op import sqlalchemy as sa from sqlalchemy.dialects import mysql diff --git a/migrations/versions/3d610b382383_remove_cost_from_usage_table.py b/migrations/versions/3d610b382383_remove_cost_from_usage_table.py index 6cc5db230..430b918a3 100644 --- a/migrations/versions/3d610b382383_remove_cost_from_usage_table.py +++ b/migrations/versions/3d610b382383_remove_cost_from_usage_table.py @@ -5,6 +5,7 @@ Create Date: 2023-11-03 08:36:35.425045 """ + from alembic import op import sqlalchemy as sa from sqlalchemy.dialects import mysql diff --git a/migrations/versions/53bb37a3cd84_add_num_unique_proj_owners.py b/migrations/versions/53bb37a3cd84_add_num_unique_proj_owners.py index 3dd2b3215..b2f325b13 100644 --- a/migrations/versions/53bb37a3cd84_add_num_unique_proj_owners.py +++ b/migrations/versions/53bb37a3cd84_add_num_unique_proj_owners.py @@ -5,6 +5,7 @@ Create Date: 2023-05-30 13:24:52.406907 """ + from alembic import op import sqlalchemy as sa from sqlalchemy.dialects import mysql diff --git a/migrations/versions/666003748d14_change_active_nullable_and_default.py b/migrations/versions/666003748d14_change_active_nullable_and_default.py index 7ea464f47..9dc2a50f6 100644 --- a/migrations/versions/666003748d14_change_active_nullable_and_default.py +++ b/migrations/versions/666003748d14_change_active_nullable_and_default.py @@ -5,6 +5,7 @@ Create Date: 2022-02-24 16:35:34.228040 """ + from alembic import op import sqlalchemy as sa from sqlalchemy.dialects import mysql diff --git a/migrations/versions/6e9b74878553_add_busy_to_project.py b/migrations/versions/6e9b74878553_add_busy_to_project.py index cd8a58011..250f28ac8 100644 --- a/migrations/versions/6e9b74878553_add_busy_to_project.py +++ b/migrations/versions/6e9b74878553_add_busy_to_project.py @@ -5,6 +5,7 @@ Create Date: 2022-09-07 09:09:06.081829 """ + from alembic import op import sqlalchemy as sa from sqlalchemy.dialects import mysql diff --git a/migrations/versions/879b99e7f212_unit_personnel_added.py b/migrations/versions/879b99e7f212_unit_personnel_added.py index 881d9bdd0..41e8a6edc 100644 --- a/migrations/versions/879b99e7f212_unit_personnel_added.py +++ b/migrations/versions/879b99e7f212_unit_personnel_added.py @@ -5,6 +5,7 @@ Create Date: 2023-05-29 07:51:05.491352 """ + from alembic import op import sqlalchemy as sa from sqlalchemy.dialects import mysql diff --git a/migrations/versions/908382be548a_add_column_active_to_motd.py b/migrations/versions/908382be548a_add_column_active_to_motd.py index dd0b797f3..2d7a4cb1a 100644 --- a/migrations/versions/908382be548a_add_column_active_to_motd.py +++ b/migrations/versions/908382be548a_add_column_active_to_motd.py @@ -3,6 +3,7 @@ Revises: cd1903e5f2b0 Create Date: 2022-06-13 12:34:34.981373 """ + from alembic import op import sqlalchemy as sa from sqlalchemy.dialects import mysql diff --git a/migrations/versions/93ec6983ce8d_number_of_inactive_projects_added.py b/migrations/versions/93ec6983ce8d_number_of_inactive_projects_added.py index 44200ceea..f17605ea5 100644 --- a/migrations/versions/93ec6983ce8d_number_of_inactive_projects_added.py +++ b/migrations/versions/93ec6983ce8d_number_of_inactive_projects_added.py @@ -5,6 +5,7 @@ Create Date: 2023-05-30 08:47:53.926692 """ + from alembic import op import sqlalchemy as sa from sqlalchemy.dialects import mysql diff --git a/migrations/versions/a5a40d843415_changed_sensitive.py b/migrations/versions/a5a40d843415_changed_sensitive.py index 11a167bf6..925df3d5d 100644 --- a/migrations/versions/a5a40d843415_changed_sensitive.py +++ b/migrations/versions/a5a40d843415_changed_sensitive.py @@ -5,6 +5,7 @@ Create Date: 2022-02-19 10:32:31.626236 """ + from alembic import op import sqlalchemy as sa from sqlalchemy.orm.session import Session diff --git a/migrations/versions/aec752f1e0a5_tb_uploaded_since_start_added.py b/migrations/versions/aec752f1e0a5_tb_uploaded_since_start_added.py index fb7469ce4..cc2f05330 100644 --- a/migrations/versions/aec752f1e0a5_tb_uploaded_since_start_added.py +++ b/migrations/versions/aec752f1e0a5_tb_uploaded_since_start_added.py @@ -5,6 +5,7 @@ Create Date: 2023-05-31 14:09:07.327919 """ + from alembic import op import sqlalchemy as sa from sqlalchemy.dialects import mysql diff --git a/migrations/versions/b01fc48f5939_add_totp.py b/migrations/versions/b01fc48f5939_add_totp.py index 48c347d05..3015d1b2a 100644 --- a/migrations/versions/b01fc48f5939_add_totp.py +++ b/migrations/versions/b01fc48f5939_add_totp.py @@ -5,6 +5,7 @@ Create Date: 2022-04-13 14:27:49.319000 """ + from alembic import op import sqlalchemy as sa from sqlalchemy.dialects import mysql diff --git a/migrations/versions/b976f6cda95c_add_reporting_table.py b/migrations/versions/b976f6cda95c_add_reporting_table.py index b6f7dffd6..3ac7843c5 100644 --- a/migrations/versions/b976f6cda95c_add_reporting_table.py +++ b/migrations/versions/b976f6cda95c_add_reporting_table.py @@ -5,6 +5,7 @@ Create Date: 2023-01-26 10:02:37.535695 """ + from alembic import op import sqlalchemy as sa from sqlalchemy.dialects import mysql diff --git a/migrations/versions/bb2f428feb9b_rename_safespring_columns.py b/migrations/versions/bb2f428feb9b_rename_safespring_columns.py index 745df73cf..3e0f56b36 100644 --- a/migrations/versions/bb2f428feb9b_rename_safespring_columns.py +++ b/migrations/versions/bb2f428feb9b_rename_safespring_columns.py @@ -5,6 +5,7 @@ Create Date: 2023-07-26 07:11:20.429058 """ + from alembic import op import sqlalchemy as sa from sqlalchemy.dialects import mysql diff --git a/migrations/versions/c1e908241401_total_number_of_projects_added.py b/migrations/versions/c1e908241401_total_number_of_projects_added.py index d0a9c2681..461c16062 100644 --- a/migrations/versions/c1e908241401_total_number_of_projects_added.py +++ b/migrations/versions/c1e908241401_total_number_of_projects_added.py @@ -5,6 +5,7 @@ Create Date: 2023-05-29 11:27:10.843043 """ + from alembic import op import sqlalchemy as sa from sqlalchemy.dialects import mysql diff --git a/migrations/versions/c8f25f39b62f_add_tbhours_since_last_month.py b/migrations/versions/c8f25f39b62f_add_tbhours_since_last_month.py index 457852442..d38ba09cf 100644 --- a/migrations/versions/c8f25f39b62f_add_tbhours_since_last_month.py +++ b/migrations/versions/c8f25f39b62f_add_tbhours_since_last_month.py @@ -5,6 +5,7 @@ Create Date: 2023-05-31 08:04:09.768951 """ + from alembic import op import sqlalchemy as sa from sqlalchemy.dialects import mysql diff --git a/migrations/versions/cd1903e5f2b0_add_usage_table.py b/migrations/versions/cd1903e5f2b0_add_usage_table.py index e17535463..f0c19dedb 100644 --- a/migrations/versions/cd1903e5f2b0_add_usage_table.py +++ b/migrations/versions/cd1903e5f2b0_add_usage_table.py @@ -5,6 +5,7 @@ Create Date: 2022-05-25 14:33:38.520267 """ + from alembic import op import sqlalchemy as sa from sqlalchemy.dialects import mysql diff --git a/migrations/versions/d117e6299dc9_remove_project_invites.py b/migrations/versions/d117e6299dc9_remove_project_invites.py index 1cb6c8cb4..b6284d2bd 100644 --- a/migrations/versions/d117e6299dc9_remove_project_invites.py +++ b/migrations/versions/d117e6299dc9_remove_project_invites.py @@ -5,6 +5,7 @@ Create Date: 2022-02-18 14:43:43.954122 """ + from alembic import op import sqlalchemy as sa from sqlalchemy.dialects import mysql diff --git a/migrations/versions/d48ecb4db259_add_terrabytes_stored_in_system.py b/migrations/versions/d48ecb4db259_add_terrabytes_stored_in_system.py index e8c31605d..d174c8d72 100644 --- a/migrations/versions/d48ecb4db259_add_terrabytes_stored_in_system.py +++ b/migrations/versions/d48ecb4db259_add_terrabytes_stored_in_system.py @@ -5,6 +5,7 @@ Create Date: 2023-05-30 13:44:05.232573 """ + from alembic import op import sqlalchemy as sa from sqlalchemy.dialects import mysql diff --git a/migrations/versions/e07c83ed0bda_add_unit_admin.py b/migrations/versions/e07c83ed0bda_add_unit_admin.py index 7939e1562..3f7ae85ac 100644 --- a/migrations/versions/e07c83ed0bda_add_unit_admin.py +++ b/migrations/versions/e07c83ed0bda_add_unit_admin.py @@ -5,6 +5,7 @@ Create Date: 2023-05-29 09:09:24.689422 """ + from alembic import op import sqlalchemy as sa from sqlalchemy.dialects import mysql diff --git a/migrations/versions/e5a51e5ed9a1_initial.py b/migrations/versions/e5a51e5ed9a1_initial.py index e37a04e93..a11d46a18 100644 --- a/migrations/versions/e5a51e5ed9a1_initial.py +++ b/migrations/versions/e5a51e5ed9a1_initial.py @@ -5,6 +5,7 @@ Create Date: 2022-02-18 08:43:54.527235 """ + from alembic import op import sqlalchemy as sa from sqlalchemy.dialects import mysql diff --git a/migrations/versions/eb395af90e18_maintenance.py b/migrations/versions/eb395af90e18_maintenance.py index 7abd2ddf6..907d62721 100644 --- a/migrations/versions/eb395af90e18_maintenance.py +++ b/migrations/versions/eb395af90e18_maintenance.py @@ -5,6 +5,7 @@ Create Date: 2022-09-19 13:47:03.397931 """ + from alembic import op import sqlalchemy as sa from sqlalchemy.dialects import mysql diff --git a/migrations/versions/edde808b4556_number_of_active_projects_added.py b/migrations/versions/edde808b4556_number_of_active_projects_added.py index dc3ed99dd..5660c413f 100644 --- a/migrations/versions/edde808b4556_number_of_active_projects_added.py +++ b/migrations/versions/edde808b4556_number_of_active_projects_added.py @@ -5,6 +5,7 @@ Create Date: 2023-05-29 14:34:36.889601 """ + from alembic import op import sqlalchemy as sa from sqlalchemy.dialects import mysql diff --git a/migrations/versions/f27c5988d640_set_sto2_to_nullable.py b/migrations/versions/f27c5988d640_set_sto2_to_nullable.py index 32885f5a4..19c5e21ed 100644 --- a/migrations/versions/f27c5988d640_set_sto2_to_nullable.py +++ b/migrations/versions/f27c5988d640_set_sto2_to_nullable.py @@ -5,6 +5,7 @@ Create Date: 2023-09-07 09:36:25.289025 """ + from alembic import op import sqlalchemy as sa from sqlalchemy.dialects import mysql diff --git a/tests/api/test_project.py b/tests/api/test_project.py index 18fcfcb10..c474e3cb6 100644 --- a/tests/api/test_project.py +++ b/tests/api/test_project.py @@ -1716,7 +1716,9 @@ def test_set_busy_invalid_version(module_client): """ProjectBusy endpoint is empty and should only return error message about invalid version.""" # Error messages major_version_error: str = "You're using an old CLI version, please upgrade to the latest one." - busy_error: str = "Your CLI version is trying to use functionality which is no longer in use. Upgrade your version to the latest one and run your command again." + busy_error: str = ( + "Your CLI version is trying to use functionality which is no longer in use. Upgrade your version to the latest one and run your command again." + ) for username in ["superadmin", "researchuser", "projectowner", "unituser", "unitadmin"]: # Get user diff --git a/tests/test_files_new.py b/tests/test_files_new.py index 591ec3492..8833d4013 100644 --- a/tests/test_files_new.py +++ b/tests/test_files_new.py @@ -777,9 +777,9 @@ def test_new_file_sizeprocessed_bigint(client): assert project_1 file_sizeprocessed_bigint = FIRST_NEW_FILE.copy() - file_sizeprocessed_bigint[ - "size_processed" - ] = 9223372036854775807 # 9223 petabytes (big int sql definition) + file_sizeprocessed_bigint["size_processed"] = ( + 9223372036854775807 # 9223 petabytes (big int sql definition) + ) response = client.post( tests.DDSEndpoint.FILE_NEW, headers=tests.UserAuth(tests.USER_CREDENTIALS["unitadmin"]).token(client),