Skip to content

Commit 849dc9b

Browse files
committed
linting
1 parent 72883cb commit 849dc9b

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

pymatgen/io/validation/validation.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -48,13 +48,13 @@
4848
def is_package_is_up_to_date(package_name: str):
4949
try:
5050
cur_version = version(package_name)
51-
except:
51+
except Exception:
5252
cur_version = "not installed"
5353

5454
try:
5555
response = requests.get(f"https://pypi.org/pypi/{package_name}/json")
5656
latest_version = response.json()["info"]["version"]
57-
except:
57+
except Exception:
5858
latest_version = "package does not exist"
5959

6060
return cur_version == latest_version
@@ -93,14 +93,14 @@ def model_post_init(self, ctx):
9393
pymatgen_is_up_to_date = is_package_is_up_to_date("pymatgen")
9494
if not pymatgen_is_up_to_date:
9595
warnings.warn(
96-
f"We *STRONGLY* recommend you to update your `pymatgen` package, which is behind the most recent version. "
97-
f"Hence, if any pymatgen input sets have been updated, this validator will be outdated."
96+
"We *STRONGLY* recommend you to update your `pymatgen` package, which is behind the most recent version. "
97+
"Hence, if any pymatgen input sets have been updated, this validator will be outdated."
9898
)
9999
pymatgen_io_validation_is_up_to_date = is_package_is_up_to_date("pymatgen-io-validation")
100100
if not pymatgen_io_validation_is_up_to_date:
101101
warnings.warn(
102-
f"We *STRONGLY* recommend you to update your `pymatgen-io-validation` package, which is behind the most recent version. "
103-
f"Hence, if any checks in this package have been updated, the validator you use will be outdated."
102+
"We *STRONGLY* recommend you to update your `pymatgen-io-validation` package, which is behind the most recent version. "
103+
"Hence, if any checks in this package have been updated, the validator you use will be outdated."
104104
)
105105

106106
class Config: # noqa

0 commit comments

Comments
 (0)