Skip to content
Merged
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
2 changes: 1 addition & 1 deletion pcapkit/vendor/default.py
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,7 @@ def process(self, data: 'list[str]') -> 'tuple[list[str], list[str]]':
temp.append(f'[{rfc}]'.replace('_', ' '))
desc = self.wrap_comment(re.sub(r'\r*\n', ' ', '%s %s' % ( # pylint: disable=consider-using-f-string
name, ''.join(temp) if rfcs else '',
), re.MULTILINE))
), flags=re.MULTILINE))

try:
code, _ = item[0], int(item[0])
Expand Down
2 changes: 1 addition & 1 deletion pcapkit/vendor/hip/eddsa_curve.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ def process(self, data: 'list[str]') -> 'tuple[list[str], list[str]]':
temp.append(f'[{rfc}]'.replace('_', ' '))
desc = self.wrap_comment(re.sub(r'\r*\n', ' ', '%s %s' % ( # pylint: disable=consider-using-f-string
name, ''.join(temp) if rfcs else '',
), re.MULTILINE))
), flags=re.MULTILINE))

try:
code, _ = item[2], int(item[2])
Expand Down
2 changes: 1 addition & 1 deletion pcapkit/vendor/http/frame.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ def process(self, data: 'list[str]') -> 'tuple[list[str], list[str]]':
temp.append(f'[{rfc}]'.replace('_', ' '))
desc = self.wrap_comment(re.sub(r'\r*\n', ' ', '``%s`` %s' % ( # pylint: disable=consider-using-f-string
name, ''.join(temp) if rfcs else '',
), re.MULTILINE))
), flags=re.MULTILINE))

try:
tmp1 = int(item[0], base=16)
Expand Down
2 changes: 1 addition & 1 deletion pcapkit/vendor/http/method.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ def process(self, data: 'list[str]') -> 'list[str]': # type: ignore[override]
temp.append(f'[{rfc}]'.replace('_', ' '))
desc = self.wrap_comment(re.sub(r'\r*\n', ' ', '%s %s' % ( # pylint: disable=consider-using-f-string
meth, ''.join(temp) if rfcs else '',
), re.MULTILINE))
), flags=re.MULTILINE))

name = self.safe_name(meth).upper()
safe_flag = 'True' if safe == 'yes' else 'False'
Expand Down
2 changes: 1 addition & 1 deletion pcapkit/vendor/http/status_code.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ def process(self, data: 'list[str]') -> 'tuple[list[str], list[str]]':
temp.append(f'[{rfc}]'.replace('_', ' '))
desc = self.wrap_comment(re.sub(r'\r*\n', ' ', '%s %s' % ( # pylint: disable=consider-using-f-string
name, ''.join(temp) if rfcs else '',
), re.MULTILINE))
), flags=re.MULTILINE))

try:
code, _ = item[0], int(item[0])
Expand Down
2 changes: 1 addition & 1 deletion pcapkit/vendor/ipv4/router_alert.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ def process(self, data: 'list[str]') -> 'tuple[list[str], list[str]]':
temp.append(f'[{rfc}]'.replace('_', ' '))
desc = self.wrap_comment(re.sub(r'\r*\n', ' ', '%s %s' % ( # pylint: disable=consider-using-f-string
name, ''.join(temp) if rfcs else '',
), re.MULTILINE))
), flags=re.MULTILINE))

try:
code, _ = item[0], int(item[0])
Expand Down
2 changes: 1 addition & 1 deletion pcapkit/vendor/ipv6/option.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ def process(self, data: 'list[str]') -> 'tuple[list[str], list[str]]':
if re.fullmatch(r'[0-9a-zA-Z]+', name) is None or name.upper() == 'DEPRECATED':
name = re.sub(r'(.*) \(.*\)', r'\1', splt)

desc = self.wrap_comment(re.sub(r'\r*\n', ' ', f'{splt}{tmp1}', re.MULTILINE))
desc = self.wrap_comment(re.sub(r'\r*\n', ' ', f'{splt}{tmp1}', flags=re.MULTILINE))
renm = self.rename(name or 'Unassigned', code, original=dscp)

