diff options
author | robot-piglet <robot-piglet@yandex-team.com> | 2024-08-11 11:41:50 +0300 |
---|---|---|
committer | robot-piglet <robot-piglet@yandex-team.com> | 2024-08-11 11:51:27 +0300 |
commit | c7230d56fb1b7998da0edb829f1751640da9c8b4 (patch) | |
tree | 85a562666b35669dfa5e360a1dff63487c08e808 /contrib | |
parent | ccd1e498e726a5d05b17b7c451d63da5c9d845ef (diff) | |
download | ydb-c7230d56fb1b7998da0edb829f1751640da9c8b4.tar.gz |
Intermediate changes
Diffstat (limited to 'contrib')
4 files changed, 17 insertions, 10 deletions
diff --git a/contrib/python/incremental/py3/.dist-info/METADATA b/contrib/python/incremental/py3/.dist-info/METADATA index 2bbcbfdc36..6cefbff794 100644 --- a/contrib/python/incremental/py3/.dist-info/METADATA +++ b/contrib/python/incremental/py3/.dist-info/METADATA @@ -1,6 +1,6 @@ Metadata-Version: 2.1 Name: incremental -Version: 24.7.0 +Version: 24.7.1 Summary: A small library that versions your Python projects. Maintainer-email: Amber Brown <hawkowl@twistedmatrix.com> Project-URL: Homepage, https://github.com/twisted/incremental diff --git a/contrib/python/incremental/py3/incremental/__init__.py b/contrib/python/incremental/py3/incremental/__init__.py index b10d5be033..7a29fd7b05 100644 --- a/contrib/python/incremental/py3/incremental/__init__.py +++ b/contrib/python/incremental/py3/incremental/__init__.py @@ -482,11 +482,20 @@ def _load_pyproject_toml(toml_path): # type: (str) -> Optional[_IncrementalConf tool_incremental = _extract_tool_incremental(data) - if tool_incremental is None or tool_incremental == {}: + package = None + if tool_incremental is not None and "name" in tool_incremental: + package = tool_incremental["name"] + if package is None: try: package = data["project"]["name"] except KeyError: - raise ValueError("""\ + pass + if package is None: + # We can't proceed without a project name, but that's only an error + # if [tool.incremental] is present. + if tool_incremental is None: + return None + raise ValueError("""\ Couldn't extract the package name from pyproject.toml. Specify it like: [project] @@ -496,12 +505,8 @@ Or: [tool.incremental] name = "Foo" -""") - elif tool_incremental.keys() == {"name"}: - package = tool_incremental["name"] - else: - raise ValueError("Unexpected key(s) in [tool.incremental]") +""") if not isinstance(package, str): raise TypeError( "Package name must be a string, but found {}".format(type(package)) @@ -526,6 +531,8 @@ def _extract_tool_incremental(data): # type: (Dict[str, object]) -> Optional[Di if not isinstance(tool_incremental, dict): raise ValueError("[tool.incremental] must be a table") + if not {"name"}.issuperset(tool_incremental.keys()): + raise ValueError("Unexpected key(s) in [tool.incremental]") return tool_incremental diff --git a/contrib/python/incremental/py3/incremental/_version.py b/contrib/python/incremental/py3/incremental/_version.py index 672cfb7961..654a7b7cd4 100644 --- a/contrib/python/incremental/py3/incremental/_version.py +++ b/contrib/python/incremental/py3/incremental/_version.py @@ -7,5 +7,5 @@ Provides Incremental version information. from incremental import Version -__version__ = Version("Incremental", 24, 7, 0) +__version__ = Version("Incremental", 24, 7, 1) __all__ = ["__version__"] diff --git a/contrib/python/incremental/py3/ya.make b/contrib/python/incremental/py3/ya.make index 66ee789b70..668dd7c5e2 100644 --- a/contrib/python/incremental/py3/ya.make +++ b/contrib/python/incremental/py3/ya.make @@ -2,7 +2,7 @@ PY3_LIBRARY() -VERSION(24.7.0) +VERSION(24.7.1) LICENSE(MIT) |