]> kaliko git repositories - mpd-sima.git/blobdiff - sima/lib/simastr.py
Cleanup PlayerError exception wrapper
[mpd-sima.git] / sima / lib / simastr.py
index cdb0195fbb7eac9a19dce6000ded3342deeb0668..ec82d91510bd57c724e829ff968ff34bb9e27e3e 100644 (file)
@@ -1,6 +1,6 @@
 # -*- coding: utf-8 -*-
 #
-# Copyright (c) 2009, 2010, 2013 kaliko <kaliko@azylum.org>
+# Copyright (c) 2009, 2010, 2013, 2021 kaliko <kaliko@azylum.org>
 #
 #  This program is free software; you can redistribute it and/or modify
 #  it under the terms of the GNU General Public License as
@@ -81,7 +81,7 @@ class SimaStr(str):
     """
     diafilter = True
     leven_ratio = 0.82
-    regexp_dict = dict()
+    regexp_dict = {}
 
     # Leading patterns: The Le Les
     # case-insensitive matching for this RE
@@ -102,6 +102,7 @@ class SimaStr(str):
     def __init__(self, fuzzstr):
         """
         """
+        super().__init__()
         self.orig = str(fuzzstr)
         self.stripped = str(fuzzstr.strip())
         # fuzzy computation
@@ -118,18 +119,15 @@ class SimaStr(str):
         """
         sea = SimaStr.reg_lead.search(self.stripped)
         if sea:
-            #print sea.groupdict()
             self.stripped = sea.group('root0')
 
         sea = SimaStr.reg_midl.search(self.stripped)
         if sea:
-            #print sea.groupdict()
             self.stripped = str().join([sea.group('root0'), ' ',
                                         sea.group('root1')])
 
         sea = SimaStr.reg_trail.search(self.stripped)
         if sea:
-            #print sea.groupdict()
             self.stripped = sea.group('root0')
 
     def remove_diacritics(self):