mirror of
https://github.com/beetbox/beets.git
synced 2025-12-06 16:42:42 +01:00
lastgenre: Accept AI suggested use open() for tree file
instead of codecs.open(), which most probably is a relict of beets' Python2/3 compatibility area. Co-authored-by: sourcery-ai[bot] <58596630+sourcery-ai[bot]@users.noreply.github.com>
This commit is contained in:
parent
a98fa054fe
commit
bbde63d87e
1 changed files with 1 additions and 2 deletions
|
|
@ -22,7 +22,6 @@ The scraper script used is available here:
|
|||
https://gist.github.com/1241307
|
||||
"""
|
||||
|
||||
import codecs
|
||||
import os
|
||||
import traceback
|
||||
from typing import Union
|
||||
|
|
@ -141,7 +140,7 @@ class LastGenrePlugin(plugins.BeetsPlugin):
|
|||
# Read the tree
|
||||
if c14n_filename:
|
||||
self._log.debug("Loading canonicalization tree {0}", c14n_filename)
|
||||
with codecs.open(
|
||||
with open(
|
||||
syspath(normpath(c14n_filename)), "r", encoding="utf-8"
|
||||
) as f:
|
||||
genres_tree = yaml.safe_load(f)
|
||||
|
|
|
|||
Loading…
Reference in a new issue