pres = f"{renm} = {code}"
Expand Down
2 changes: 1 addition & 1 deletion pcapkit/vendor/ipv6/router_alert.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ def process(self, data: 'list[str]') -> 'tuple[list[str], list[str]]':
temp.append(f'[{rfc}]'.replace('_', ' '))
desc = self.wrap_comment(re.sub(r'\r*\n', ' ', '%s %s' % ( # pylint: disable=consider-using-f-string
name, ''.join(temp) if rfcs else '',
), re.MULTILINE))
), flags=re.MULTILINE))

try:
code, _ = item[0], int(item[0])
Expand Down
2 changes: 1 addition & 1 deletion pcapkit/vendor/ipv6/tagger_id.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ def process(self, data: 'list[str]') -> 'tuple[list[str], list[str]]':
temp.append(f'[{rfc}]'.replace('_', ' '))
desc = self.wrap_comment(re.sub(r'\r*\n', ' ', '%s %s' % ( # pylint: disable=consider-using-f-string
name, ''.join(temp) if rfcs else '',
), re.MULTILINE))
), flags=re.MULTILINE))

try:
code, _ = item[0], int(item[0])
Expand Down
2 changes: 1 addition & 1 deletion pcapkit/vendor/reg/ethertype.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ def process(self, data: 'list[str]') -> 'tuple[list[str], list[str]]':
else:
temp.append(f'[{rfc}]'.replace('_', ' '))
tmp1 = re.sub(r'( )( )*', ' ', f"{''.join(temp)}".replace('\n', ' ')) if rfcs else ''
tmp2 = re.sub(r'\r*\n', ' ', tmp1, re.MULTILINE)
tmp2 = re.sub(r'\r*\n', ' ', tmp1, flags=re.MULTILINE)
tmp3 = name.replace('\n', ' ')
desc = self.wrap_comment(f"{tmp3} {tmp2}")

Expand Down
2 changes: 1 addition & 1 deletion pcapkit/vendor/tcp/flags.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ def process(self, data: 'list[str]') -> 'list[str]': # type: ignore[override]
else:
temp.append(f'[{rfc}]'.replace('_', ' '))
tmp1 = f" {''.join(temp)}" if rfcs else ''
desc = self.wrap_comment(re.sub(r'\r*\n', ' ', f'{dscp}{tmp1}', re.MULTILINE))
desc = self.wrap_comment(re.sub(r'\r*\n', ' ', f'{dscp}{tmp1}', flags=re.MULTILINE))

code = item[0]
name = DATA.get(int(code), dscp.split(' (')[0]).replace('Reserved for future use', 'Reserved')
Expand Down
2 changes: 1 addition & 1 deletion pcapkit/vendor/tcp/mp_tcp_option.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ def process(self, data: 'list[str]') -> 'tuple[list[str], list[str]]':
else:
temp.append(f'[{rfc}]'.replace('_', ' '))
tmp1 = f" {''.join(temp)}" if rfcs else ''
desc = self.wrap_comment(re.sub(r'\r*\n', ' ', f'{dscp}{tmp1}', re.MULTILINE))
desc = self.wrap_comment(re.sub(r'\r*\n', ' ', f'{dscp}{tmp1}', flags=re.MULTILINE))

name = item[1]
try:
Expand Down
2 changes: 1 addition & 1 deletion pcapkit/vendor/tcp/option.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ def process(self, data: 'list[str]') -> 'tuple[list[str], list[str]]':
temp.append(f'[{rfc}]'.replace('_', ' '))
tmp1 = f" {''.join(temp)}" if rfcs else ''
desc = self.wrap_comment(re.sub(r'(\[(\*+)\])|(\[(\d+)\])', r'',
re.sub(r'\r*\n', ' ', f'{dscp}{tmp1}', re.MULTILINE)))
re.sub(r'\r*\n', ' ', f'{dscp}{tmp1}', flags=re.MULTILINE)))

name = dscp.split(' (')[0]
try:
Expand Down
Loading
Loading