Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
55 commits
Select commit Hold shift + click to select a range
15dca07
... is dict
dmitry-lipetsk Feb 23, 2026
b15fb54
... is str
dmitry-lipetsk Feb 23, 2026
4963c2f
... is int
dmitry-lipetsk Feb 23, 2026
e72224c
... is set
dmitry-lipetsk Feb 23, 2026
843b071
... is int
dmitry-lipetsk Feb 23, 2026
9a0abcb
... is bool
dmitry-lipetsk Feb 23, 2026
688c3c2
... is list
dmitry-lipetsk Feb 23, 2026
8dedc3f
... is PgCfgModel__FileLineData
dmitry-lipetsk Feb 23, 2026
25fb59c
... is type
dmitry-lipetsk Feb 23, 2026
c77f38d
... is PgCfgModel__FileData
dmitry-lipetsk Feb 23, 2026
dc1212d
... is PgCfgModel__IncludeData
dmitry-lipetsk Feb 23, 2026
e8dd6ff
... is PgCfgModel__ConfigurationData
dmitry-lipetsk Feb 23, 2026
2739fed
... is PgCfgModel__OptionData
dmitry-lipetsk Feb 23, 2026
11f8474
... is FileData
dmitry-lipetsk Feb 23, 2026
8f8eae7
... is FileLineData
dmitry-lipetsk Feb 23, 2026
0b3e75a
... is OptionData
dmitry-lipetsk Feb 23, 2026
bbbc96f
... is OptionHandlerCtxToGetValue
dmitry-lipetsk Feb 23, 2026
b0f1278
... is ConfigurationData
dmitry-lipetsk Feb 23, 2026
d9e4541
... is OptionHandlerCtxToSetValue
dmitry-lipetsk Feb 23, 2026
af6800b
... is tagCtx
dmitry-lipetsk Feb 23, 2026
79161f0
... is datetime.datetime
dmitry-lipetsk Feb 23, 2026
8a1610d
... is OptionHandlerCtxToWrite
dmitry-lipetsk Feb 23, 2026
94f402e
... is not str
dmitry-lipetsk Feb 23, 2026
376fcf1
(E721) mix
dmitry-lipetsk Feb 23, 2026
89d9e3b
... is tuple
dmitry-lipetsk Feb 23, 2026
314e267
... is PgCfg_Option_Base
dmitry-lipetsk Feb 23, 2026
b817143
... is OptionHandlerCtxToPrepareSetValue
dmitry-lipetsk Feb 23, 2026
3d8f1c2
... is PgCfgModel__CommentData
dmitry-lipetsk Feb 23, 2026
4572501
... is PostgresConfigurationOption_Base
dmitry-lipetsk Feb 23, 2026
00a6be7
... is PostgresConfigurationSetOptionValueResult_Base
dmitry-lipetsk Feb 23, 2026
247a859
... is OptionHandlerCtxToPrepareGetValue
dmitry-lipetsk Feb 23, 2026
d0fa763
... is PostgresConfigurationFileLine_Base
dmitry-lipetsk Feb 23, 2026
067c849
... is PgCfg_TopLevelFile_Base
dmitry-lipetsk Feb 23, 2026
9ba9f23
... is OptionHandlerCtxToPrepareSetValueItem
dmitry-lipetsk Feb 23, 2026
705edae
... is PgCfgModel__FileLineData.tagItem
dmitry-lipetsk Feb 23, 2026
b86142a
... is PostgresConfigurationComment_Base
dmitry-lipetsk Feb 23, 2026
a293168
... is PostgresConfigurationFileLines_Base
dmitry-lipetsk Feb 23, 2026
d89f3dd
... is PgCfg_SetOptionResult_Base
dmitry-lipetsk Feb 23, 2026
171238a
... is PostgresConfigurationWriterCtx_Base
dmitry-lipetsk Feb 23, 2026
3c6b8e3
(E721) mix
dmitry-lipetsk Feb 23, 2026
0b8a51e
... is ReadUtils__LineReader
dmitry-lipetsk Feb 23, 2026
d4c32d0
... is __class__.tagOptionHandlers
dmitry-lipetsk Feb 23, 2026
f502934
... is PgCfg_FileLines_Base
dmitry-lipetsk Feb 23, 2026
99fe8fd
(E721) mix
dmitry-lipetsk Feb 23, 2026
d0537e5
... is PgCfg_FileLine_Base
dmitry-lipetsk Feb 23, 2026
e62aa68
... is PgCfg_TopLevelFile_Base
dmitry-lipetsk Feb 23, 2026
e136d3a
... is PgCfg_Base__AllOptions
dmitry-lipetsk Feb 23, 2026
05a17e0
... is PgCfg_FileLinesIterator_Base
dmitry-lipetsk Feb 23, 2026
2e5c636
... is PgCfg_Comment_Base
dmitry-lipetsk Feb 23, 2026
316993b
... is PgCfg_Include_Base
dmitry-lipetsk Feb 23, 2026
b120e72
... is PgCfg_Base__AllFiles
dmitry-lipetsk Feb 23, 2026
1e45de0
... is PgCfg_SetOptionEventID
dmitry-lipetsk Feb 23, 2026
0cc6b30
(E721) mix
dmitry-lipetsk Feb 23, 2026
250282b
black
dmitry-lipetsk Feb 23, 2026
3b9879a
A problem with py3.7 is fixed
dmitry-lipetsk Feb 23, 2026
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
38 changes: 19 additions & 19 deletions src/abstract/v00/configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ def get_Text(self) -> str:

