Commit 7b374731 authored by payno's avatar payno
Browse files

PEP8

parent 76aab690
Pipeline #51923 failed with stages
in 11 minutes and 46 seconds
...@@ -34,8 +34,6 @@ import multiprocessing ...@@ -34,8 +34,6 @@ import multiprocessing
import numpy import numpy
from PyMca5.PyMcaPhysics.xas.XASClass import XASClass from PyMca5.PyMcaPhysics.xas.XASClass import XASClass
from PyMca5.PyMcaPhysics.xas.XASClass import e2k, k2e from PyMca5.PyMcaPhysics.xas.XASClass import e2k, k2e
from est.core.process.process import _input_desc
from est.core.process.process import _output_desc
from est.core.process.process import Process from est.core.process.process import Process
from est.core.process.process import _NexusDatasetDef from est.core.process.process import _NexusDatasetDef
from est.core.types import XASObject, Spectrum from est.core.types import XASObject, Spectrum
......
...@@ -33,8 +33,6 @@ import multiprocessing ...@@ -33,8 +33,6 @@ import multiprocessing
import numpy import numpy
from PyMca5.PyMcaPhysics.xas.XASClass import XASClass from PyMca5.PyMcaPhysics.xas.XASClass import XASClass
from est.core.process.process import _input_desc
from est.core.process.process import _output_desc
from est.core.process.process import Process from est.core.process.process import Process
from est.core.process.process import _NexusDatasetDef from est.core.process.process import _NexusDatasetDef
from est.core.types import XASObject, Spectrum from est.core.types import XASObject, Spectrum
......
...@@ -30,7 +30,6 @@ __date__ = "06/11/2019" ...@@ -30,7 +30,6 @@ __date__ = "06/11/2019"
import functools import functools
import logging import logging
import multiprocessing import multiprocessing
from PyMca5.PyMcaPhysics.xas.XASClass import XASClass, e2k from PyMca5.PyMcaPhysics.xas.XASClass import XASClass, e2k
from est.core.process.process import Process from est.core.process.process import Process
from est.core.process.pymca.exafs import process_spectr_exafs from est.core.process.pymca.exafs import process_spectr_exafs
......
...@@ -32,8 +32,6 @@ import functools ...@@ -32,8 +32,6 @@ import functools
import logging import logging
import multiprocessing import multiprocessing
from PyMca5.PyMcaPhysics.xas.XASClass import XASClass from PyMca5.PyMcaPhysics.xas.XASClass import XASClass
from est.core.process.process import _input_desc
from est.core.process.process import _output_desc
from est.core.process.process import Process, Progress from est.core.process.process import Process, Progress
from est.core.process.process import _NexusDatasetDef from est.core.process.process import _NexusDatasetDef
from est.core.types import Spectrum, XASObject from est.core.types import Spectrum, XASObject
......
...@@ -29,10 +29,9 @@ __date__ = "06/11/2019" ...@@ -29,10 +29,9 @@ __date__ = "06/11/2019"
import os import os
import unittest import unittest
from est.core.types import Dim
try: try:
import PyMca5 import PyMca5 # noqa
except ImportError: except ImportError:
has_pymca = False has_pymca = False
else: else:
......
...@@ -30,10 +30,9 @@ __date__ = "06/11/2019" ...@@ -30,10 +30,9 @@ __date__ = "06/11/2019"
import os import os
import unittest import unittest
from est.core.types import XASObject, Spectrum from est.core.types import XASObject, Spectrum
from est.core.types import Dim
try: try:
import PyMca5 import PyMca5 # noqa
except ImportError: except ImportError:
has_pymca = False has_pymca = False
else: else:
......
...@@ -37,10 +37,9 @@ from est.core.io import read as read_xas ...@@ -37,10 +37,9 @@ from est.core.io import read as read_xas
from est.core.utils import spectra as spectra_utils from est.core.utils import spectra as spectra_utils
from est.core.types import XASObject from est.core.types import XASObject
from silx.io.url import DataUrl from silx.io.url import DataUrl
from est.core.types import Dim
try: try:
import PyMca5 import PyMca5 # noqa
except ImportError: except ImportError:
has_pymca = False has_pymca = False
else: else:
......
...@@ -30,10 +30,9 @@ __date__ = "06/11/2019" ...@@ -30,10 +30,9 @@ __date__ = "06/11/2019"
import os import os
import unittest import unittest
from est.core.types import Spectrum, XASObject from est.core.types import Spectrum, XASObject
from est.core.types import Dim
try: try:
import PyMca5 import PyMca5 # noqa
except ImportError: except ImportError:
has_pymca = False has_pymca = False
else: else:
......
...@@ -40,7 +40,7 @@ from est.core.utils import spectra as spectra_utils ...@@ -40,7 +40,7 @@ from est.core.utils import spectra as spectra_utils
from est.core.types import Dim from est.core.types import Dim
try: try:
import PyMca5 import PyMca5 # noqa
except ImportError: except ImportError:
has_pymca = False has_pymca = False
else: else:
......
...@@ -44,10 +44,9 @@ from est.core.io import XASWriter ...@@ -44,10 +44,9 @@ from est.core.io import XASWriter
from est.core.io import read as read_xas from est.core.io import read as read_xas
from est.core.types import XASObject from est.core.types import XASObject
from est.core.utils import spectra as spectra_utils from est.core.utils import spectra as spectra_utils
from est.core.types import Dim
try: try:
import PyMca5 import PyMca5 # noqa
except ImportError: except ImportError:
has_pymca = False has_pymca = False
else: else:
......
...@@ -30,8 +30,6 @@ __date__ = "06/11/2019" ...@@ -30,8 +30,6 @@ __date__ = "06/11/2019"
from est.core.types import XASObject from est.core.types import XASObject
from est.core.types import Spectrum from est.core.types import Spectrum
from est.core.types import Spectra from est.core.types import Spectra
from est.core.process.process import _input_desc
from est.core.process.process import _output_desc
from .process import Process from .process import Process
import logging import logging
import numpy import numpy
......
...@@ -27,7 +27,6 @@ __authors__ = ["H. Payno"] ...@@ -27,7 +27,6 @@ __authors__ = ["H. Payno"]
__license__ = "MIT" __license__ = "MIT"
__date__ = "06/11/2019" __date__ = "06/11/2019"
from est.core.types import XASObject, Spectrum
from .process import Process from .process import Process
import logging import logging
......
...@@ -32,10 +32,9 @@ import tempfile ...@@ -32,10 +32,9 @@ import tempfile
import shutil import shutil
from est.core.types import Spectrum, XASObject from est.core.types import Spectrum, XASObject
from est.core.io import XASWriter from est.core.io import XASWriter
from est.core.types import Dim
try: try:
import larch import larch # noqa
except ImportError: except ImportError:
has_larch = False has_larch = False
else: else:
...@@ -44,7 +43,7 @@ else: ...@@ -44,7 +43,7 @@ else:
from est.core.process.larch.pre_edge import Larch_pre_edge from est.core.process.larch.pre_edge import Larch_pre_edge
from est.core.process.larch.xftf import Larch_xftf from est.core.process.larch.xftf import Larch_xftf
try: try:
import PyMca5 import PyMca5 # noqa
except ImportError: except ImportError:
has_pymca = False has_pymca = False
else: else:
......
...@@ -126,7 +126,7 @@ class TestSpectraDimensions(unittest.TestCase): ...@@ -126,7 +126,7 @@ class TestSpectraDimensions(unittest.TestCase):
# if dims are incoherent with energy, should raise an error # if dims are incoherent with energy, should raise an error
dims = (Dim.DIM_0, Dim.DIM_1, Dim.DIM_2) dims = (Dim.DIM_0, Dim.DIM_1, Dim.DIM_2)
with warnings.catch_warnings(record=True) as w: with warnings.catch_warnings(record=True):
XASReader().read_frm_url( XASReader().read_frm_url(
InputInformation( InputInformation(
spectra_url=spectra_url, spectra_url=spectra_url,
......
...@@ -33,18 +33,17 @@ import unittest ...@@ -33,18 +33,17 @@ import unittest
import tempfile import tempfile
import h5py import h5py
import shutil import shutil
from est.core.types import Spectrum, XASObject, Dim from est.core.types import Spectrum, XASObject
from est.core.utils import spectra as spectra_utils from est.core.utils import spectra as spectra_utils
from est.core.io import read as read_xas from est.core.io import read as read_xas
from silx.io.url import DataUrl from silx.io.url import DataUrl
from est.units import ur from est.units import ur
import json import json
import pint
import silx.io.utils import silx.io.utils
from est.core.types import Dim from est.core.types import Dim
try: try:
import PyMca5 import PyMca5 # noqa
except ImportError: except ImportError:
has_pymca = False has_pymca = False
else: else:
......
from .spectrum import Spectrum from .spectrum import Spectrum # noqa
from .spectra import Spectra from .spectra import Spectra # noqa
from .sample import Sample from .sample import Sample # noqa
from .xasobject import XASObject from .xasobject import XASObject # noqa
from .dim import Dim from .dim import Dim # noqa
...@@ -39,7 +39,7 @@ import pint ...@@ -39,7 +39,7 @@ import pint
_logger = logging.getLogger(__name__) _logger = logging.getLogger(__name__)
try: try:
import larch import larch # noqa
except ImportError: except ImportError:
class _Spectrum_Base: class _Spectrum_Base:
......
...@@ -31,13 +31,12 @@ import tempfile ...@@ -31,13 +31,12 @@ import tempfile
import os import os
import unittest import unittest
from est.core.types import Spectrum from est.core.types import Spectrum
from est.core.types import Dim
from est.core.utils import spectra as spectra_utils from est.core.utils import spectra as spectra_utils
from est.core.types import XASObject from est.core.types import XASObject
import shutil import shutil
try: try:
import PyMca5 import PyMca5 # noqa
except ImportError: except ImportError:
has_pymca = False has_pymca = False
else: else:
......
...@@ -32,10 +32,9 @@ import os ...@@ -32,10 +32,9 @@ import os
import unittest import unittest
from est.core.types import Spectrum from est.core.types import Spectrum
from est.units import ur from est.units import ur
from est.core.types import Dim
try: try:
import PyMca5 import PyMca5 # noqa
except ImportError: except ImportError:
has_pymca = False has_pymca = False
else: else:
......
...@@ -38,12 +38,11 @@ from est.core.utils import spectra as spectra_utils ...@@ -38,12 +38,11 @@ from est.core.utils import spectra as spectra_utils
from est.core.io import read as read_xas from est.core.io import read as read_xas
from silx.io.url import DataUrl from silx.io.url import DataUrl
import json import json
import pint
import silx.io.utils import silx.io.utils
from est.core.types import Dim from est.core.types import Dim
try: try:
import PyMca5 import PyMca5 # noqa
except ImportError: except ImportError:
has_pymca = False has_pymca = False
else: else:
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment