Skip to content

Commit dcd9bd0

Browse files
committed
chore: remove unused imports/vars and formatting
1 parent bfd5f2f commit dcd9bd0

File tree

6 files changed

+5
-11
lines changed

6 files changed

+5
-11
lines changed

site/tests/legacy/deposits/test_rest_api_simpleflow.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -374,7 +374,6 @@ def test_delete_deposits_anonymous(
374374
):
375375
"""Test read deposit by users."""
376376
owner = uploader
377-
not_owner = test_user
378377

379378
# Create a draft using the owner user
380379
client = owner.api_login(client)

site/tests/requests/test_community_manage_record_request.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,7 @@ def test_accept_a_request(
253253

254254
# random user can't lift embargo
255255
_add_embargo(res_record1, db)
256-
with pytest.raises(PermissionDeniedError) as e:
256+
with pytest.raises(PermissionDeniedError):
257257
service.lift_embargo(_id=recid, identity=test_user.identity)
258258

259259

@@ -330,12 +330,12 @@ def test_decline_a_request(
330330

331331
# community owner can't lift embargo
332332
_add_embargo(res_record1, db)
333-
with pytest.raises(PermissionDeniedError) as e:
333+
with pytest.raises(PermissionDeniedError):
334334
service.lift_embargo(_id=recid, identity=community_owner.identity)
335335

336336
# random user can't lift embargo
337337
_add_embargo(res_record1, db)
338-
with pytest.raises(PermissionDeniedError) as e:
338+
with pytest.raises(PermissionDeniedError):
339339
service.lift_embargo(_id=recid, identity=test_user.identity)
340340

341341

@@ -416,5 +416,5 @@ def test_request_expire(
416416

417417
# random user can't lift embargo
418418
_add_embargo(res_record1, db)
419-
with pytest.raises(PermissionDeniedError) as e:
419+
with pytest.raises(PermissionDeniedError):
420420
service.lift_embargo(_id=recid, identity=test_user.identity)

site/zenodo_rdm/exporter/cli.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,6 @@ def export_records_command(format, community_slug):
3737
"""Export records."""
3838
try:
3939
export_records(format, community_slug)
40-
click.secho(f"Records exported successfully.", fg="green")
40+
click.secho("Records exported successfully.", fg="green")
4141
except Exception as e:
4242
click.secho(f"Error exporting records: {e}", fg="red")

site/zenodo_rdm/permissions.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77

88
"""Zenodo permissions."""
99

10-
from invenio_administration.generators import Administration
1110
from invenio_communities.permissions import CommunityPermissionPolicy
1211
from invenio_rdm_records.services.generators import (
1312
AccessGrant,

site/zenodo_rdm/serializers/bibtex.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88

99
from flask_resources import BaseListSchema, MarshmallowSerializer
1010
from flask_resources.serializers import SimpleSerializer
11-
from invenio_rdm_records.resources.serializers import BibtexSerializer
1211
from invenio_rdm_records.resources.serializers.bibtex.schema import BibTexSchema
1312
from marshmallow import fields, missing
1413

site/zenodo_rdm/support/views.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,8 @@
1414
from flask import (
1515
Blueprint,
1616
current_app,
17-
flash,
18-
redirect,
1917
render_template,
2018
request,
21-
url_for,
2219
)
2320
from flask.views import MethodView
2421
from flask_login import current_user

0 commit comments

Comments
 (0)