commit: c829c1685e3c6002e52dbd4348de8a6495313d56 Author: David Roman <davidroman96 <AT> gmail <DOT> com> AuthorDate: Mon Sep 1 09:18:54 2025 +0000 Commit: David Roman <davidroman96 <AT> gmail <DOT> com> CommitDate: Mon Sep 1 09:18:54 2025 +0000 URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=c829c168
app-text/lizard/files: remove unused patches Signed-off-by: David Roman <davidroman96 <AT> gmail.com> app-text/lizard/files/lizard-1.17.10-py3.11.patch | 60 ----------------------- app-text/lizard/files/lizard-1.17.10-py3.12.patch | 45 ----------------- 2 files changed, 105 deletions(-) diff --git a/app-text/lizard/files/lizard-1.17.10-py3.11.patch b/app-text/lizard/files/lizard-1.17.10-py3.11.patch deleted file mode 100644 index d17b9511db..0000000000 --- a/app-text/lizard/files/lizard-1.17.10-py3.11.patch +++ /dev/null @@ -1,60 +0,0 @@ -commit fc8a14e84acd8a4baa2d98bdec4e7ac18ed137a5 -Author: Mazunki Hoksaas <[email protected]> -Date: Thu Jul 27 15:04:16 2023 +0200 - - add support for python3.11 re module - -diff --git a/lizard_languages/code_reader.py b/lizard_languages/code_reader.py -index 1eb95d5..9e12658 100644 ---- a/lizard_languages/code_reader.py -+++ b/lizard_languages/code_reader.py -@@ -4,6 +4,8 @@ Base class for all language parsers - - import re - from copy import copy -+from functools import reduce -+from operator import or_ - - - class CodeStateMachine(object): -@@ -112,7 +114,7 @@ class CodeReader: - if not token_class: - token_class = create_token - -- def _generate_tokens(source, add): -+ def _generate_tokens(source, add, flags=re.NOFLAG): - # DO NOT put any sub groups in the regex. Good for performance - _until_end = r"(?:\\\n|[^\n])*" - combined_symbols = ["<<=", ">>=", "||", "&&", "===", "!==", -@@ -136,7 +138,7 @@ class CodeReader: - r"|\\\n" + - r"|\n" + - r"|[^\S\n]+" + -- r"|.)", re.M | re.S) -+ r"|.)", re.M | re.S | flags) - macro = "" - for match in token_pattern.finditer(source): - token = token_class(match) -@@ -154,7 +156,21 @@ class CodeReader: - if macro: - yield macro - -- return _generate_tokens(source_code, addition) -+ flag_dict = { -+ 'a': re.A, # ASCII-only matching -+ 'i': re.I, # Ignore case -+ 'L': re.L, # Locale dependent -+ 'm': re.M, # Multi-line -+ 's': re.S, # Dot matches all -+ 'u': re.U, # Unicode matching -+ 'x': re.X # Verbose -+ } -+ -+ pattern = re.compile(r'\(\?[aiLmsux]+\)') -+ re_flags = ''.join(opt[2:-1] for opt in pattern.findall(addition)) -+ flags = reduce(or_, (flag_dict[flag] for flag in re_flags), re.NOFLAG) -+ -+ return _generate_tokens(source_code, pattern.sub('', addition), flags=flags) - - def __call__(self, tokens, reader): - self.context = reader.context diff --git a/app-text/lizard/files/lizard-1.17.10-py3.12.patch b/app-text/lizard/files/lizard-1.17.10-py3.12.patch deleted file mode 100644 index f150f74f8e..0000000000 --- a/app-text/lizard/files/lizard-1.17.10-py3.12.patch +++ /dev/null @@ -1,45 +0,0 @@ -From f44f7969c592ecbc1752827cb27dd44e79e1e75e Mon Sep 17 00:00:00 2001 -From: David Roman <[email protected]> -Date: Thu, 27 Jul 2023 15:07:51 +0200 -Subject: [PATCH] replace deprecated assertRegexpMatches -> assertRegex - -Close: #374 ---- - test/testOutputCSV.py | 4 ++-- - test/testOutputHTML.py | 3 +-- - 2 files changed, 3 insertions(+), 4 deletions(-) - -diff --git a/test/testOutputCSV.py b/test/testOutputCSV.py -index 78cb221..4d10217 100644 ---- a/test/testOutputCSV.py -+++ b/test/testOutputCSV.py -@@ -22,7 +22,7 @@ def test_csv_header(self): - options_mock.verbose = True - options_mock.extensions = [] - csv_output(AllResult([self.fileSummary]), options_mock) -- self.assertRegexpMatches(sys.stdout.stream, -+ self.assertRegex(sys.stdout.stream, - r"NLOC,CCN,token,PARAM,length,location,file,function,long_name,start,end") - - def test_csv_header_with_extension(self): -@@ -35,7 +35,7 @@ def test_csv_header_with_extension(self): - results = AllResult([self.fileSummary]) - results.result[0].function_list[0].exit_count = 1 - csv_output(results, options_mock) -- self.assertRegexpMatches(sys.stdout.stream, -+ self.assertRegex(sys.stdout.stream, - r"NLOC,CCN,token,PARAM,length,location,file,function,long_name,start,end,exits") - - def test_csv_no_header(self): -diff --git a/test/testOutputHTML.py b/test/testOutputHTML.py -index f91156b..81965fc 100644 ---- a/test/testOutputHTML.py -+++ b/test/testOutputHTML.py -@@ -17,6 +17,5 @@ def setUp(self): - - def test_should_have_html_body(self): - html_output([self.fileSummary], self.option, None, AllResult) -- self.assertRegexpMatches(sys.stdout.stream, -- r"\<html\>") -+ self.assertRegex(sys.stdout.stream, r"\<html\>") -
