Passed
Pull Request — master (#2)
by Yang
02:12
created

Python.LORIS.helper   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 24
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 1
eloc 13
dl 0
loc 24
rs 10
c 0
b 0
f 0

1 Function

Rating   Name   Duplication   Size   Complexity  
A number_extraction() 0 8 1
1
import sys
0 ignored issues
show
Coding Style introduced by
This module should have a docstring.

The coding style of this project requires that you add a docstring to this code element. Below, you find an example for methods:

class SomeClass:
    def some_method(self):
        """Do x and return foo."""

If you would like to know more about docstrings, we recommend to read PEP-257: Docstring Conventions.

Loading history...
2
import os
0 ignored issues
show
Unused Code introduced by
The import os seems to be unused.
Loading history...
3
import json
0 ignored issues
show
Unused Code introduced by
The import json seems to be unused.
Loading history...
4
import argparse
0 ignored issues
show
Unused Code introduced by
The import argparse seems to be unused.
Loading history...
5
import getpass
0 ignored issues
show
Unused Code introduced by
The import getpass seems to be unused.
Loading history...
6
import logging
7
8
9
logging.basicConfig(stream=sys.stdout, level=logging.INFO)
10
#logger = logging.getLogger('LORISQuery')
11
12
13
def number_extraction(string):
14
    """
15
    Return
16
    :param string:
17
    :return: a LIST of strings of number!
18
    """
19
    import re
20
    return re.findall(r'\d+', string)
21
22
if __name__ == '__main__':
23
    print(number_extraction("T4"))
24
0 ignored issues
show
coding-style introduced by
Trailing newlines
Loading history...
25