Skip to content

Commit

Permalink
refact: remove unused imports and variables
Browse files Browse the repository at this point in the history
  • Loading branch information
renatav committed Jul 3, 2023
1 parent e670e23 commit 05271f0
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 8 deletions.
4 changes: 2 additions & 2 deletions taf/api/metadata.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import datetime
from logging import DEBUG, ERROR, INFO
from logging import ERROR, INFO
from pathlib import Path
from logdecorator import log_on_end, log_on_error
from taf.exceptions import TargetsMetadataUpdateError
Expand Down Expand Up @@ -111,7 +111,7 @@ def update_metadata_expiration_date(
_update_expiration_date_of_role(
taf_repo, role, loaded_yubikeys, keystore, start_date, interval, scheme
)
except Exception as e:
except Exception:
return

if no_commit:
Expand Down
6 changes: 3 additions & 3 deletions taf/api/repository.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from functools import partial
from logging import DEBUG, INFO
from logging import DEBUG
import click
from logdecorator import log_on_end
from logdecorator import log_on_end, log_on_start

from collections import defaultdict
from pathlib import Path
Expand All @@ -17,7 +17,7 @@
from taf.log import taf_logger


@log_on_end(DEBUG, "Creating a new authentication repository", logger=taf_logger)
@log_on_start(DEBUG, "Creating a new authentication repository", logger=taf_logger)
@log_on_end(DEBUG, "Created of a new repository finished", logger=taf_logger)
def create_repository(
repo_path, keystore=None, roles_key_infos=None, commit=False, test=False
Expand Down
3 changes: 1 addition & 2 deletions taf/api/roles.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from logging import DEBUG, INFO
from logging import DEBUG
import os
import click
from collections import defaultdict
Expand Down Expand Up @@ -280,7 +280,6 @@ def add_signing_key(
roles_key_infos, keystore = _initialize_roles_and_keystore(
roles_key_infos, keystore, enter_info=False
)
roles_infos = roles_key_infos.get("roles")

pub_key_pem = None
if pub_key_path is not None:
Expand Down
1 change: 0 additions & 1 deletion taf/api/yubikey.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import click

from pathlib import Path
from taf.constants import DEFAULT_RSA_SIGNATURE_SCHEME
import taf.yubikey as yk


Expand Down

0 comments on commit 05271f0

Please sign in to comment.