ScriptCollection 3.5.164__py3-none-any.whl → 3.5.165__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -36,7 +36,7 @@ from .ProgramRunnerPopen import ProgramRunnerPopen
36
36
  from .ProgramRunnerEpew import ProgramRunnerEpew, CustomEpewArgument
37
37
  from .SCLog import SCLog, LogLevel
38
38
 
39
- version = "3.5.164"
39
+ version = "3.5.165"
40
40
  __version__ = version
41
41
 
42
42
 
@@ -681,24 +681,20 @@ class TasksForCommonProjectStructure:
681
681
  filename = os.path.basename(csproj_file)
682
682
  GeneralUtilities.write_message_to_stdout(f"Check {filename}...")
683
683
  file_content = GeneralUtilities.read_text_from_file(csproj_file)
684
- regex = regex.replace("\r", GeneralUtilities.empty_string).replace("\n", "\\n")
684
+ regex_for_check = regex.replace("\r", GeneralUtilities.empty_string).replace("\n", "\\n")
685
685
  file_content = file_content.replace("\r", GeneralUtilities.empty_string)
686
- match = re.match(regex, file_content)
686
+ match = re.match(regex_for_check, file_content)
687
687
  result = match is not None
688
688
  hints = None
689
689
  if not result:
690
- hints = self.get_hints_for_csproj()
690
+ hints = self.get_hints_for_csproj(regex,file_content)
691
691
  return (result, hints)
692
692
 
693
693
  @GeneralUtilities.check_arguments
694
- def get_hints_for_csproj(self) -> list[str]:
694
+ def get_hints_for_csproj(self,regex:str,file_content:str) -> list[str]:
695
695
  result: list[str] = []
696
- with open("string.txt", "r", encoding="utf-8") as f:
697
- strings = [line.rstrip("\n") for line in f]
698
-
699
- with open("regex.txt", "r", encoding="utf-8") as f:
700
- regexes = [line.rstrip("\n") for line in f]
701
-
696
+ strings = GeneralUtilities.string_to_lines(regex)
697
+ regexes = GeneralUtilities.string_to_lines(file_content)
702
698
  amount_of_lines = len(regexes)
703
699
  if len(strings) < amount_of_lines:
704
700
  result.append("csproj-file has less lines than the regex requires.")
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: ScriptCollection
3
- Version: 3.5.164
3
+ Version: 3.5.165
4
4
  Summary: The ScriptCollection is the place for reusable scripts.
5
5
  Home-page: https://github.com/anionDev/ScriptCollection
6
6
  Author: Marius Göcke
@@ -7,11 +7,11 @@ ScriptCollection/ProgramRunnerBase.py,sha256=2kMIAqdc65UjBAddOZkzy_aFx9h5roZ5a4b
7
7
  ScriptCollection/ProgramRunnerEpew.py,sha256=4pjEd0r9Fcz3TTDv0MdTSd5KkigYXcWUVI1X43regfU,6477
8
8
  ScriptCollection/ProgramRunnerPopen.py,sha256=BPY7-ZMIlqT7JOKz8qlB5c0laF2Js-ijzqk09GxZC48,3821
9
9
  ScriptCollection/SCLog.py,sha256=rMdrEzBKQZBdObPJ9nZ5XCEXRoIFqPh8fAoiX6ZOVuw,4493
10
- ScriptCollection/ScriptCollectionCore.py,sha256=TwbQyNauisK5iRVRQt5JVDPM7xSPR1-XGv-0-BHY_3I,141742
11
- ScriptCollection/TasksForCommonProjectStructure.py,sha256=l3ZBmN60S-rJySg7rA5ShQmtAb6DbWxeJsQsypfd8Z4,251694
10
+ ScriptCollection/ScriptCollectionCore.py,sha256=CEY9Ys_e_UWuQ66a88SH5Z5JdNR2dTBFztRG5a4Aax0,141742
11
+ ScriptCollection/TasksForCommonProjectStructure.py,sha256=jLkyZq3JxUAOMedQU_t9ivCwt5ZEVdgosISgdsA4WYQ,251647
12
12
  ScriptCollection/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
13
- scriptcollection-3.5.164.dist-info/METADATA,sha256=BOZUlLK1m1PR87cMyub9vd0e78vc3qePhkpQBuY3Uec,7689
14
- scriptcollection-3.5.164.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
15
- scriptcollection-3.5.164.dist-info/entry_points.txt,sha256=EBRDrnGDURysHNyK0Z0fPCnL7uCCO_Mxc6WYJ47KxAI,4234
16
- scriptcollection-3.5.164.dist-info/top_level.txt,sha256=hY2hOVH0V0Ce51WB76zKkIWTUNwMUdHo4XDkR2vYVwg,17
17
- scriptcollection-3.5.164.dist-info/RECORD,,
13
+ scriptcollection-3.5.165.dist-info/METADATA,sha256=njrGJJRgzV5cXDHQ0o3HgkNnuFZOLVK26zC8Irn_LsQ,7689
14
+ scriptcollection-3.5.165.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
15
+ scriptcollection-3.5.165.dist-info/entry_points.txt,sha256=EBRDrnGDURysHNyK0Z0fPCnL7uCCO_Mxc6WYJ47KxAI,4234
16
+ scriptcollection-3.5.165.dist-info/top_level.txt,sha256=hY2hOVH0V0Ce51WB76zKkIWTUNwMUdHo4XDkR2vYVwg,17
17
+ scriptcollection-3.5.165.dist-info/RECORD,,