Commit graph

30 commits

Author SHA1 Message Date
Andrew Rogl
ee4268dabb Remove unused imports
Fix imports
Fix formatting
2021-08-26 20:59:48 +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
bac8faad78 Resolve W605: invalid escape sequence
This came up in lots of regexes that weren't using "raw" literals.
2018-08-13 10:41:01 -04:00
Johnny Robeson
31cca684f2 replace itertools.izip with zip from six.moves 2016-06-23 04:40:18 -04:00
Johnny Robeson
a02a1f0201 cast year ints to str, not bytes in bucket plugin
This seems to work equally well in py2/3
2016-06-15 03:34:03 -04:00
Jack Wilsdon
b1c58e99ec Update code to match pep8 naming standards 2016-04-27 20:15:10 +01: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
40900aa1cb Removed unicode_literals from plugins
* bucket
* chroma
* convert
* discogs
2016-02-20 12:10:01 +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
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
02d8e88ef1 Replace all mentions of 'str' with 'bytes' 2015-01-20 12:48:15 +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
0617c0410f Remove log declarations where it was unused
Easiest conversions!
2015-01-06 21:34:12 +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
Adrian Sampson
434280f248 A couple of coverage tweaks 2014-10-11 22:05:22 -07:00
Alexander Elbs
77d303b673 A few artists use three digits, e.g. 112 or 209. They are detected as a
year instead of an artist. Improve the heuristic by only allowing four
digits to be a year.
2014-06-30 20:55:28 +02:00
Alexander Elbs
9ca816f247 the bucket plugin transforms a pattern like 'A - D' into something that
matches all letters starting with A to D (upper and lower case). This
change allows to put more artists into that bucket. E.g. artists
starting with ä or Ä and 0 to 9 and … (three dots)

Example config for overriding a bucket pattern:

  bucket:
     bucket_alpha: ['A - D', 'E - L', 'M - R', 'S - Z']
     bucket_alpha_regex:
       'A - D': ^[0-9a-dA-D…äÄ]
2014-06-30 20:55:28 +02:00
Adrian Sampson
7310f6e945 Documentation tweaks for bucket (#747) 2014-05-10 17:14:35 -07:00
Fabrice Laporte
02f7e78fd3 fix flake8 warnings 2014-05-10 10:57:44 +02:00
Fabrice Laporte
21feab7ab1 add tests to check bad buckets definitions
message is now printed to the user when buckets declared in the config
file cannot be parsed
2014-05-10 10:55:38 +02:00
Fabrice Laporte
0d5050bdce fix handling of digits chars in alpha buckets
Characters were search in string.ascii_lowercase that does not contain
digits chars.
2014-05-08 16:13:17 +02:00
Fabrice Laporte
4add189608 Add option to extrapolate year buckets names
- spans are now tracked via a list of dicts instead of 2 lists
previously (simpler code)
- extend_year_spans() pregenerates all possible ranges at plugin setup
stage
- a BucketError is now raised if declared bucket format not accepted
2014-05-08 01:28:17 +02:00
Fabrice Laporte
509af59d4e cleanup docstrings and add tests 2014-05-04 08:51:11 +02:00
Fabrice Laporte
31569baba7 fix range upper bound + tests added 2014-05-03 23:46:31 +02:00
Fabrice Laporte
581bf768ca add buckets plugin + tests
Add a new template functions %bucket(text, field) for path formatting.
2014-05-03 13:55:21 +02:00