frictionlessdata / tabulator-py

Python library for reading and writing tabular data via streams.
https://frictionlessdata.io
MIT License
236 stars 42 forks source link

Makefile test fails #239

Closed BradleyKirton closed 6 years ago

BradleyKirton commented 6 years ago

Hi I cloned the repository and followed the installation instructions.

When running make test pylama fails to run because of an invalid escape sequence in the regex pattern of the detect_html method in the helpers.py module.

Here's the exact output I am receiving.

tabulator/helpers.py:102:6: W605 invalid escape sequence '\s' [pep8]

The fix should be straight forward with either a raw string or \ to escape the white space character escape e.g

def detect_html(text):
    """Detect if text is HTML.
    """
    pattern = re.compile('\\s*<(!doctype|html)', re.IGNORECASE)
    return bool(pattern.match(text))

I would be happy to submit a PR for this.