diff options
Diffstat (limited to 'bitbake/lib/bs4/element.py')
-rw-r--r-- | bitbake/lib/bs4/element.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/bitbake/lib/bs4/element.py b/bitbake/lib/bs4/element.py index 0c30759ffc..3775a60458 100644 --- a/bitbake/lib/bs4/element.py +++ b/bitbake/lib/bs4/element.py | |||
@@ -10,7 +10,7 @@ from bs4.dammit import EntitySubstitution | |||
10 | DEFAULT_OUTPUT_ENCODING = "utf-8" | 10 | DEFAULT_OUTPUT_ENCODING = "utf-8" |
11 | PY3K = (sys.version_info[0] > 2) | 11 | PY3K = (sys.version_info[0] > 2) |
12 | 12 | ||
13 | whitespace_re = re.compile("\s+") | 13 | whitespace_re = re.compile(r"\s+") |
14 | 14 | ||
15 | def _alias(attr): | 15 | def _alias(attr): |
16 | """Alias one attribute name to another for backward compatibility""" | 16 | """Alias one attribute name to another for backward compatibility""" |
@@ -67,7 +67,7 @@ class ContentMetaAttributeValue(AttributeValueWithCharsetSubstitution): | |||
67 | The value of the 'content' attribute will be one of these objects. | 67 | The value of the 'content' attribute will be one of these objects. |
68 | """ | 68 | """ |
69 | 69 | ||
70 | CHARSET_RE = re.compile("((^|;)\s*charset=)([^;]*)", re.M) | 70 | CHARSET_RE = re.compile(r"((^|;)\s*charset=)([^;]*)", re.M) |
71 | 71 | ||
72 | def __new__(cls, original_value): | 72 | def __new__(cls, original_value): |
73 | match = cls.CHARSET_RE.search(original_value) | 73 | match = cls.CHARSET_RE.search(original_value) |
@@ -580,7 +580,7 @@ class PageElement(object): | |||
580 | 580 | ||
581 | # Methods for supporting CSS selectors. | 581 | # Methods for supporting CSS selectors. |
582 | 582 | ||
583 | tag_name_re = re.compile('^[a-zA-Z0-9][-.a-zA-Z0-9:_]*$') | 583 | tag_name_re = re.compile(r'^[a-zA-Z0-9][-.a-zA-Z0-9:_]*$') |
584 | 584 | ||
585 | # /^([a-zA-Z0-9][-.a-zA-Z0-9:_]*)\[(\w+)([=~\|\^\$\*]?)=?"?([^\]"]*)"?\]$/ | 585 | # /^([a-zA-Z0-9][-.a-zA-Z0-9:_]*)\[(\w+)([=~\|\^\$\*]?)=?"?([^\]"]*)"?\]$/ |
586 | # \---------------------------/ \---/\-------------/ \-------/ | 586 | # \---------------------------/ \---/\-------------/ \-------/ |
@@ -1364,7 +1364,7 @@ class Tag(PageElement): | |||
1364 | if tag_name == '': | 1364 | if tag_name == '': |
1365 | raise ValueError( | 1365 | raise ValueError( |
1366 | "A pseudo-class must be prefixed with a tag name.") | 1366 | "A pseudo-class must be prefixed with a tag name.") |
1367 | pseudo_attributes = re.match('([a-zA-Z\d-]+)\(([a-zA-Z\d]+)\)', pseudo) | 1367 | pseudo_attributes = re.match(r'([a-zA-Z\d-]+)\(([a-zA-Z\d]+)\)', pseudo) |
1368 | found = [] | 1368 | found = [] |
1369 | if pseudo_attributes is None: | 1369 | if pseudo_attributes is None: |
1370 | pseudo_type = pseudo | 1370 | pseudo_type = pseudo |