diff --git a/km3io/tools.py b/km3io/tools.py
index 1c8f2c8cdbd9e94a4548b0734132c42532c95dda..b42a5ab4c3baad74ae9d1c64b606079b33c394a1 100644
--- a/km3io/tools.py
+++ b/km3io/tools.py
@@ -769,15 +769,15 @@ def is_CC(fobj):
     """Determin if an event (or events) are a result of a Charged Curent interaction (CC)
     or a Neutral Curent interaction (NC).
 
-    According to: https://wiki.km3net.de/index.php/Simulations/The_gSeaGen_code#Physics_event_entries 
+    According to: https://wiki.km3net.de/index.php/Simulations/The_gSeaGen_code#Physics_event_entries
     the interaction types are defined as follow:
 
-        INTER   Interaction type 
+        INTER   Interaction type
         1       EM
         2       Weak[CC]
         3       Weak[NC]
         4       Weak[CC+NC+interference]
-        5       NucleonDecay 
+        5       NucleonDecay
 
     Parameters
     ----------
@@ -791,7 +791,7 @@ def is_CC(fobj):
     if all(len_w2lists <= 7):  # old nu file have w2list of len 7.
         usr_names = fobj.events.mc_tracks.usr_names
         usr_data = fobj.events.mc_tracks.usr
-        mask_cc_flag = (usr_names[:, 0] == b"cc")
+        mask_cc_flag = usr_names[:, 0] == b"cc"
         inter_ID = usr_data[:, 0][mask_cc_flag]
         out = ak1.flatten(inter_ID == 2)  # 2 is the interaction ID for CC.
 
diff --git a/tests/test_tools.py b/tests/test_tools.py
index d2a7325f9ef2552df1295987d02bc5d616d16d1b..719d5bb095fc7a71edb1c654ff759941dd399fb0 100644
--- a/tests/test_tools.py
+++ b/tests/test_tools.py
@@ -536,5 +536,7 @@ class TestIsCC(unittest.TestCase):
         NC_file = is_CC(GENHEN_OFFLINE_FILE)
         CC_file = is_CC(GSEAGEN_OFFLINE_FILE)
 
-        self.assertFalse(all(NC_file) == True)  # this test fails because the CC flags are not reliable in old files
+        self.assertFalse(
+            all(NC_file) == True
+        )  # this test fails because the CC flags are not reliable in old files
         self.assertTrue(all(CC_file) == True)