Commit graph

35 commits

Author SHA1 Message Date
Serene-Arc
a6e5201ff3 Apply formatting tools to all files
This is 'the big one', which touches every file so that it all conforms
to the given standard.
2023-10-22 09:53:18 +10:00
Andrew Rogl
1ec87a3bdd pyupgrade beetsplug and tests
All tests working
More tidy up to be done
2021-08-26 19:12:51 +10:00
Adrian Sampson
5efd5b21c5 Use new as_str method
Instead of `get(six.text_type)`, which was a surprisingly large portion of our
uses of six.
2016-06-25 19:16:14 -07:00
Adrian Sampson
e16cc58cb9 Walk back some six.iter* uses
In places where it doesn't much matter whether we use an iterator or the old
Python 2 list way, using the six name just hurts legibility.
2016-06-25 18:29:55 -07:00
Johnny Robeson
edb1cbc5fc replace iter{items|values} with six.iter{items|values} 2016-06-24 05:53:55 -04:00
Johnny Robeson
e8afcbe7ec replace unicode with six.text_type 2016-06-24 05:53:49 -04:00
Adrian Sampson
e54c7eec3d Standardize __future__ imports without parentheses
Since the list is short enough now, we don't need parentheses for the line
wrap. This is a little less ugly.
2016-02-28 15:03:51 -08:00
Peter Kessen
30cf407074 Removed import of unicode_literals from plugins
* rewrite
* scrub
* smartplaylist
* spotify
* the
2016-02-20 14:31:27 +01:00
Jack Wilsdon
12cd5306b7 Update copyright dates to 2016 2015-12-30 15:42:06 +00:00
Peter Kessen
3eb8008b11 added encoding as comment in files
added line like
# -*- coding: utf-8 -*-
to all files with correct license in header
2015-11-19 18:41:01 +01:00
Adrian Sampson
cf39977fbb Fix #1393: rewrite broken for album-level fields
We now create a computed field for albums as well as items. (This plugin is
very old!)
2015-04-04 16:03:12 -07:00
Bruno Cauet
a5026100a3 All plugins use unicode_literals
Given that part of them has no test I may have broke them
2015-01-20 16:22:27 +01:00
Bruno Cauet
90b388b775 Use __future__ imports but unicode_literals everywhere
Include import of __future__ features division, absolute_imports and
print_function everywhere. Don't add unicode_literals yet for it is
harder to convert.

Goal is smoothing the transition to python 3.
2015-01-19 12:25:16 +01:00
Bruno Cauet
b27c5304d1 Merge branch 'master' into logging
Conflicts:
	beetsplug/fetchart.py
	beetsplug/mpdstats.py
2015-01-09 15:15:27 +01:00
Frederik “Freso” S. Olesen
4b1f0cbf48 Happy 2015. ;)
See 7a410f636b

Command used:

    git grep -l 'Copyright 201'|xargs sed -i -E 's/Copyright 201./Copyright 2015/'`
2015-01-08 21:37:09 +01:00
Bruno Cauet
e14a54df05 Convert multiple plugins' logger usage (easy ones)
Those plugins only called methods and no function, which eases the
conversion.
2015-01-06 21:34:13 +01:00
Bruno Cauet
b8211a3c4c Every plugin uses its own logger
logging.getLogger(__name__) everywhere!
Several loggers prefixed every log message with [logername], which we
delete here.
2015-01-06 10:35:44 +01:00
Bruno Cauet
30f158a95e Move "from beets import logging" statements
Move the import next to other beets-related imports
2015-01-05 10:05:21 +01:00
Bruno Cauet
7df8bef8b7 Update logging imports: logging → beets.logging 2015-01-04 17:02:27 +01:00
Bruno Cauet
8cac47af2a Convert beets plugins to lazy logging 2015-01-04 17:02:27 +01:00
e5e4eaeacd39c5cfba4d7c852c48277ae50331e6
66aee8094f Clean up of logging messages as described here
All logging now prefers the ' (single quote) over the " (double quote)

https://github.com/sampsyo/beets/wiki/Hacking
2014-09-09 11:28:43 +10:00
Adrian Sampson
a45ac4a9d6 enable unused import checking
The "noqa" marker is for exceptions such as these.
2014-04-13 20:48:30 -07:00
Fabrice Laporte
3ead936fe5 flake8 cleaning beetsplug/*
Remaining warnings are related to visual indentation.
2014-04-13 23:24:57 +02:00
Adrian Sampson
def635a33b rewrite: flatten Confit view to string
Previously, this would pass around a ConfigView object which would only lazily
get turned into a string. Bad!
2014-01-23 19:46:13 -08:00
Adrian Sampson
77daa542c8 fix infinite-recursion regression in rewrite
Reported by axion on IRC.
2014-01-20 11:39:33 -08:00
Adrian Sampson
887d1c1287 fix inline and rewrite for instance fields
I'm transitioning to using exclusively instance-level fields instead of
class-level fields in plugin objects, but I neglected to bring inline and
rewrite into the future. This manifested as silent inaction on the part of
these plugins.

This change restores the old behavior (for compatibility) but also updates the
plugins to use the new behavior.
2013-02-02 08:35:54 -08:00
John Hawthorn
f2b74d2019 fix RewritePlugin initialization
Error was introduced in 6d68a48
2013-01-21 12:42:55 -08:00
Adrian Sampson
7a410f636b happy new year
For future reference, this command did the trick:
ack -l 'Copyright 201' | xargs perl -pi -E 's/Copyright 201./Copyright 2013/'
2013-01-11 10:43:41 -08:00
Adrian Sampson
6d68a4855e per-plugin configuration defaults in __init__()
This uses the new BeetsPlugin.config convenience view heavily. Things are
slowly getting less verbose.
2012-12-18 22:35:44 -08:00
Adrian Sampson
3ef9e006f4 finish confit-ifying all the plugins 2012-12-13 17:14:19 -08:00
Adrian Sampson
b68e87b92c The Great Trailing Whitespace Purge of 2012
What can I say? I used to use TextMate!
2012-05-13 20:22:17 -07:00
Nicolas Dietrich
a0e133ae5d Allow unicode in rewrite items
This commit makes rewrite explicitely match items using the .lower() function
instead of using Pythons builtin re.I flag.

This is required as the re.I flag only allows for case-independent pattern
matching with ascii chars. Even worse, the pattern is stored in lowercase when
using re.I, but the value to be matched isn't lowercased.

Example:

[rewrite]
artist Сергей Васильевич Рахманинов: Sergei Rachmaninoff
2012-05-09 00:21:06 +02:00
Adrian Sampson
74f14a7aeb fix plugin errors with missing sections 2012-01-31 18:52:27 -08:00
Adrian Sampson
dbab290ba4 fix rewrite bug w/ multiple rules for a single field 2012-01-25 13:32:22 -08:00
Adrian Sampson
347a29b0f6 rewrite plugin
--HG--
rename : docs/plugins/inline.rst => docs/plugins/rewrite.rst
2012-01-16 20:48:23 -08:00