# --------------------------------------------------------------------
def Delete(self, withLineIfLast: bool):
assert type(withLineIfLast) == bool # noqa: E721
assert type(withLineIfLast) is bool
RaiseError.MethodIsNotImplemented(__class__, "Delete")


Expand Down Expand Up @@ -162,7 +162,7 @@ def get_File(self) -> PostgresConfigurationFile:

# --------------------------------------------------------------------
def Delete(self, withLine: bool):
assert type(withLine) == bool # noqa: E721
assert type(withLine) is bool
RaiseError.MethodIsNotImplemented(__class__, "Delete")


Expand All @@ -182,27 +182,27 @@ def __len__(self) -> int:
def AddComment(
self, text: str, offset: typing.Optional[int]
) -> PostgresConfigurationComment:
assert type(text) == str # noqa: E721
assert (offset is None) or (type(offset) == int) # noqa: E721
assert type(text) is str
assert (offset is None) or (type(offset) is int)
RaiseError.MethodIsNotImplemented(__class__, "AddComment")

# --------------------------------------------------------------------
def AddOption(
self, name: str, value: any, offset: typing.Optional[int]
) -> PostgresConfigurationOption:
assert type(name) == str # noqa: E721
assert type(name) is str
assert name != ""
assert value is not None
assert (offset is None) or (type(offset) == int) # noqa: E721
assert (offset is None) or (type(offset) is int)
RaiseError.MethodIsNotImplemented(__class__, "AddOption")

# --------------------------------------------------------------------
def AddInclude(
self, path: str, offset: typing.Optional[int]
) -> PostgresConfigurationInclude:
assert type(path) == str # noqa: E721
assert type(path) is str
assert path != ""
assert (offset is None) or (type(offset) == int) # noqa: E721
assert (offset is None) or (type(offset) is int)
RaiseError.MethodIsNotImplemented(__class__, "AddInclude")

# --------------------------------------------------------------------
Expand Down Expand Up @@ -271,19 +271,19 @@ def AddEmptyLine(self) -> PostgresConfigurationFileLine:

# --------------------------------------------------------------------
def AddComment(self, text: str) -> PostgresConfigurationComment:
assert type(text) == str # noqa: E721
assert type(text) is str
RaiseError.MethodIsNotImplemented(__class__, "AddComment")

