okfn-brasil/serenata-de-amor

View on GitHub
research/src/get_family_names.py

Summary

Maintainability
A
0 mins
Test Coverage

Invalid escape sequence '\d'
Open

    date_regex = re.compile('\d{4}-\d{2}-\d{2}')
Severity: Minor
Found in research/src/get_family_names.py by pep8

Invalid escape sequences are deprecated in Python 3.6.

Okay: regex = r'\.png$'
W605: regex = '\.png$'

Invalid escape sequence '\d'
Open

    date_regex = re.compile('\d{4}-\d{2}-\d{2}')
Severity: Minor
Found in research/src/get_family_names.py by pep8

Invalid escape sequences are deprecated in Python 3.6.

Okay: regex = r'\.png$'
W605: regex = '\.png$'

Invalid escape sequence '\d'
Open

    date_regex = re.compile('\d{4}-\d{2}-\d{2}')
Severity: Minor
Found in research/src/get_family_names.py by pep8

Invalid escape sequences are deprecated in Python 3.6.

Okay: regex = r'\.png$'
W605: regex = '\.png$'

Ambiguous variable name 'l'
Open

    dates = sorted(set([l[0] for l in matches if l]), reverse=True)
Severity: Minor
Found in research/src/get_family_names.py by pep8

Never use the characters 'l', 'O', or 'I' as variable names.

In some fonts, these characters are indistinguishable from the
numerals one and zero. When tempted to use 'l', use 'L' instead.

Okay: L = 0
Okay: o = 123
Okay: i = 42
E741: l = 0
E741: O = 123
E741: I = 42

Variables can be bound in several other contexts, including class
and function definitions, 'global' and 'nonlocal' statements,
exception handlers, and 'with' and 'for' statements.
In addition, we have a special handling for function parameters.

Okay: except AttributeError as o:
Okay: with lock as L:
Okay: foo(l=12)
Okay: for a in foo(l=12):
E741: except AttributeError as O:
E741: with lock as l:
E741: global I
E741: nonlocal l
E741: def foo(l):
E741: def foo(l=12):
E741: l = foo(l=12)
E741: for l in range(10):
E742: class I(object):
E743: def l(x):

There are no issues that match your filters.

Category
Status