RepoAuditor 0.2.16__tar.gz → 0.2.18__tar.gz
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.
- {repoauditor-0.2.16 → repoauditor-0.2.18}/PKG-INFO +1 -1
- {repoauditor-0.2.16 → repoauditor-0.2.18}/pyproject.toml +5 -2
- {repoauditor-0.2.16 → repoauditor-0.2.18}/src/RepoAuditor/CommandLineProcessor.py +6 -4
- {repoauditor-0.2.16 → repoauditor-0.2.18}/src/RepoAuditor/EntryPoint.py +4 -0
- {repoauditor-0.2.16 → repoauditor-0.2.18}/src/RepoAuditor/ExecuteModules.py +5 -1
- {repoauditor-0.2.16 → repoauditor-0.2.18}/src/RepoAuditor/Impl/ParallelSequentialProcessor.py +1 -0
- {repoauditor-0.2.16 → repoauditor-0.2.18}/src/RepoAuditor/Module.py +6 -4
- {repoauditor-0.2.16 → repoauditor-0.2.18}/src/RepoAuditor/Plugin.py +2 -2
- {repoauditor-0.2.16 → repoauditor-0.2.18}/src/RepoAuditor/Plugins/GitHub/ClassicBranchProtectionQuery.py +2 -1
- {repoauditor-0.2.16 → repoauditor-0.2.18}/src/RepoAuditor/Plugins/GitHub/ClassicBranchProtectionRequirements/AllowDeletions.py +3 -1
- {repoauditor-0.2.16 → repoauditor-0.2.18}/src/RepoAuditor/Plugins/GitHub/ClassicBranchProtectionRequirements/AllowForcePushes.py +3 -1
- {repoauditor-0.2.16 → repoauditor-0.2.18}/src/RepoAuditor/Plugins/GitHub/ClassicBranchProtectionRequirements/DismissStalePullRequestApprovals.py +3 -1
- {repoauditor-0.2.16 → repoauditor-0.2.18}/src/RepoAuditor/Plugins/GitHub/ClassicBranchProtectionRequirements/DoNotAllowBypassSettings.py +3 -1
- {repoauditor-0.2.16 → repoauditor-0.2.18}/src/RepoAuditor/Plugins/GitHub/ClassicBranchProtectionRequirements/EnsureStatusChecks.py +4 -1
- {repoauditor-0.2.16 → repoauditor-0.2.18}/src/RepoAuditor/Plugins/GitHub/ClassicBranchProtectionRequirements/Impl/ClassicEnableRequirementImpl.py +4 -2
- {repoauditor-0.2.16 → repoauditor-0.2.18}/src/RepoAuditor/Plugins/GitHub/ClassicBranchProtectionRequirements/Impl/ClassicValueRequirementImpl.py +4 -2
- {repoauditor-0.2.16 → repoauditor-0.2.18}/src/RepoAuditor/Plugins/GitHub/ClassicBranchProtectionRequirements/RequireApprovalMostRecentPush.py +3 -1
- {repoauditor-0.2.16 → repoauditor-0.2.18}/src/RepoAuditor/Plugins/GitHub/ClassicBranchProtectionRequirements/RequireApprovals.py +3 -1
- {repoauditor-0.2.16 → repoauditor-0.2.18}/src/RepoAuditor/Plugins/GitHub/ClassicBranchProtectionRequirements/RequireCodeOwnerReview.py +3 -1
- {repoauditor-0.2.16 → repoauditor-0.2.18}/src/RepoAuditor/Plugins/GitHub/ClassicBranchProtectionRequirements/RequireConversationResolution.py +3 -1
- {repoauditor-0.2.16 → repoauditor-0.2.18}/src/RepoAuditor/Plugins/GitHub/ClassicBranchProtectionRequirements/RequireLinearHistory.py +3 -1
- {repoauditor-0.2.16 → repoauditor-0.2.18}/src/RepoAuditor/Plugins/GitHub/ClassicBranchProtectionRequirements/RequirePullRequests.py +3 -1
- {repoauditor-0.2.16 → repoauditor-0.2.18}/src/RepoAuditor/Plugins/GitHub/ClassicBranchProtectionRequirements/RequireSignedCommits.py +3 -1
- {repoauditor-0.2.16 → repoauditor-0.2.18}/src/RepoAuditor/Plugins/GitHub/ClassicBranchProtectionRequirements/RequireStatusChecksToPass.py +3 -1
- {repoauditor-0.2.16 → repoauditor-0.2.18}/src/RepoAuditor/Plugins/GitHub/ClassicBranchProtectionRequirements/RequireUpToDateBranches.py +3 -1
- {repoauditor-0.2.16 → repoauditor-0.2.18}/src/RepoAuditor/Plugins/GitHub/DefaultBranchQuery.py +2 -1
- {repoauditor-0.2.16 → repoauditor-0.2.18}/src/RepoAuditor/Plugins/GitHub/DefaultBranchQueryRequirements/Protected.py +5 -3
- {repoauditor-0.2.16 → repoauditor-0.2.18}/src/RepoAuditor/Plugins/GitHub/Impl/Common.py +1 -0
- {repoauditor-0.2.16 → repoauditor-0.2.18}/src/RepoAuditor/Plugins/GitHub/Impl/EnableRequirementImpl.py +2 -1
- {repoauditor-0.2.16 → repoauditor-0.2.18}/src/RepoAuditor/Plugins/GitHub/Impl/ValueRequirementImpl.py +2 -1
- {repoauditor-0.2.16 → repoauditor-0.2.18}/src/RepoAuditor/Plugins/GitHub/Module.py +7 -2
- {repoauditor-0.2.16 → repoauditor-0.2.18}/src/RepoAuditor/Plugins/GitHub/StandardQuery.py +2 -1
- {repoauditor-0.2.16 → repoauditor-0.2.18}/src/RepoAuditor/Plugins/GitHub/StandardQueryRequirements/AutoMerge.py +3 -1
- {repoauditor-0.2.16 → repoauditor-0.2.18}/src/RepoAuditor/Plugins/GitHub/StandardQueryRequirements/DefaultBranch.py +3 -1
- {repoauditor-0.2.16 → repoauditor-0.2.18}/src/RepoAuditor/Plugins/GitHub/StandardQueryRequirements/DeleteHeadBranches.py +3 -1
- {repoauditor-0.2.16 → repoauditor-0.2.18}/src/RepoAuditor/Plugins/GitHub/StandardQueryRequirements/DependabotSecurityUpdates.py +3 -1
- {repoauditor-0.2.16 → repoauditor-0.2.18}/src/RepoAuditor/Plugins/GitHub/StandardQueryRequirements/Description.py +5 -3
- {repoauditor-0.2.16 → repoauditor-0.2.18}/src/RepoAuditor/Plugins/GitHub/StandardQueryRequirements/Impl/StandardEnableRequirementImpl.py +4 -2
- {repoauditor-0.2.16 → repoauditor-0.2.18}/src/RepoAuditor/Plugins/GitHub/StandardQueryRequirements/Impl/StandardValueRequirementImpl.py +4 -2
- {repoauditor-0.2.16 → repoauditor-0.2.18}/src/RepoAuditor/Plugins/GitHub/StandardQueryRequirements/License.py +3 -1
- {repoauditor-0.2.16 → repoauditor-0.2.18}/src/RepoAuditor/Plugins/GitHub/StandardQueryRequirements/MergeCommit.py +3 -1
- {repoauditor-0.2.16 → repoauditor-0.2.18}/src/RepoAuditor/Plugins/GitHub/StandardQueryRequirements/MergeCommitMessage.py +3 -1
- {repoauditor-0.2.16 → repoauditor-0.2.18}/src/RepoAuditor/Plugins/GitHub/StandardQueryRequirements/Private.py +5 -3
- {repoauditor-0.2.16 → repoauditor-0.2.18}/src/RepoAuditor/Plugins/GitHub/StandardQueryRequirements/RebaseMergeCommit.py +3 -1
- {repoauditor-0.2.16 → repoauditor-0.2.18}/src/RepoAuditor/Plugins/GitHub/StandardQueryRequirements/SecretScanning.py +3 -1
- {repoauditor-0.2.16 → repoauditor-0.2.18}/src/RepoAuditor/Plugins/GitHub/StandardQueryRequirements/SecretScanningPushProtection.py +3 -1
- {repoauditor-0.2.16 → repoauditor-0.2.18}/src/RepoAuditor/Plugins/GitHub/StandardQueryRequirements/SquashCommitMerge.py +3 -1
- {repoauditor-0.2.16 → repoauditor-0.2.18}/src/RepoAuditor/Plugins/GitHub/StandardQueryRequirements/SquashMergeCommitMessage.py +3 -1
- {repoauditor-0.2.16 → repoauditor-0.2.18}/src/RepoAuditor/Plugins/GitHub/StandardQueryRequirements/SuggestUpdatingPullRequestBranches.py +3 -1
- {repoauditor-0.2.16 → repoauditor-0.2.18}/src/RepoAuditor/Plugins/GitHub/StandardQueryRequirements/SupportDiscussions.py +3 -1
- {repoauditor-0.2.16 → repoauditor-0.2.18}/src/RepoAuditor/Plugins/GitHub/StandardQueryRequirements/SupportIssues.py +3 -1
- {repoauditor-0.2.16 → repoauditor-0.2.18}/src/RepoAuditor/Plugins/GitHub/StandardQueryRequirements/SupportProjects.py +3 -1
- {repoauditor-0.2.16 → repoauditor-0.2.18}/src/RepoAuditor/Plugins/GitHub/StandardQueryRequirements/SupportWikis.py +3 -1
- {repoauditor-0.2.16 → repoauditor-0.2.18}/src/RepoAuditor/Plugins/GitHub/StandardQueryRequirements/TemplateRepository.py +3 -1
- {repoauditor-0.2.16 → repoauditor-0.2.18}/src/RepoAuditor/Plugins/GitHub/StandardQueryRequirements/WebCommitSignoff.py +3 -1
- {repoauditor-0.2.16 → repoauditor-0.2.18}/src/RepoAuditor/Plugins/GitHubPlugin.py +2 -1
- {repoauditor-0.2.16 → repoauditor-0.2.18}/src/RepoAuditor/Query.py +6 -3
- {repoauditor-0.2.16 → repoauditor-0.2.18}/src/RepoAuditor/Requirement.py +10 -3
- {repoauditor-0.2.16 → repoauditor-0.2.18}/src/RepoAuditor/__init__.py +1 -1
- {repoauditor-0.2.16 → repoauditor-0.2.18}/.copier-answers.yml +0 -0
- {repoauditor-0.2.16 → repoauditor-0.2.18}/.github/CODEOWNERS +0 -0
- {repoauditor-0.2.16 → repoauditor-0.2.18}/.github/ISSUE_TEMPLATE/bug_report.md +0 -0
- {repoauditor-0.2.16 → repoauditor-0.2.18}/.github/ISSUE_TEMPLATE/config.yml +0 -0
- {repoauditor-0.2.16 → repoauditor-0.2.18}/.github/ISSUE_TEMPLATE/custom.md +0 -0
- {repoauditor-0.2.16 → repoauditor-0.2.18}/.github/ISSUE_TEMPLATE/feature_request.md +0 -0
- {repoauditor-0.2.16 → repoauditor-0.2.18}/.github/actions/release_impl/action.yml +0 -0
- {repoauditor-0.2.16 → repoauditor-0.2.18}/.github/pull_request_template.md +0 -0
- {repoauditor-0.2.16 → repoauditor-0.2.18}/.github/release_sources.yaml +0 -0
- {repoauditor-0.2.16 → repoauditor-0.2.18}/.github/workflows/CICD.yml +0 -0
- {repoauditor-0.2.16 → repoauditor-0.2.18}/.github/workflows/CICD_impl.yml +0 -0
- {repoauditor-0.2.16 → repoauditor-0.2.18}/.github/workflows/codeql.yml +0 -0
- {repoauditor-0.2.16 → repoauditor-0.2.18}/.gitignore +0 -0
- {repoauditor-0.2.16 → repoauditor-0.2.18}/.pre-commit-config.yaml +0 -0
- {repoauditor-0.2.16 → repoauditor-0.2.18}/.python-version +0 -0
- {repoauditor-0.2.16 → repoauditor-0.2.18}/CODE_OF_CONDUCT.md +0 -0
- {repoauditor-0.2.16 → repoauditor-0.2.18}/CONTRIBUTING.md +0 -0
- {repoauditor-0.2.16 → repoauditor-0.2.18}/DEVELOPMENT.md +0 -0
- {repoauditor-0.2.16 → repoauditor-0.2.18}/GOVERNANCE.md +0 -0
- {repoauditor-0.2.16 → repoauditor-0.2.18}/LICENSE +0 -0
- {repoauditor-0.2.16 → repoauditor-0.2.18}/MAINTAINERS.md +0 -0
- {repoauditor-0.2.16 → repoauditor-0.2.18}/README.md +0 -0
- {repoauditor-0.2.16 → repoauditor-0.2.18}/SECURITY.md +0 -0
- {repoauditor-0.2.16 → repoauditor-0.2.18}/minisign_key.pub +0 -0
- {repoauditor-0.2.16 → repoauditor-0.2.18}/src/AutoGitSemVer.yaml +0 -0
- {repoauditor-0.2.16 → repoauditor-0.2.18}/src/RepoAuditor/Impl/__init__.py +0 -0
- {repoauditor-0.2.16 → repoauditor-0.2.18}/src/RepoAuditor/Plugins/GitHub/ClassicBranchProtectionRequirements/Impl/__init__.py +0 -0
- {repoauditor-0.2.16 → repoauditor-0.2.18}/src/RepoAuditor/Plugins/GitHub/ClassicBranchProtectionRequirements/__init__.py +0 -0
- {repoauditor-0.2.16 → repoauditor-0.2.18}/src/RepoAuditor/Plugins/GitHub/DefaultBranchQueryRequirements/__init__.py +0 -0
- {repoauditor-0.2.16 → repoauditor-0.2.18}/src/RepoAuditor/Plugins/GitHub/Impl/__init__.py +0 -0
- {repoauditor-0.2.16 → repoauditor-0.2.18}/src/RepoAuditor/Plugins/GitHub/StandardQueryRequirements/Impl/__init__.py +0 -0
- {repoauditor-0.2.16 → repoauditor-0.2.18}/src/RepoAuditor/Plugins/GitHub/StandardQueryRequirements/__init__.py +0 -0
- {repoauditor-0.2.16 → repoauditor-0.2.18}/src/RepoAuditor/Plugins/GitHub/__init__.py +0 -0
- {repoauditor-0.2.16 → repoauditor-0.2.18}/src/RepoAuditor/Plugins/__init__.py +0 -0
- {repoauditor-0.2.16 → repoauditor-0.2.18}/src/RepoAuditor/py.typed +0 -0
- {repoauditor-0.2.16 → repoauditor-0.2.18}/tests/CommandLineProcessor_UnitTest.py +0 -0
- {repoauditor-0.2.16 → repoauditor-0.2.18}/tests/EntryPoint_UnitTest.py +0 -0
- {repoauditor-0.2.16 → repoauditor-0.2.18}/tests/ExecuteModules_UnitTest.py +0 -0
- {repoauditor-0.2.16 → repoauditor-0.2.18}/tests/Module_UnitTest.py +0 -0
- {repoauditor-0.2.16 → repoauditor-0.2.18}/tests/Plugin_UnitTest.py +0 -0
- {repoauditor-0.2.16 → repoauditor-0.2.18}/tests/Plugins/GitHubModule_UnitTest.py +0 -0
- {repoauditor-0.2.16 → repoauditor-0.2.18}/tests/Plugins/GitHub_EndToEndTest.py +0 -0
- {repoauditor-0.2.16 → repoauditor-0.2.18}/tests/Plugins/__snapshots__/GitHub_EndToEndTest.ambr +0 -0
- {repoauditor-0.2.16 → repoauditor-0.2.18}/tests/Plugins/utilities.py +0 -0
- {repoauditor-0.2.16 → repoauditor-0.2.18}/tests/Query_UnitTest.py +0 -0
- {repoauditor-0.2.16 → repoauditor-0.2.18}/tests/Requirement_UnitTest.py +0 -0
- {repoauditor-0.2.16 → repoauditor-0.2.18}/tests/__snapshots__/ExecuteModules_UnitTest.ambr +0 -0
- {repoauditor-0.2.16 → repoauditor-0.2.18}/uv.lock +0 -0
|
@@ -111,7 +111,7 @@ select = [
|
|
|
111
111
|
"SLF",
|
|
112
112
|
"SIM",
|
|
113
113
|
"SLOT",
|
|
114
|
-
|
|
114
|
+
"TID",
|
|
115
115
|
"TD",
|
|
116
116
|
"TC",
|
|
117
117
|
"ARG",
|
|
@@ -126,7 +126,7 @@ select = [
|
|
|
126
126
|
"E",
|
|
127
127
|
"W",
|
|
128
128
|
"DOC",
|
|
129
|
-
|
|
129
|
+
"D",
|
|
130
130
|
"F",
|
|
131
131
|
"PGH",
|
|
132
132
|
# "PL", # 11
|
|
@@ -142,6 +142,9 @@ ignore = [
|
|
|
142
142
|
"ANN003", # Missing type annotation for `**kwargs`
|
|
143
143
|
"BLE001", # Do not catch blind exception: `Exception`
|
|
144
144
|
"COM812", # Trailing comma missing
|
|
145
|
+
"D104", # Missing docstring in public package
|
|
146
|
+
"D106", # Missing docstring in public nested class
|
|
147
|
+
"D107", # Missing docstring in `__init__` method
|
|
145
148
|
"D202", # No blank lines allowed after function docstring
|
|
146
149
|
"E501", # Line too long
|
|
147
150
|
"I001", # Import block is un-sorted or un-formatted
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
# | Distributed under the MIT License.
|
|
5
5
|
# |
|
|
6
6
|
# -------------------------------------------------------------------------------
|
|
7
|
-
"""Contains the CommandLineProcessor object"""
|
|
7
|
+
"""Contains the CommandLineProcessor object."""
|
|
8
8
|
|
|
9
9
|
from dataclasses import dataclass, field
|
|
10
10
|
from typing import Any, Protocol
|
|
@@ -17,7 +17,8 @@ from .ExecuteModules import Execute, Module, ModuleInfo
|
|
|
17
17
|
# ----------------------------------------------------------------------
|
|
18
18
|
@dataclass(frozen=True)
|
|
19
19
|
class CommandLineProcessor:
|
|
20
|
-
"""
|
|
20
|
+
"""Class for processing command line arguments and invoking the appropriate modules.
|
|
21
|
+
|
|
21
22
|
Object that makes it easy to process command line arguments and invoke ExecuteModules.Execute
|
|
22
23
|
in a testable way.
|
|
23
24
|
"""
|
|
@@ -28,7 +29,7 @@ class CommandLineProcessor:
|
|
|
28
29
|
# |
|
|
29
30
|
# ----------------------------------------------------------------------
|
|
30
31
|
class GetDynamicArgsFunc(Protocol):
|
|
31
|
-
def __call__(
|
|
32
|
+
def __call__( # noqa: D102
|
|
32
33
|
self,
|
|
33
34
|
dynamic_arg_definitions: dict[
|
|
34
35
|
str, Any
|
|
@@ -65,6 +66,7 @@ class CommandLineProcessor:
|
|
|
65
66
|
single_threaded: bool = False,
|
|
66
67
|
argument_separator: str = "-",
|
|
67
68
|
) -> "CommandLineProcessor":
|
|
69
|
+
"""Factor method to construct a CommandLineProcessor object."""
|
|
68
70
|
# Convert modules into a lookup map
|
|
69
71
|
module_map: dict[str, Module] = {}
|
|
70
72
|
|
|
@@ -199,7 +201,7 @@ class CommandLineProcessor:
|
|
|
199
201
|
)
|
|
200
202
|
|
|
201
203
|
# ----------------------------------------------------------------------
|
|
202
|
-
def __call__(
|
|
204
|
+
def __call__( # noqa: D102
|
|
203
205
|
self,
|
|
204
206
|
dm: DoneManager,
|
|
205
207
|
) -> list[list[Module.EvaluateInfo]]:
|
|
@@ -33,8 +33,11 @@ ARGUMENT_SEPARATOR = "-"
|
|
|
33
33
|
|
|
34
34
|
# ----------------------------------------------------------------------
|
|
35
35
|
class NaturalOrderGrouper(TyperGroup):
|
|
36
|
+
"""Group commands in natural order."""
|
|
37
|
+
|
|
36
38
|
# ----------------------------------------------------------------------
|
|
37
39
|
def list_commands(self, *args, **kwargs) -> list[str]: # noqa: ARG002
|
|
40
|
+
"""Return a list of all the commands, to be sorted in a natural ordering."""
|
|
38
41
|
return self.commands.keys()
|
|
39
42
|
|
|
40
43
|
|
|
@@ -257,6 +260,7 @@ def EntryPoint(
|
|
|
257
260
|
),
|
|
258
261
|
] = False,
|
|
259
262
|
) -> None:
|
|
263
|
+
"""Entry point for the command line interface."""
|
|
260
264
|
with DoneManager.CreateCommandLine(
|
|
261
265
|
sys.stdout,
|
|
262
266
|
flags=DoneManagerFlags.Create(verbose=verbose, debug=debug),
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
# | Distributed under the MIT License.
|
|
5
5
|
# |
|
|
6
6
|
# -------------------------------------------------------------------------------
|
|
7
|
-
"""Contains functionality to execute multiple Modules"""
|
|
7
|
+
"""Contains functionality to execute multiple Modules."""
|
|
8
8
|
|
|
9
9
|
import itertools
|
|
10
10
|
import sys
|
|
@@ -34,6 +34,8 @@ from .Module import EvaluateResult, ExecutionStyle, Module, OnStatusFunc
|
|
|
34
34
|
# ----------------------------------------------------------------------
|
|
35
35
|
@dataclass(frozen=True)
|
|
36
36
|
class ModuleInfo:
|
|
37
|
+
"""Information about a Module."""
|
|
38
|
+
|
|
37
39
|
module: Module
|
|
38
40
|
dynamic_args: dict[str, Any]
|
|
39
41
|
requirement_args: dict[str, Any]
|
|
@@ -52,6 +54,7 @@ def Execute(
|
|
|
52
54
|
*,
|
|
53
55
|
single_threaded: bool = False,
|
|
54
56
|
) -> list[list[Module.EvaluateInfo]]:
|
|
57
|
+
"""Execute the modules in parallel and/or sequentially."""
|
|
55
58
|
if not module_infos:
|
|
56
59
|
dm.WriteWarning("There are no modules to process.\n")
|
|
57
60
|
return []
|
|
@@ -266,6 +269,7 @@ def DisplayResults(
|
|
|
266
269
|
display_rationale: bool,
|
|
267
270
|
panel_width: Optional[int] = None,
|
|
268
271
|
) -> None:
|
|
272
|
+
"""Display the results of executing the modules."""
|
|
269
273
|
for results in all_results:
|
|
270
274
|
assert results
|
|
271
275
|
module = results[0].module
|
{repoauditor-0.2.16 → repoauditor-0.2.18}/src/RepoAuditor/Impl/ParallelSequentialProcessor.py
RENAMED
|
@@ -35,6 +35,7 @@ def ParallelSequentialProcessor(
|
|
|
35
35
|
*,
|
|
36
36
|
max_num_threads: Optional[int] = None,
|
|
37
37
|
) -> list[OutputType]:
|
|
38
|
+
"""Process a list of items in parallel and/or sequentially."""
|
|
38
39
|
if dm is None:
|
|
39
40
|
with DoneManager.Create(StreamDecorator(None), "", line_prefix="") as dm:
|
|
40
41
|
return _Impl(
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
# | Distributed under the MIT License.
|
|
5
5
|
# |
|
|
6
6
|
# -------------------------------------------------------------------------------
|
|
7
|
-
"""Contains the Module object and types used in its definition"""
|
|
7
|
+
"""Contains the Module object and types used in its definition."""
|
|
8
8
|
|
|
9
9
|
import threading
|
|
10
10
|
|
|
@@ -55,6 +55,7 @@ class Module(ABC):
|
|
|
55
55
|
|
|
56
56
|
# ----------------------------------------------------------------------
|
|
57
57
|
def GetNumRequirements(self) -> int:
|
|
58
|
+
"""Get the total number of requirements across all queries."""
|
|
58
59
|
return sum(len(query.requirements) for query in self.queries)
|
|
59
60
|
|
|
60
61
|
# ----------------------------------------------------------------------
|
|
@@ -63,6 +64,7 @@ class Module(ABC):
|
|
|
63
64
|
included_names: set[str],
|
|
64
65
|
excluded_names: set[str],
|
|
65
66
|
) -> None:
|
|
67
|
+
"""Process the requirements to remove invalid requirements and queries."""
|
|
66
68
|
query_index = 0
|
|
67
69
|
|
|
68
70
|
while query_index < len(self.queries):
|
|
@@ -90,7 +92,7 @@ class Module(ABC):
|
|
|
90
92
|
# ----------------------------------------------------------------------
|
|
91
93
|
@abstractmethod
|
|
92
94
|
def GetDynamicArgDefinitions(self) -> dict[str, TypeDefinitionItemType]:
|
|
93
|
-
"""
|
|
95
|
+
"""Return information about dynamic arguments that the module can consume (often from the command line)."""
|
|
94
96
|
|
|
95
97
|
raise NotImplementedError("Abstract method") # pragma: no cover # noqa: EM101
|
|
96
98
|
|
|
@@ -100,8 +102,7 @@ class Module(ABC):
|
|
|
100
102
|
self,
|
|
101
103
|
dynamic_args: dict[str, Any],
|
|
102
104
|
) -> Optional[dict[str, Any]]:
|
|
103
|
-
"""
|
|
104
|
-
Augments data beyond data initially encountered (for example, on the command line).
|
|
105
|
+
"""Augments data beyond data initially encountered (for example, on the command line).
|
|
105
106
|
|
|
106
107
|
Return None to indicate that the Module cannot be evaluated. Raise an
|
|
107
108
|
exception to indicate that the command line data is invalid.
|
|
@@ -118,6 +119,7 @@ class Module(ABC):
|
|
|
118
119
|
*,
|
|
119
120
|
max_num_threads: Optional[int] = None,
|
|
120
121
|
) -> list[list["Module.EvaluateInfo"]]:
|
|
122
|
+
"""Evaluate the module using the module data and requirement data."""
|
|
121
123
|
status_info = StatusInfo()
|
|
122
124
|
status_info_lock = threading.Lock()
|
|
123
125
|
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
# | Distributed under the MIT License.
|
|
5
5
|
# |
|
|
6
6
|
# -------------------------------------------------------------------------------
|
|
7
|
-
"""Contains the interface that Plugins must implement"""
|
|
7
|
+
"""Contains the interface that Plugins must implement."""
|
|
8
8
|
|
|
9
9
|
import pluggy
|
|
10
10
|
|
|
@@ -16,5 +16,5 @@ from .Module import Module
|
|
|
16
16
|
# ----------------------------------------------------------------------
|
|
17
17
|
@pluggy.HookspecMarker(APP_NAME)
|
|
18
18
|
def GetModule() -> Module:
|
|
19
|
-
"""
|
|
19
|
+
"""Return a Module."""
|
|
20
20
|
raise NotImplementedError("hookspec") # pragma: no cover # noqa: EM101
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
# | Distributed under the MIT License.
|
|
5
5
|
# |
|
|
6
6
|
# -------------------------------------------------------------------------------
|
|
7
|
-
"""Contains the ClassicBranchProtection object"""
|
|
7
|
+
"""Contains the ClassicBranchProtection object."""
|
|
8
8
|
|
|
9
9
|
from typing import Any, Optional
|
|
10
10
|
|
|
@@ -117,6 +117,7 @@ class ClassicBranchProtectionQuery(Query):
|
|
|
117
117
|
self,
|
|
118
118
|
module_data: dict[str, Any],
|
|
119
119
|
) -> Optional[dict[str, Any]]:
|
|
120
|
+
"""Get the data from an API session."""
|
|
120
121
|
branch = module_data.get("branch")
|
|
121
122
|
if branch is None:
|
|
122
123
|
# Get the default branch name
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
# | Distributed under the MIT License.
|
|
5
5
|
# |
|
|
6
6
|
# -------------------------------------------------------------------------------
|
|
7
|
-
"""Contains the AllowDeletions object"""
|
|
7
|
+
"""Contains the AllowDeletions object."""
|
|
8
8
|
|
|
9
9
|
import textwrap
|
|
10
10
|
|
|
@@ -13,6 +13,8 @@ from .Impl.ClassicEnableRequirementImpl import ClassicEnableRequirementImpl
|
|
|
13
13
|
|
|
14
14
|
# ----------------------------------------------------------------------
|
|
15
15
|
class AllowDeletions(ClassicEnableRequirementImpl):
|
|
16
|
+
"""Allow deletion of the mainline branch."""
|
|
17
|
+
|
|
16
18
|
# ----------------------------------------------------------------------
|
|
17
19
|
def __init__(self) -> None:
|
|
18
20
|
super().__init__(
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
# | Distributed under the MIT License.
|
|
5
5
|
# |
|
|
6
6
|
# -------------------------------------------------------------------------------
|
|
7
|
-
"""Contains the AllowForcePushes object"""
|
|
7
|
+
"""Contains the AllowForcePushes object."""
|
|
8
8
|
|
|
9
9
|
import textwrap
|
|
10
10
|
|
|
@@ -13,6 +13,8 @@ from .Impl.ClassicEnableRequirementImpl import ClassicEnableRequirementImpl
|
|
|
13
13
|
|
|
14
14
|
# ----------------------------------------------------------------------
|
|
15
15
|
class AllowForcePushes(ClassicEnableRequirementImpl):
|
|
16
|
+
"""Allow force pushes to the mainline branch."""
|
|
17
|
+
|
|
16
18
|
# ----------------------------------------------------------------------
|
|
17
19
|
def __init__(self) -> None:
|
|
18
20
|
super().__init__(
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
# | Distributed under the MIT License.
|
|
5
5
|
# |
|
|
6
6
|
# -------------------------------------------------------------------------------
|
|
7
|
-
"""Contains the DismissStalePullRequestApprovals object"""
|
|
7
|
+
"""Contains the DismissStalePullRequestApprovals object."""
|
|
8
8
|
|
|
9
9
|
import textwrap
|
|
10
10
|
|
|
@@ -15,6 +15,8 @@ from .Impl.ClassicEnableRequirementImpl import ClassicEnableRequirementImpl
|
|
|
15
15
|
|
|
16
16
|
# ----------------------------------------------------------------------
|
|
17
17
|
class DismissStalePullRequestApprovals(ClassicEnableRequirementImpl):
|
|
18
|
+
"""Dismiss stale pull request approvals when new commits are pushed."""
|
|
19
|
+
|
|
18
20
|
# ----------------------------------------------------------------------
|
|
19
21
|
def __init__(self) -> None:
|
|
20
22
|
super().__init__(
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
# | Distributed under the MIT License.
|
|
5
5
|
# |
|
|
6
6
|
# -------------------------------------------------------------------------------
|
|
7
|
-
"""Contains the AllowBypassSettings object"""
|
|
7
|
+
"""Contains the AllowBypassSettings object."""
|
|
8
8
|
|
|
9
9
|
import textwrap
|
|
10
10
|
|
|
@@ -13,6 +13,8 @@ from .Impl.ClassicEnableRequirementImpl import ClassicEnableRequirementImpl
|
|
|
13
13
|
|
|
14
14
|
# ----------------------------------------------------------------------
|
|
15
15
|
class DoNotAllowBypassSettings(ClassicEnableRequirementImpl):
|
|
16
|
+
"""Do not allow bypassing settings."""
|
|
17
|
+
|
|
16
18
|
# ----------------------------------------------------------------------
|
|
17
19
|
def __init__(self) -> None:
|
|
18
20
|
super().__init__(
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
# | Distributed under the MIT License.
|
|
5
5
|
# |
|
|
6
6
|
# -------------------------------------------------------------------------------
|
|
7
|
-
"""Contains the EnsureStatusChecks object"""
|
|
7
|
+
"""Contains the EnsureStatusChecks object."""
|
|
8
8
|
|
|
9
9
|
import textwrap
|
|
10
10
|
|
|
@@ -19,6 +19,8 @@ from RepoAuditor.Requirement import EvaluateResult, ExecutionStyle, Requirement
|
|
|
19
19
|
|
|
20
20
|
# ----------------------------------------------------------------------
|
|
21
21
|
class EnsureStatusChecks(Requirement):
|
|
22
|
+
"""Ensure that status checks have been enabled for the branch."""
|
|
23
|
+
|
|
22
24
|
# ----------------------------------------------------------------------
|
|
23
25
|
def __init__(self) -> None:
|
|
24
26
|
super().__init__(
|
|
@@ -54,6 +56,7 @@ class EnsureStatusChecks(Requirement):
|
|
|
54
56
|
# ----------------------------------------------------------------------
|
|
55
57
|
@override
|
|
56
58
|
def GetDynamicArgDefinitions(self) -> dict[str, TypeDefinitionItemType]:
|
|
59
|
+
"""Get the definitions for the arguments to this requirement."""
|
|
57
60
|
return {
|
|
58
61
|
"disable": (
|
|
59
62
|
bool,
|
|
@@ -4,18 +4,20 @@
|
|
|
4
4
|
# | Distributed under the MIT License.
|
|
5
5
|
# |
|
|
6
6
|
# -------------------------------------------------------------------------------
|
|
7
|
-
"""Contains the ClassicEnableRequirementImpl object"""
|
|
7
|
+
"""Contains the ClassicEnableRequirementImpl object."""
|
|
8
8
|
|
|
9
9
|
import textwrap
|
|
10
10
|
|
|
11
11
|
from typing import Any, Optional
|
|
12
12
|
from collections.abc import Callable
|
|
13
13
|
|
|
14
|
-
from
|
|
14
|
+
from RepoAuditor.Plugins.GitHub.Impl.EnableRequirementImpl import EnableRequirementImpl
|
|
15
15
|
|
|
16
16
|
|
|
17
17
|
# ----------------------------------------------------------------------
|
|
18
18
|
class ClassicEnableRequirementImpl(EnableRequirementImpl):
|
|
19
|
+
"""Implementation of a requirement that checks a classical setting is enabled."""
|
|
20
|
+
|
|
19
21
|
# ----------------------------------------------------------------------
|
|
20
22
|
def __init__(
|
|
21
23
|
self,
|
|
@@ -4,18 +4,20 @@
|
|
|
4
4
|
# | Distributed under the MIT License.
|
|
5
5
|
# |
|
|
6
6
|
# -------------------------------------------------------------------------------
|
|
7
|
-
"""Contains the ClassicValueRequirementImpl object"""
|
|
7
|
+
"""Contains the ClassicValueRequirementImpl object."""
|
|
8
8
|
|
|
9
9
|
import textwrap
|
|
10
10
|
|
|
11
11
|
from typing import Any, Optional
|
|
12
12
|
from collections.abc import Callable
|
|
13
13
|
|
|
14
|
-
from
|
|
14
|
+
from RepoAuditor.Plugins.GitHub.Impl.ValueRequirementImpl import DoesNotApplyResult, ValueRequirementImpl
|
|
15
15
|
|
|
16
16
|
|
|
17
17
|
# ----------------------------------------------------------------------
|
|
18
18
|
class ClassicValueRequirementImpl(ValueRequirementImpl):
|
|
19
|
+
"""Implementation of a requirement that checks a classic value in GitHub settings."""
|
|
20
|
+
|
|
19
21
|
# ----------------------------------------------------------------------
|
|
20
22
|
def __init__(
|
|
21
23
|
self,
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
# | Distributed under the MIT License.
|
|
5
5
|
# |
|
|
6
6
|
# -------------------------------------------------------------------------------
|
|
7
|
-
"""Contains the RequireApprovalMostRecentPush object"""
|
|
7
|
+
"""Contains the RequireApprovalMostRecentPush object."""
|
|
8
8
|
|
|
9
9
|
import textwrap
|
|
10
10
|
|
|
@@ -15,6 +15,8 @@ from .Impl.ClassicEnableRequirementImpl import ClassicEnableRequirementImpl
|
|
|
15
15
|
|
|
16
16
|
# ----------------------------------------------------------------------
|
|
17
17
|
class RequireApprovalMostRecentPush(ClassicEnableRequirementImpl):
|
|
18
|
+
"""Require approval of the most recent reviewable push."""
|
|
19
|
+
|
|
18
20
|
# ----------------------------------------------------------------------
|
|
19
21
|
def __init__(self) -> None:
|
|
20
22
|
super().__init__(
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
# | Distributed under the MIT License.
|
|
5
5
|
# |
|
|
6
6
|
# -------------------------------------------------------------------------------
|
|
7
|
-
"""Contains the RequireApprovals object"""
|
|
7
|
+
"""Contains the RequireApprovals object."""
|
|
8
8
|
|
|
9
9
|
import textwrap
|
|
10
10
|
|
|
@@ -15,6 +15,8 @@ from .Impl.ClassicValueRequirementImpl import ClassicValueRequirementImpl, DoesN
|
|
|
15
15
|
|
|
16
16
|
# ----------------------------------------------------------------------
|
|
17
17
|
class RequireApprovals(ClassicValueRequirementImpl):
|
|
18
|
+
"""Require approvals for pull requests."""
|
|
19
|
+
|
|
18
20
|
# ----------------------------------------------------------------------
|
|
19
21
|
def __init__(self) -> None:
|
|
20
22
|
super().__init__(
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
# | Distributed under the MIT License.
|
|
5
5
|
# |
|
|
6
6
|
# -------------------------------------------------------------------------------
|
|
7
|
-
"""Contains the RequireCodeOwnerReview object"""
|
|
7
|
+
"""Contains the RequireCodeOwnerReview object."""
|
|
8
8
|
|
|
9
9
|
import textwrap
|
|
10
10
|
|
|
@@ -15,6 +15,8 @@ from .Impl.ClassicEnableRequirementImpl import ClassicEnableRequirementImpl
|
|
|
15
15
|
|
|
16
16
|
# ----------------------------------------------------------------------
|
|
17
17
|
class RequireCodeOwnerReview(ClassicEnableRequirementImpl):
|
|
18
|
+
"""Requirement of review from code owners."""
|
|
19
|
+
|
|
18
20
|
# ----------------------------------------------------------------------
|
|
19
21
|
def __init__(self) -> None:
|
|
20
22
|
super().__init__(
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
# | Distributed under the MIT License.
|
|
5
5
|
# |
|
|
6
6
|
# -------------------------------------------------------------------------------
|
|
7
|
-
"""Contains the RequireConversationResolution object"""
|
|
7
|
+
"""Contains the RequireConversationResolution object."""
|
|
8
8
|
|
|
9
9
|
import textwrap
|
|
10
10
|
|
|
@@ -13,6 +13,8 @@ from .Impl.ClassicEnableRequirementImpl import ClassicEnableRequirementImpl
|
|
|
13
13
|
|
|
14
14
|
# ----------------------------------------------------------------------
|
|
15
15
|
class RequireConversationResolution(ClassicEnableRequirementImpl):
|
|
16
|
+
"""Require conversation resolution before merging."""
|
|
17
|
+
|
|
16
18
|
# ----------------------------------------------------------------------
|
|
17
19
|
def __init__(self) -> None:
|
|
18
20
|
super().__init__(
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
# | Distributed under the MIT License.
|
|
5
5
|
# |
|
|
6
6
|
# -------------------------------------------------------------------------------
|
|
7
|
-
"""Contains the RequireLinearHistory object"""
|
|
7
|
+
"""Contains the RequireLinearHistory object."""
|
|
8
8
|
|
|
9
9
|
import textwrap
|
|
10
10
|
|
|
@@ -13,6 +13,8 @@ from .Impl.ClassicEnableRequirementImpl import ClassicEnableRequirementImpl
|
|
|
13
13
|
|
|
14
14
|
# ----------------------------------------------------------------------
|
|
15
15
|
class RequireLinearHistory(ClassicEnableRequirementImpl):
|
|
16
|
+
"""Require a linear history."""
|
|
17
|
+
|
|
16
18
|
# ----------------------------------------------------------------------
|
|
17
19
|
def __init__(self) -> None:
|
|
18
20
|
super().__init__(
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
# | Distributed under the MIT License.
|
|
5
5
|
# |
|
|
6
6
|
# -------------------------------------------------------------------------------
|
|
7
|
-
"""Contains the RequirePullRequests object"""
|
|
7
|
+
"""Contains the RequirePullRequests object."""
|
|
8
8
|
|
|
9
9
|
import textwrap
|
|
10
10
|
|
|
@@ -13,6 +13,8 @@ from .Impl.ClassicEnableRequirementImpl import ClassicEnableRequirementImpl
|
|
|
13
13
|
|
|
14
14
|
# ----------------------------------------------------------------------
|
|
15
15
|
class RequirePullRequests(ClassicEnableRequirementImpl):
|
|
16
|
+
"""Require a pull request before merging."""
|
|
17
|
+
|
|
16
18
|
# ----------------------------------------------------------------------
|
|
17
19
|
def __init__(self) -> None:
|
|
18
20
|
super().__init__(
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
# | Distributed under the MIT License.
|
|
5
5
|
# |
|
|
6
6
|
# -------------------------------------------------------------------------------
|
|
7
|
-
"""Contains the RequireSignedCommits object"""
|
|
7
|
+
"""Contains the RequireSignedCommits object."""
|
|
8
8
|
|
|
9
9
|
import textwrap
|
|
10
10
|
|
|
@@ -13,6 +13,8 @@ from .Impl.ClassicEnableRequirementImpl import ClassicEnableRequirementImpl
|
|
|
13
13
|
|
|
14
14
|
# ----------------------------------------------------------------------
|
|
15
15
|
class RequireSignedCommits(ClassicEnableRequirementImpl):
|
|
16
|
+
"""Require signed commits."""
|
|
17
|
+
|
|
16
18
|
# ----------------------------------------------------------------------
|
|
17
19
|
def __init__(self) -> None:
|
|
18
20
|
super().__init__(
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
# | Distributed under the MIT License.
|
|
5
5
|
# |
|
|
6
6
|
# -------------------------------------------------------------------------------
|
|
7
|
-
"""Contains the RequireStatusChecksToPass object"""
|
|
7
|
+
"""Contains the RequireStatusChecksToPass object."""
|
|
8
8
|
|
|
9
9
|
import textwrap
|
|
10
10
|
|
|
@@ -13,6 +13,8 @@ from .Impl.ClassicEnableRequirementImpl import ClassicEnableRequirementImpl
|
|
|
13
13
|
|
|
14
14
|
# ----------------------------------------------------------------------
|
|
15
15
|
class RequireStatusChecksToPass(ClassicEnableRequirementImpl):
|
|
16
|
+
"""Require status checks to pass before merging pull requests."""
|
|
17
|
+
|
|
16
18
|
# ----------------------------------------------------------------------
|
|
17
19
|
def __init__(self) -> None:
|
|
18
20
|
super().__init__(
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
# | Distributed under the MIT License.
|
|
5
5
|
# |
|
|
6
6
|
# -------------------------------------------------------------------------------
|
|
7
|
-
"""Contains the RequireUpToDateBranches object"""
|
|
7
|
+
"""Contains the RequireUpToDateBranches object."""
|
|
8
8
|
|
|
9
9
|
import textwrap
|
|
10
10
|
|
|
@@ -15,6 +15,8 @@ from .Impl.ClassicEnableRequirementImpl import ClassicEnableRequirementImpl
|
|
|
15
15
|
|
|
16
16
|
# ----------------------------------------------------------------------
|
|
17
17
|
class RequireUpToDateBranches(ClassicEnableRequirementImpl):
|
|
18
|
+
"""Require branches to be up to date before merging."""
|
|
19
|
+
|
|
18
20
|
# ----------------------------------------------------------------------
|
|
19
21
|
def __init__(self) -> None:
|
|
20
22
|
super().__init__(
|
{repoauditor-0.2.16 → repoauditor-0.2.18}/src/RepoAuditor/Plugins/GitHub/DefaultBranchQuery.py
RENAMED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
# | Distributed under the MIT License.
|
|
5
5
|
# |
|
|
6
6
|
# -------------------------------------------------------------------------------
|
|
7
|
-
"""Contains the DefaultBranchQuery object"""
|
|
7
|
+
"""Contains the DefaultBranchQuery object."""
|
|
8
8
|
|
|
9
9
|
from typing import Any, Optional
|
|
10
10
|
|
|
@@ -35,6 +35,7 @@ class DefaultBranchQuery(Query):
|
|
|
35
35
|
self,
|
|
36
36
|
module_data: dict[str, Any],
|
|
37
37
|
) -> Optional[dict[str, Any]]:
|
|
38
|
+
"""Get the data from an API session."""
|
|
38
39
|
# Get the default branch name
|
|
39
40
|
response = module_data["session"].get("")
|
|
40
41
|
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
# | Distributed under the MIT License.
|
|
5
5
|
# |
|
|
6
6
|
# -------------------------------------------------------------------------------
|
|
7
|
-
"""Contains the Protected object"""
|
|
7
|
+
"""Contains the Protected object."""
|
|
8
8
|
|
|
9
9
|
import textwrap
|
|
10
10
|
|
|
@@ -14,13 +14,14 @@ import typer
|
|
|
14
14
|
|
|
15
15
|
from dbrownell_Common.TyperEx import TypeDefinitionItemType # type: ignore[import-untyped]
|
|
16
16
|
from dbrownell_Common.Types import override # type: ignore[import-untyped]
|
|
17
|
+
from RepoAuditor.Plugins.GitHub.Impl.Common import CreateIncompleteDataResult
|
|
17
18
|
from RepoAuditor.Requirement import EvaluateResult, ExecutionStyle, Requirement
|
|
18
19
|
|
|
19
|
-
from ..Impl.Common import CreateIncompleteDataResult
|
|
20
|
-
|
|
21
20
|
|
|
22
21
|
# ----------------------------------------------------------------------
|
|
23
22
|
class Protected(Requirement):
|
|
23
|
+
"""Requirement to ensure that the mainline branch is protected."""
|
|
24
|
+
|
|
24
25
|
# ----------------------------------------------------------------------
|
|
25
26
|
def __init__(self) -> None:
|
|
26
27
|
# Note that protected is set for the branch when creating a branch ruleset or a classic
|
|
@@ -54,6 +55,7 @@ class Protected(Requirement):
|
|
|
54
55
|
# ----------------------------------------------------------------------
|
|
55
56
|
@override
|
|
56
57
|
def GetDynamicArgDefinitions(self) -> dict[str, TypeDefinitionItemType]:
|
|
58
|
+
"""Get the definitions for the arguments to this requirement."""
|
|
57
59
|
return {
|
|
58
60
|
"false": (
|
|
59
61
|
bool,
|
|
@@ -11,6 +11,7 @@ from RepoAuditor.Requirement import EvaluateResult, Requirement
|
|
|
11
11
|
|
|
12
12
|
# ----------------------------------------------------------------------
|
|
13
13
|
def CreateIncompleteDataResult() -> Requirement.EvaluateImplResult:
|
|
14
|
+
"""Create an incomplete data result."""
|
|
14
15
|
return Requirement.EvaluateImplResult(
|
|
15
16
|
EvaluateResult.Warning,
|
|
16
17
|
"Incomplete data was encountered; please provide the GitHub PAT or update the PAT's permissions if one was provided.",
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
# | Distributed under the MIT License.
|
|
5
5
|
# |
|
|
6
6
|
# -------------------------------------------------------------------------------
|
|
7
|
-
"""Contains the EnableRequirementImpl object"""
|
|
7
|
+
"""Contains the EnableRequirementImpl object."""
|
|
8
8
|
|
|
9
9
|
from typing import Any, Optional
|
|
10
10
|
from collections.abc import Callable
|
|
@@ -63,6 +63,7 @@ class EnableRequirementImpl(Requirement):
|
|
|
63
63
|
# ----------------------------------------------------------------------
|
|
64
64
|
@override
|
|
65
65
|
def GetDynamicArgDefinitions(self) -> dict[str, TypeDefinitionItemType]:
|
|
66
|
+
"""Get the definitions for the arguments to this requirement."""
|
|
66
67
|
return {
|
|
67
68
|
self.dynamic_arg_name: (
|
|
68
69
|
bool,
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
# | Distributed under the MIT License.
|
|
5
5
|
# |
|
|
6
6
|
# -------------------------------------------------------------------------------
|
|
7
|
-
"""Contains the ValueRequirementImpl object"""
|
|
7
|
+
"""Contains the ValueRequirementImpl object."""
|
|
8
8
|
|
|
9
9
|
from dataclasses import dataclass
|
|
10
10
|
from typing import Any, Optional
|
|
@@ -71,6 +71,7 @@ class ValueRequirementImpl(Requirement):
|
|
|
71
71
|
# ----------------------------------------------------------------------
|
|
72
72
|
@override
|
|
73
73
|
def GetDynamicArgDefinitions(self) -> dict[str, TypeDefinitionItemType]:
|
|
74
|
+
"""Get the definitions for the arguments to this requirement."""
|
|
74
75
|
return {
|
|
75
76
|
"value": (
|
|
76
77
|
str,
|