Skip to content

Commit

Permalink
[ENH] Changed to isinstance
Browse files Browse the repository at this point in the history
  • Loading branch information
dutta-alankar committed Apr 28, 2024
1 parent 417daaa commit ea3dfc6
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 5 deletions.
2 changes: 0 additions & 2 deletions .tokeignore

This file was deleted.

4 changes: 2 additions & 2 deletions astro_plasma/core/functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@ def cooling_approx(temperature, metallicity):
Plasma cooling function normalized by nH^2.
"""
if type(temperature) == list:
if isinstance(temperature, list):
temperature = np.array(temperature)
if type(metallicity) == list:
if isinstance(metallicity, list):
metallicity = np.array(metallicity)
file_path = os.path.realpath(__file__)
dir_loc = os.path.split(file_path)[:-1]
Expand Down
2 changes: 1 addition & 1 deletion astro_plasma/core/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ class AtmElement(Enum):

@staticmethod
def parse(predicate: Union[str, int]) -> "AtmElement":
idx = int(type(predicate) == int)
idx = int(isinstance(predicate, int))
error_label = "atomic number" if idx == 1 else "symbol"

for element in AtmElement:
Expand Down

0 comments on commit ea3dfc6

Please sign in to comment.