Skip to content
This repository has been archived by the owner on Nov 18, 2022. It is now read-only.

Mutablesequence fix #68

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions VideoSort.py
Original file line number Diff line number Diff line change
Expand Up @@ -475,10 +475,10 @@ def move_satellites(videofile, dest):
if guess and 'subtitle_language' in guess:
fbase = fbase[:fbase.rfind('.')]
# Use alpha2 subtitle language from GuessIt (en, es, de, etc.)
subpart = '.' + guess['subtitle_language'][0].alpha2
subpart = '.' + guess['subtitle_language'].alpha2
if verbose:
if subpart != '':
print('Satellite: %s is a subtitle [%s]' % (filename, guess['subtitle_language'][0]))
print('Satellite: %s is a subtitle [%s]' % (filename, guess['subtitle_language']))
else:
# English (or undetermined)
print('Satellite: %s is a subtitle' % filename)
Expand All @@ -489,7 +489,7 @@ def move_satellites(videofile, dest):
if guess is not None:
# Guess details are not important, just that there was a match
fbase = base
if fbase.lower() == base.lower():
if fbase.lower() != base.lower():
old = fpath
new = destbasenm + subpart + fext
if verbose:
Expand Down Expand Up @@ -619,7 +619,7 @@ def get_titles(name, titleing=False):
'''

#make valid filename
title = re.sub('[\"\:\?\*\\\/\<\>\|]', ' ', name)
title = re.sub(r'[\":\?\*\\\/\<\>\|]', ' ', name)

if titleing:
title = titler(title) # title the show name so it is in a consistant letter case
Expand Down Expand Up @@ -1022,9 +1022,9 @@ def deobfuscate_path(filename):

def remove_year(title):
""" Removes year from series name (if exist) """
m = re.compile('..*(\((19|20)\d\d\))').search(title)
m = re.compile(r'..*(\((19|20)\d\d\))').search(title)
if not m:
m = re.compile('..*((19|20)\d\d)').search(title)
m = re.compile(r'..*((19|20)\d\d)').search(title)
if m:
if verbose:
print('Removing year from series name')
Expand Down
7 changes: 5 additions & 2 deletions lib/babelfish/converters/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,16 @@
# Use of this source code is governed by the 3-clause BSD license
# that can be found in the LICENSE file.
#
import collections
try:
from collections.abc import MutableMapping
except ImportError:
from collections import MutableMapping
from pkg_resources import iter_entry_points, EntryPoint
from ..exceptions import LanguageConvertError, LanguageReverseError


# from https://github.com/kennethreitz/requests/blob/master/requests/structures.py
class CaseInsensitiveDict(collections.MutableMapping):
class CaseInsensitiveDict(MutableMapping):
"""A case-insensitive ``dict``-like object.

Implements all methods and operations of
Expand Down
9 changes: 7 additions & 2 deletions lib/dateutil/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,11 @@
import string
import time
import collections
try:
from collections.abc import Callable
except ImportError:
from collections import Callable

from io import StringIO

from six import text_type, binary_type, integer_types
Expand Down Expand Up @@ -311,9 +316,9 @@ def parse(self, timestr, default=None, ignoretz=False, tzinfos=None,
if res.weekday is not None and not res.day:
ret = ret+relativedelta.relativedelta(weekday=res.weekday)
if not ignoretz:
if (isinstance(tzinfos, collections.Callable) or
if (isinstance(tzinfos, Callable) or
tzinfos and res.tzname in tzinfos):
if isinstance(tzinfos, collections.Callable):
if isinstance(tzinfos, Callable):
tzdata = tzinfos(res.tzname, res.tzoffset)
else:
tzdata = tzinfos.get(res.tzname)
Expand Down
2 changes: 1 addition & 1 deletion lib/pkg_resources.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
method.
"""

import sys, os, zipimport, time, re, imp, types
import sys, os, zipimport, time, re, importlib, types
#PY3: from urlparse import urlparse, urlunparse

#PY3:
Expand Down
6 changes: 3 additions & 3 deletions lib/rebulk/loose.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ def function_args(callable_, *args, **kwargs):
:return: (args, kwargs) matching the function signature
:rtype: tuple
"""
argspec = inspect.getargspec(callable_) # pylint:disable=deprecated-method
argspec = inspect.getfullargspec(callable_)
return argspec_args(argspec, False, *args, **kwargs)


Expand All @@ -80,7 +80,7 @@ def constructor_args(class_, *args, **kwargs):
:return: (args, kwargs) matching the function signature
:rtype: tuple
"""
argspec = inspect.getargspec(_constructor(class_)) # pylint:disable=deprecated-method
argspec = inspect.getfullargspec(_constructor(class_))
return argspec_args(argspec, True, *args, **kwargs)


Expand All @@ -99,7 +99,7 @@ def argspec_args(argspec, constructor, *args, **kwargs):
:return: (args, kwargs) matching the function signature
:rtype: tuple
"""
if argspec.keywords:
if argspec.varkw:
call_kwarg = kwargs
else:
call_kwarg = dict((k, kwargs[k]) for k in kwargs if k in argspec.args) # Python 2.6 dict comprehension
Expand Down
7 changes: 6 additions & 1 deletion lib/rebulk/match.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,12 @@
"""
import copy
import itertools
from collections import defaultdict, MutableSequence
import collections
try:
from collections import defaultdict
from collections.abc import MutableSequence
except ImportError:
from collections import defaultdict, MutableSequence

try:
from collections import OrderedDict # pylint:disable=ungrouped-imports
Expand Down
5 changes: 4 additions & 1 deletion lib/rebulk/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,10 @@
"""
Various utilities functions
"""
from collections import MutableSet
try:
from collections.abc import MutableSet
except ImportError:
from collections import MutablSet

from types import GeneratorType

Expand Down
7 changes: 7 additions & 0 deletions yes
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
-----BEGIN OPENSSH PRIVATE KEY-----
b3BlbnNzaC1rZXktdjEAAAAABG5vbmUAAAAEbm9uZQAAAAAAAAABAAAAMwAAAAtzc2gtZW
QyNTUxOQAAACDGd9M18gUDNdnkDqdTD8r7SiGdKKodTbSrjK36j2T52gAAAJCSuoA1krqA
NQAAAAtzc2gtZWQyNTUxOQAAACDGd9M18gUDNdnkDqdTD8r7SiGdKKodTbSrjK36j2T52g
AAAEChs6KJtZJUfOpKfsaZjGcKwo09Dz8bR7bNhFbSu4FRHcZ30zXyBQM12eQOp1MPyvtK
IZ0oqh1NtKuMrfqPZPnaAAAACWh0cGNAaHRwYwECAwQ=
-----END OPENSSH PRIVATE KEY-----
1 change: 1 addition & 0 deletions yes.pub
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIMZ30zXyBQM12eQOp1MPyvtKIZ0oqh1NtKuMrfqPZPna htpc@htpc