Skip to content

Commit

Permalink
trim Python2 cruft
Browse files Browse the repository at this point in the history
  • Loading branch information
a-detiste committed Nov 18, 2024
1 parent b36d7bf commit c2a9dcf
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 11 deletions.
4 changes: 1 addition & 3 deletions periodictable/activation.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,6 @@
http://cds.cern.ch/record/111089/files/IAEA-TR-273.pdf
"""

from __future__ import division, print_function

from math import exp, log, expm1
import os

Expand Down Expand Up @@ -108,7 +106,7 @@ def IAEA1987_isotopic_abundance(iso):
except AttributeError:
return 0

class Sample(object):
class Sample:
"""
Sample properties.
Expand Down
1 change: 0 additions & 1 deletion periodictable/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@
periodic table with custom values for the attributes.
"""
from __future__ import print_function

__docformat__ = 'restructuredtext en'
__all__ = ['delayed_load', 'define_elements', 'get_data_path',
Expand Down
1 change: 0 additions & 1 deletion periodictable/formulas.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
"""
Chemical formula parser.
"""
from __future__ import division, print_function

from copy import copy
from math import pi, sqrt
Expand Down
1 change: 0 additions & 1 deletion periodictable/nsf.py
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,6 @@
Academic Press. doi:10.1016/B978-0-12-398374-9.09989-7
"""
from __future__ import print_function

import numpy as np
from numpy import sqrt, pi, asarray, inf
Expand Down
7 changes: 2 additions & 5 deletions periodictable/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,11 +124,8 @@ def require_keywords(function):
signature element which will force all keywords after '\*' to be named.
"""
import functools
try:
from inspect import signature
getargspec = _getargspec_from_signature
except ImportError: # CRUFT: py 2.7 support
from inspect import getargspec
from inspect import signature
getargspec = _getargspec_from_signature

args, vararg, varkwd, defaults = getargspec(function)
if defaults is None:
Expand Down

0 comments on commit c2a9dcf

Please sign in to comment.