Skip to content

Commit e272249

Browse files
committed
use explicit None check instead of truthy
1 parent a13b2b6 commit e272249

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/pymatgen/io/vasp/inputs.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2774,7 +2774,7 @@ def _gen_potcar_summary_stats(
27742774
}
27752775
)
27762776

2777-
if summary_stats_filename:
2777+
if summary_stats_filename is not None:
27782778
dumpfn(new_summary_stats, summary_stats_filename)
27792779

27802780
return new_summary_stats
@@ -2903,16 +2903,16 @@ def set_symbols(
29032903
functional (str): The functional to use. If None, the setting
29042904
PMG_DEFAULT_FUNCTIONAL in .pmgrc.yaml is used, or if this is
29052905
not set, it will default to PBE.
2906-
sym_potcar_map (dict): A map of symbol:raw POTCAR string. If
2906+
sym_potcar_map (dict): A map of symbol to raw POTCAR string. If
29072907
sym_potcar_map is specified, POTCARs will be generated from
29082908
the given map data rather than the config file location.
29092909
"""
29102910
del self[:]
29112911

2912-
if sym_potcar_map:
2913-
self.extend(PotcarSingle(sym_potcar_map[el]) for el in symbols)
2914-
else:
2912+
if sym_potcar_map is None:
29152913
self.extend(PotcarSingle.from_symbol_and_functional(el, functional) for el in symbols)
2914+
else:
2915+
self.extend(PotcarSingle(sym_potcar_map[el]) for el in symbols)
29162916

29172917

29182918
class UnknownPotcarWarning(UserWarning):

0 commit comments

Comments
 (0)