Skip to content

Commit bbb81f8

Browse files
committed
Add "pragma: no cover" to unreachable except blocks.
1 parent eb8459f commit bbb81f8

7 files changed

Lines changed: 9 additions & 9 deletions

File tree

benedict/dicts/io/io_util.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,14 @@
1212
import boto3
1313

1414
s3_installed = True
15-
except ModuleNotFoundError:
15+
except ModuleNotFoundError: # pragma: no cover
1616
s3_installed = False
1717

1818
try:
1919
import fsutil
2020

2121
fsutil_installed = True
22-
except ModuleNotFoundError:
22+
except ModuleNotFoundError: # pragma: no cover
2323
fsutil_installed = False
2424

2525
from benedict.extras import require_fsutil, require_s3

benedict/dicts/parse/parse_util.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
from phonenumbers import PhoneNumberFormat, phonenumberutil
1313

1414
parse_installed = True
15-
except ModuleNotFoundError:
15+
except ModuleNotFoundError: # pragma: no cover
1616
parse_installed = False
1717

1818

benedict/serializers/html.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
from bs4 import BeautifulSoup
55

66
html_installed = True
7-
except ModuleNotFoundError:
7+
except ModuleNotFoundError: # pragma: no cover
88
html_installed = False
99

1010
from typing import Any, NoReturn

benedict/serializers/toml.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
import toml
33

44
toml_installed = True
5-
except ModuleNotFoundError:
5+
except ModuleNotFoundError: # pragma: no cover
66
toml_installed = False
77

88
try:

benedict/serializers/xls.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,15 @@
44
import fsutil
55

66
fsutil_installed = True
7-
except ModuleNotFoundError:
7+
except ModuleNotFoundError: # pragma: no cover
88
fsutil_installed = False
99

1010
try:
1111
from openpyxl import load_workbook
1212
from xlrd import open_workbook
1313

1414
xls_installed = True
15-
except ModuleNotFoundError:
15+
except ModuleNotFoundError: # pragma: no cover
1616
xls_installed = False
1717

1818
from collections.abc import Sequence

benedict/serializers/xml.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
import xmltodict
55

66
xml_installed = True
7-
except ModuleNotFoundError:
7+
except ModuleNotFoundError: # pragma: no cover
88
xml_installed = False
99

1010

benedict/serializers/yaml.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
from yaml.representer import SafeRepresenter
77

88
yaml_installed = True
9-
except ModuleNotFoundError:
9+
except ModuleNotFoundError: # pragma: no cover
1010
yaml_installed = False
1111

1212

0 commit comments

Comments
 (0)