Skip to content

Commit

Permalink
Make pre-commit happy
Browse files Browse the repository at this point in the history
  • Loading branch information
mraspaud committed Nov 17, 2022
1 parent f9c2070 commit 342b176
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 19 deletions.
10 changes: 1 addition & 9 deletions satpy/readers/meris_nc_sen3.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright (c) 2021 Satpy developers
#
# This file is part of satpy.
Expand Down Expand Up @@ -31,13 +29,7 @@

import numpy as np

from satpy.readers.olci_nc import (
NCOLCIBase,
NCOLCI2,
NCOLCIAngles,
NCOLCIMeteo,
BitFlags,
)
from satpy.readers.olci_nc import NCOLCI2, BitFlags, NCOLCIAngles, NCOLCIBase, NCOLCIMeteo

logger = logging.getLogger(__name__)

Expand Down
23 changes: 13 additions & 10 deletions satpy/tests/reader_tests/test_meris_nc.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright (c) 2016-2021 Satpy developers
#
# This file is part of satpy.
Expand All @@ -26,7 +24,7 @@ class TestMERISReader(unittest.TestCase):
@mock.patch('xarray.open_dataset')
def test_instantiate(self, mocked_dataset):
"""Test initialization of file handlers."""
from satpy.readers.meris_nc_sen3 import (NCMERISCal, NCMERISGeo, NCMERIS2)
from satpy.readers.meris_nc_sen3 import NCMERIS2, NCMERISCal, NCMERISGeo
from satpy.tests.utils import make_dataid

ds_id = make_dataid(name='M01', calibration='reflectance')
Expand Down Expand Up @@ -68,10 +66,11 @@ def test_open_file_objects(self, mocked_open_dataset):
@mock.patch('xarray.open_dataset')
def test_get_dataset(self, mocked_dataset):
"""Test reading datasets."""
from satpy.readers.meris_nc_sen3 import NCMERIS2
from satpy.tests.utils import make_dataid
import numpy as np
import xarray as xr

from satpy.readers.meris_nc_sen3 import NCMERIS2
from satpy.tests.utils import make_dataid
mocked_dataset.return_value = xr.Dataset({'mask': (['rows', 'columns'],
np.array([1 << x for x in range(30)]).reshape(5, 6))},
coords={'rows': np.arange(5),
Expand All @@ -85,10 +84,11 @@ def test_get_dataset(self, mocked_dataset):
@mock.patch('xarray.open_dataset')
def test_meris_angles(self, mocked_dataset):
"""Test reading datasets."""
from satpy.readers.meris_nc_sen3 import NCMERISAngles
from satpy.tests.utils import make_dataid
import numpy as np
import xarray as xr

from satpy.readers.meris_nc_sen3 import NCMERISAngles
from satpy.tests.utils import make_dataid
attr_dict = {
'ac_subsampling_factor': 1,
'al_subsampling_factor': 2,
Expand Down Expand Up @@ -117,10 +117,11 @@ def test_meris_angles(self, mocked_dataset):
@mock.patch('xarray.open_dataset')
def test_meris_meteo(self, mocked_dataset):
"""Test reading datasets."""
from satpy.readers.meris_nc_sen3 import NCMERISMeteo
from satpy.tests.utils import make_dataid
import numpy as np
import xarray as xr

from satpy.readers.meris_nc_sen3 import NCMERISMeteo
from satpy.tests.utils import make_dataid
attr_dict = {
'ac_subsampling_factor': 1,
'al_subsampling_factor': 2,
Expand Down Expand Up @@ -153,8 +154,10 @@ class TestBitFlags(unittest.TestCase):

def test_bitflags(self):
"""Test the BitFlags class."""
import numpy as np
from functools import reduce

import numpy as np

from satpy.readers.olci_nc import BitFlags

flag_list = ['SEA_ICE', 'MEGLINT', 'HIGHGLINT', 'CASE2_S', 'CASE2_ANOM',
Expand Down

0 comments on commit 342b176

Please sign in to comment.