Skip to content

Commit c63a518

Browse files
Removed unneeded pragma: no cover comments
1 parent 5bea382 commit c63a518

File tree

3 files changed

+5
-8
lines changed

3 files changed

+5
-8
lines changed

openatlas/display/image_processing.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ def safe_resize_image(name: str, file_format: str, size: str) -> bool:
2121
if check_if_folder_exist(size, app.config['RESIZED_IMAGES']):
2222
return image_resizing(name, file_format, size)
2323
return False # pragma: no cover
24-
except OSError as e: # pragma: no cover
24+
except OSError as e:
2525
g.logger.log(
2626
'info',
2727
'image processing',
@@ -93,7 +93,7 @@ def delete_orphaned_resized_images() -> None:
9393
for file in path.glob('**/*'):
9494
file_name = file.name.rsplit('.', 1)[0].lower()
9595
if not file_name.isdigit() or int(file_name) not in g.files:
96-
file.unlink() # pragma: no cover
96+
file.unlink()
9797

9898

9999
def create_resized_images() -> None:

openatlas/display/tab.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,14 @@
11
from __future__ import annotations
22

33
from dataclasses import dataclass, field
4-
from typing import Optional, TYPE_CHECKING
5-
4+
from typing import Optional
65

76
from flask_babel import gettext as _
87
from flask_wtf import FlaskForm
98

109
from openatlas.display.table import Table
1110
from openatlas.display.util2 import uc_first
12-
13-
if TYPE_CHECKING: # pragma: no cover
14-
from openatlas.models.entity import Entity
11+
from openatlas.models.entity import Entity
1512

1613

1714
@dataclass

openatlas/display/util2.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ def sanitize(
2828

2929
def convert_size(size_bytes: int) -> str:
3030
if size_bytes <= 0:
31-
return '0 B' # pragma: no cover
31+
return '0 B'
3232
size_name = ('B', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB')
3333
i = int(math.floor(math.log(size_bytes, 1024)))
3434
return f'{int(size_bytes / math.pow(1024, i))} {size_name[i]}'

0 commit comments

Comments
 (0)