# --------------------------------------------------------------------
def AddOption(self, name: str, value: any) -> PostgresConfigurationOption:
assert type(name) == str # noqa: E721
assert type(name) is str
assert name != ""
assert value is not None
RaiseError.MethodIsNotImplemented(__class__, "AddOption")

# --------------------------------------------------------------------
def AddInclude(self, path: str) -> PostgresConfigurationInclude:
assert type(path) == str # noqa: E721
assert type(path) is str
assert path != ""
RaiseError.MethodIsNotImplemented(__class__, "AddInclude")

Expand All @@ -301,7 +301,7 @@ def AddInclude(self, path: str) -> PostgresConfigurationInclude:
def SetOptionValue(
self, name: str, value: any
) -> PostgresConfigurationSetOptionValueResult:
assert type(name) == str # noqa: E721
assert type(name) is str
assert name != ""
RaiseError.MethodIsNotImplemented(__class__, "SetOptionValue")

Expand All @@ -314,14 +314,14 @@ def SetOptionValue(
# - None if option is not found in this file.
#
def GetOptionValue(self, name: str) -> any:
assert type(name) == str # noqa: E721
assert type(name) is str
RaiseError.MethodIsNotImplemented(__class__, "GetOptionValue")

# --------------------------------------------------------------------
def SetOptionValueItem(
self, name: str, value_item: any
) -> PostgresConfigurationSetOptionValueResult:
assert type(name) == str # noqa: E721
assert type(name) is str
assert name != ""
assert value_item is not None
RaiseError.MethodIsNotImplemented(__class__, "SetOptionValueItem")
Expand Down Expand Up @@ -375,13 +375,13 @@ def __init__(self):

# interface ----------------------------------------------------------
def AddTopLevelFile(self, path: str) -> PostgresConfigurationFile:
assert type(path) == str # noqa: E721
assert type(path) is str
assert path != ""
RaiseError.MethodIsNotImplemented(__class__, "AddTopLevelFile")

# --------------------------------------------------------------------
def AddOption(self, name: str, value: any) -> PostgresConfigurationOption:
assert type(name) == str # noqa: E721
assert type(name) is str
assert name != ""
assert value is not None
RaiseError.MethodIsNotImplemented(__class__, "AddOption")
Expand All @@ -400,7 +400,7 @@ def AddOption(self, name: str, value: any) -> PostgresConfigurationOption:
def SetOptionValue(
self, name: str, value: any
) -> PostgresConfigurationSetOptionValueResult:
assert type(name) == str # noqa: E721
assert type(name) is str
RaiseError.MethodIsNotImplemented(__class__, "SetOptionValue")

# --------------------------------------------------------------------
Expand All @@ -412,14 +412,14 @@ def SetOptionValue(
# - None if option is not found.
#
def GetOptionValue(self, name: str) -> any:
assert type(name) == str # noqa: E721
assert type(name) is str
RaiseError.MethodIsNotImplemented(__class__, "GetOptionValue")

# --------------------------------------------------------------------
def SetOptionValueItem(
self, name: str, value_item: any
) -> PostgresConfigurationSetOptionValueResult:
assert type(name) == str # noqa: E721
assert type(name) is str
assert value_item is not None
RaiseError.MethodIsNotImplemented(__class__, "SetOptionValueItem")

Expand Down
54 changes: 27 additions & 27 deletions src/core/bugcheck_error.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@
class BugCheckError:
def UnkObjectDataType(objectType: type):
assert objectType is not None
assert type(objectType) == type # noqa: E721
assert type(objectType) is type

errMsg = "[BUG CHECK] Unknown object data type [{0}].".format(objectType)
raise Exception(errMsg)

# --------------------------------------------------------------------
def MultipleDefOfOptionIsFound(optName: str, count: int):
assert type(optName) == str # noqa: E721
assert type(count) == int # noqa: E721
assert type(optName) is str
assert type(count) is int

errMsg = (
"[BUG CHECK] Multiple definitition of option [{0}] is found - {1}.".format(
Expand All @@ -28,8 +28,8 @@ def MultipleDefOfOptionIsFound(optName: str, count: int):

# --------------------------------------------------------------------
def UnkOptObjectDataType(optName: str, optDataType: type):
assert type(optName) == str # noqa: E721
assert type(optDataType) == type # noqa: E721
assert type(optName) is str
assert type(optDataType) is type

errMsg = (
"[BUG CHECK] Unknown type of the option object data [{0}] - {1}.".format(
Expand All @@ -40,8 +40,8 @@ def UnkOptObjectDataType(optName: str, optDataType: type):

# --------------------------------------------------------------------
def MultipleDefOfFileIsFound(fileName: str, count: int):
assert type(fileName) == str # noqa: E721
assert type(count) == int # noqa: E721
assert type(fileName) is str
assert type(count) is int

errMsg = (
"[BUG CHECK] Multiple definitition of file [{0}] is found - {1}.".format(
Expand All @@ -52,8 +52,8 @@ def MultipleDefOfFileIsFound(fileName: str, count: int):

# --------------------------------------------------------------------
def UnkFileObjectDataType(fileName: str, fileDataType: type):
assert type(fileName) == str # noqa: E721
assert type(fileDataType) == type # noqa: E721
assert type(fileName) is str
assert type(fileDataType) is type

errMsg = "[BUG CHECK] Unknown type of the file object data [{0}] - {1}.".format(
fileName, fileDataType.__name__
Expand All @@ -62,7 +62,7 @@ def UnkFileObjectDataType(fileName: str, fileDataType: type):

# --------------------------------------------------------------------
def UnkFileDataStatus(filePath: str, fileStatus: any):
assert type(filePath) == str # noqa: E721
assert type(filePath) is str
assert fileStatus is not None

errMsg = "[BUG CHECK] Unknown file data status [{0}] - {1}.".format(
Expand All @@ -72,8 +72,8 @@ def UnkFileDataStatus(filePath: str, fileStatus: any):

# --------------------------------------------------------------------
def FileIsNotFoundInIndex(fileKey: str, filePath: str):
assert type(fileKey) == str # noqa: E721
assert type(filePath) == str # noqa: E721
assert type(fileKey) is str
assert type(filePath) is str

errMsg = "[BUG CHECK] File [{0}][{1}] is not found in index.".format(
fileKey, filePath
Expand All @@ -82,14 +82,14 @@ def FileIsNotFoundInIndex(fileKey: str, filePath: str):

# --------------------------------------------------------------------
def OptionIsNotFoundInIndex(optName: str):
assert type(optName) == str # noqa: E721
assert type(optName) is str

errMsg = "[BUG CHECK] Option [{0}] is not found in index.".format(optName)
raise Exception(errMsg)

# --------------------------------------------------------------------
def OptionIsNotFoundInFileLine(optName: str):
assert type(optName) == str # noqa: E721
assert type(optName) is str

errMsg = "[BUG CHECK] Option [{0}] is not found in file line.".format(optName)
raise Exception(errMsg)
Expand All @@ -111,7 +111,7 @@ def FileLineIsNotFoundInFile():

# --------------------------------------------------------------------
def OptionHandlerToPrepareSetValueIsNotDefined(name: str):
assert type(name) == str # noqa: E721
assert type(name) is str

errMsg = "[BUG CHECK] OptionHandlerToPrepareSetValue for [{0}] is not defined.".format(
name
Expand All @@ -120,7 +120,7 @@ def OptionHandlerToPrepareSetValueIsNotDefined(name: str):

# --------------------------------------------------------------------
def OptionHandlerToPrepareGetValueIsNotDefined(name: str):
assert type(name) == str # noqa: E721
assert type(name) is str

errMsg = "[BUG CHECK] OptionHandlerToPrepareGetValue for [{0}] is not defined.".format(
name
Expand All @@ -129,7 +129,7 @@ def OptionHandlerToPrepareGetValueIsNotDefined(name: str):

# --------------------------------------------------------------------
def OptionHandlerToPrepareSetValueItemIsNotDefined(name: str):
assert type(name) == str # noqa: E721
assert type(name) is str

errMsg = "[BUG CHECK] OptionHandlerToPrepareSetValueItem for [{0}] is not defined.".format(
name
Expand All @@ -138,7 +138,7 @@ def OptionHandlerToPrepareSetValueItemIsNotDefined(name: str):

# --------------------------------------------------------------------
def OptionHandlerToSetValueIsNotDefined(name: str):
assert type(name) == str # noqa: E721
assert type(name) is str

errMsg = "[BUG CHECK] OptionHandlerToSetValue for [{0}] is not defined.".format(
name
Expand All @@ -147,7 +147,7 @@ def OptionHandlerToSetValueIsNotDefined(name: str):

# --------------------------------------------------------------------
def OptionHandlerToGetValueIsNotDefined(name: str):
assert type(name) == str # noqa: E721
assert type(name) is str

errMsg = "[BUG CHECK] OptionHandlerToGetValue for [{0}] is not defined.".format(
name
Expand All @@ -156,7 +156,7 @@ def OptionHandlerToGetValueIsNotDefined(name: str):

# --------------------------------------------------------------------
def OptionHandlerToAddOptionIsNotDefined(name: str):
assert type(name) == str # noqa: E721
assert type(name) is str

errMsg = (
"[BUG CHECK] OptionHandlerToAddOption for [{0}] is not defined.".format(
Expand All @@ -167,7 +167,7 @@ def OptionHandlerToAddOptionIsNotDefined(name: str):

# --------------------------------------------------------------------
def OptionHandlerToSetValueItemIsNotDefined(name: str):
assert type(name) == str # noqa: E721
assert type(name) is str

errMsg = (
"[BUG CHECK] OptionHandlerToSetValueItem for [{0}] is not defined.".format(
Expand All @@ -178,7 +178,7 @@ def OptionHandlerToSetValueItemIsNotDefined(name: str):

# --------------------------------------------------------------------
def OptionHandlerToWriteIsNotDefined(name: str):
assert type(name) == str # noqa: E721
assert type(name) is str

errMsg = "[BUG CHECK] OptionHandlerToWrite for [{0}] is not defined.".format(
name
Expand All @@ -187,9 +187,9 @@ def OptionHandlerToWriteIsNotDefined(name: str):

# --------------------------------------------------------------------
def UnexpectedSituation(bugcheckSrc: str, bugcheckPoint: str, explain: str):
assert type(bugcheckSrc) == str # noqa: E721
assert type(bugcheckPoint) == str # noqa: E721
assert explain is None or type(explain) == str # noqa: E721
assert type(bugcheckSrc) is str
assert type(bugcheckPoint) is str
assert explain is None or type(explain) is str

errMsg = "[BUG CHECK] Unexpected situation in [{0}][{1}].".format(
bugcheckSrc, bugcheckPoint
Expand All @@ -205,9 +205,9 @@ def UnexpectedSituation(bugcheckSrc: str, bugcheckPoint: str, explain: str):

# --------------------------------------------------------------------
def UnknownOptionValueType(optionName: str, typeOfOptionValue: type):
assert type(optionName) == str # noqa: E721
assert type(optionName) is str
assert optionName != ""
assert type(typeOfOptionValue) == type # noqa: E721
assert type(typeOfOptionValue) is type

errMsg = "[BUG CHECK] Unknown value type [{1}] of option [{0}].".format(
optionName, typeOfOptionValue.__name__
Expand Down
Loading