diff --git a/docs/requirements.txt b/docs/requirements.txt index fcd02448..6140f6d5 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -1,6 +1,6 @@ altgraph==0.17.2 ; python_version >= "3.10" and python_version < "3.15" -astroid==3.3.11 ; python_version >= "3.10" and python_version < "3.15" -black==25.12.0 ; python_version >= "3.10" and python_version < "3.15" +astroid==4.0.3 ; python_version >= "3.10" and python_version < "3.15" +black==26.1.0 ; python_version >= "3.10" and python_version < "3.15" cached-property==1.5.2 ; python_version >= "3.10" and python_version < "3.15" certifi==2024.7.4 ; python_version >= "3.10" and python_version < "3.15" charset-normalizer==2.1.1 ; python_version >= "3.10" and python_version < "3.15" @@ -9,7 +9,7 @@ click==8.1.3 ; python_version >= "3.10" and python_version < "3.15" colorama==0.4.5 ; python_version >= "3.10" and python_version < "3.15" coverage==7.10.6 ; python_version >= "3.10" and python_version < "3.15" coveragespace==6.1 ; python_version >= "3.10" and python_version < "3.15" -datafiles==2.3.4 ; python_version >= "3.10" and python_version < "3.15" +datafiles==2.5 ; python_version >= "3.10" and python_version < "3.15" dill==0.3.8 ; python_version >= "3.10" and python_version < "3.15" docopt==0.6.2 ; python_version >= "3.10" and python_version < "3.15" exceptiongroup==1.1.1 ; python_version == "3.10" @@ -34,13 +34,13 @@ mkdocs-autorefs==1.4.3 ; python_version >= "3.10" and python_version < "3.15" mkdocs-get-deps==0.2.0 ; python_version >= "3.10" and python_version < "3.15" mkdocs==1.6.1 ; python_version >= "3.10" and python_version < "3.15" mkdocstrings-python==2.0.1 ; python_version >= "3.10" and python_version < "3.15" -mkdocstrings==0.30.1 ; python_version >= "3.10" and python_version < "3.15" +mkdocstrings==1.0.2 ; python_version >= "3.10" and python_version < "3.15" mypy-extensions==1.0.0 ; python_version >= "3.10" and python_version < "3.15" mypy==1.19.1 ; python_version >= "3.10" and python_version < "3.15" nose==1.3.7 ; python_version >= "3.10" and python_version < "3.15" packaging==24.1 ; python_version >= "3.10" and python_version < "3.15" parse==1.19.0 ; python_version >= "3.10" and python_version < "3.15" -pathspec==0.12.1 ; python_version >= "3.10" and python_version < "3.15" +pathspec==1.0.4 ; python_version >= "3.10" and python_version < "3.15" pefile==2022.5.30 ; python_version >= "3.10" and python_version < "3.15" and sys_platform == "win32" platformdirs==2.5.2 ; python_version >= "3.10" and python_version < "3.15" pluggy==1.5.0 ; python_version >= "3.10" and python_version < "3.15" @@ -48,14 +48,14 @@ pydocstyle==6.3.0 ; python_version >= "3.10" and python_version < "3.15" pygments==2.19.2 ; python_version >= "3.10" and python_version < "3.15" pyinstaller-hooks-contrib==2025.10 ; python_version >= "3.10" and python_version < "3.15" pyinstaller==6.18.0 ; python_version >= "3.10" and python_version < "3.15" -pylint==3.3.9 ; python_version >= "3.10" and python_version < "3.15" +pylint==4.0.4 ; python_version >= "3.10" and python_version < "3.15" pymdown-extensions==10.16.1 ; python_version >= "3.10" and python_version < "3.15" pync==2.0.3 ; python_version >= "3.10" and python_version < "3.15" and sys_platform == "darwin" pytest-cov==7.0.0 ; python_version >= "3.10" and python_version < "3.15" pytest-describe==3.1.0 ; python_version >= "3.10" and python_version < "3.15" pytest-expecter==3.0 ; python_version >= "3.10" and python_version < "3.15" pytest-random==0.2 ; python_version >= "3.10" and python_version < "3.15" -pytest==8.4.2 ; python_version >= "3.10" and python_version < "3.15" +pytest==9.0.2 ; python_version >= "3.10" and python_version < "3.15" python-dateutil==2.8.2 ; python_version >= "3.10" and python_version < "3.15" python-termstyle==0.1.10 ; python_version >= "3.10" and python_version < "3.15" pytokens==0.3.0 ; python_version >= "3.10" and python_version < "3.15" diff --git a/gitman/models/source.py b/gitman/models/source.py index 2f21f180..29471506 100644 --- a/gitman/models/source.py +++ b/gitman/models/source.py @@ -386,9 +386,7 @@ def _invalid_repository(self): Not a valid repository: {} During install you can rebuild a repo with a missing .git directory using the --force option - """.format( - path - ) + """.format(path) return exceptions.InvalidRepository(msg) diff --git a/poetry.lock b/poetry.lock index 9ae98710..4c026b3a 100644 --- a/poetry.lock +++ b/poetry.lock @@ -29,46 +29,46 @@ typing-extensions = {version = ">=4", markers = "python_version < \"3.11\""} [[package]] name = "black" -version = "25.12.0" +version = "26.1.0" description = "The uncompromising code formatter." optional = false python-versions = ">=3.10" groups = ["dev"] files = [ - {file = "black-25.12.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:f85ba1ad15d446756b4ab5f3044731bf68b777f8f9ac9cdabd2425b97cd9c4e8"}, - {file = "black-25.12.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:546eecfe9a3a6b46f9d69d8a642585a6eaf348bcbbc4d87a19635570e02d9f4a"}, - {file = "black-25.12.0-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:17dcc893da8d73d8f74a596f64b7c98ef5239c2cd2b053c0f25912c4494bf9ea"}, - {file = "black-25.12.0-cp310-cp310-win_amd64.whl", hash = "sha256:09524b0e6af8ba7a3ffabdfc7a9922fb9adef60fed008c7cd2fc01f3048e6e6f"}, - {file = "black-25.12.0-cp310-cp310-win_arm64.whl", hash = "sha256:b162653ed89eb942758efeb29d5e333ca5bb90e5130216f8369857db5955a7da"}, - {file = "black-25.12.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:d0cfa263e85caea2cff57d8f917f9f51adae8e20b610e2b23de35b5b11ce691a"}, - {file = "black-25.12.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:1a2f578ae20c19c50a382286ba78bfbeafdf788579b053d8e4980afb079ab9be"}, - {file = "black-25.12.0-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:d3e1b65634b0e471d07ff86ec338819e2ef860689859ef4501ab7ac290431f9b"}, - {file = "black-25.12.0-cp311-cp311-win_amd64.whl", hash = "sha256:a3fa71e3b8dd9f7c6ac4d818345237dfb4175ed3bf37cd5a581dbc4c034f1ec5"}, - {file = "black-25.12.0-cp311-cp311-win_arm64.whl", hash = "sha256:51e267458f7e650afed8445dc7edb3187143003d52a1b710c7321aef22aa9655"}, - {file = "black-25.12.0-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:31f96b7c98c1ddaeb07dc0f56c652e25bdedaac76d5b68a059d998b57c55594a"}, - {file = "black-25.12.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:05dd459a19e218078a1f98178c13f861fe6a9a5f88fc969ca4d9b49eb1809783"}, - {file = "black-25.12.0-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:c1f68c5eff61f226934be6b5b80296cf6939e5d2f0c2f7d543ea08b204bfaf59"}, - {file = "black-25.12.0-cp312-cp312-win_amd64.whl", hash = "sha256:274f940c147ddab4442d316b27f9e332ca586d39c85ecf59ebdea82cc9ee8892"}, - {file = "black-25.12.0-cp312-cp312-win_arm64.whl", hash = "sha256:169506ba91ef21e2e0591563deda7f00030cb466e747c4b09cb0a9dae5db2f43"}, - {file = "black-25.12.0-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:a05ddeb656534c3e27a05a29196c962877c83fa5503db89e68857d1161ad08a5"}, - {file = "black-25.12.0-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:9ec77439ef3e34896995503865a85732c94396edcc739f302c5673a2315e1e7f"}, - {file = "black-25.12.0-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:0e509c858adf63aa61d908061b52e580c40eae0dfa72415fa47ac01b12e29baf"}, - {file = "black-25.12.0-cp313-cp313-win_amd64.whl", hash = "sha256:252678f07f5bac4ff0d0e9b261fbb029fa530cfa206d0a636a34ab445ef8ca9d"}, - {file = "black-25.12.0-cp313-cp313-win_arm64.whl", hash = "sha256:bc5b1c09fe3c931ddd20ee548511c64ebf964ada7e6f0763d443947fd1c603ce"}, - {file = "black-25.12.0-cp314-cp314-macosx_10_15_x86_64.whl", hash = "sha256:0a0953b134f9335c2434864a643c842c44fba562155c738a2a37a4d61f00cad5"}, - {file = "black-25.12.0-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:2355bbb6c3b76062870942d8cc450d4f8ac71f9c93c40122762c8784df49543f"}, - {file = "black-25.12.0-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:9678bd991cc793e81d19aeeae57966ee02909877cb65838ccffef24c3ebac08f"}, - {file = "black-25.12.0-cp314-cp314-win_amd64.whl", hash = "sha256:97596189949a8aad13ad12fcbb4ae89330039b96ad6742e6f6b45e75ad5cfd83"}, - {file = "black-25.12.0-cp314-cp314-win_arm64.whl", hash = "sha256:778285d9ea197f34704e3791ea9404cd6d07595745907dd2ce3da7a13627b29b"}, - {file = "black-25.12.0-py3-none-any.whl", hash = "sha256:48ceb36c16dbc84062740049eef990bb2ce07598272e673c17d1a7720c71c828"}, - {file = "black-25.12.0.tar.gz", hash = "sha256:8d3dd9cea14bff7ddc0eb243c811cdb1a011ebb4800a5f0335a01a68654796a7"}, + {file = "black-26.1.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:ca699710dece84e3ebf6e92ee15f5b8f72870ef984bf944a57a777a48357c168"}, + {file = "black-26.1.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:5e8e75dabb6eb83d064b0db46392b25cabb6e784ea624219736e8985a6b3675d"}, + {file = "black-26.1.0-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:eb07665d9a907a1a645ee41a0df8a25ffac8ad9c26cdb557b7b88eeeeec934e0"}, + {file = "black-26.1.0-cp310-cp310-win_amd64.whl", hash = "sha256:7ed300200918147c963c87700ccf9966dceaefbbb7277450a8d646fc5646bf24"}, + {file = "black-26.1.0-cp310-cp310-win_arm64.whl", hash = "sha256:c5b7713daea9bf943f79f8c3b46f361cc5229e0e604dcef6a8bb6d1c37d9df89"}, + {file = "black-26.1.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:3cee1487a9e4c640dc7467aaa543d6c0097c391dc8ac74eb313f2fbf9d7a7cb5"}, + {file = "black-26.1.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:d62d14ca31c92adf561ebb2e5f2741bf8dea28aef6deb400d49cca011d186c68"}, + {file = "black-26.1.0-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:fb1dafbbaa3b1ee8b4550a84425aac8874e5f390200f5502cf3aee4a2acb2f14"}, + {file = "black-26.1.0-cp311-cp311-win_amd64.whl", hash = "sha256:101540cb2a77c680f4f80e628ae98bd2bd8812fb9d72ade4f8995c5ff019e82c"}, + {file = "black-26.1.0-cp311-cp311-win_arm64.whl", hash = "sha256:6f3977a16e347f1b115662be07daa93137259c711e526402aa444d7a88fdc9d4"}, + {file = "black-26.1.0-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:6eeca41e70b5f5c84f2f913af857cf2ce17410847e1d54642e658e078da6544f"}, + {file = "black-26.1.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:dd39eef053e58e60204f2cdf059e2442e2eb08f15989eefe259870f89614c8b6"}, + {file = "black-26.1.0-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:9459ad0d6cd483eacad4c6566b0f8e42af5e8b583cee917d90ffaa3778420a0a"}, + {file = "black-26.1.0-cp312-cp312-win_amd64.whl", hash = "sha256:a19915ec61f3a8746e8b10adbac4a577c6ba9851fa4a9e9fbfbcf319887a5791"}, + {file = "black-26.1.0-cp312-cp312-win_arm64.whl", hash = "sha256:643d27fb5facc167c0b1b59d0315f2674a6e950341aed0fc05cf307d22bf4954"}, + {file = "black-26.1.0-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:ba1d768fbfb6930fc93b0ecc32a43d8861ded16f47a40f14afa9bb04ab93d304"}, + {file = "black-26.1.0-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:2b807c240b64609cb0e80d2200a35b23c7df82259f80bef1b2c96eb422b4aac9"}, + {file = "black-26.1.0-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:1de0f7d01cc894066a1153b738145b194414cc6eeaad8ef4397ac9abacf40f6b"}, + {file = "black-26.1.0-cp313-cp313-win_amd64.whl", hash = "sha256:91a68ae46bf07868963671e4d05611b179c2313301bd756a89ad4e3b3db2325b"}, + {file = "black-26.1.0-cp313-cp313-win_arm64.whl", hash = "sha256:be5e2fe860b9bd9edbf676d5b60a9282994c03fbbd40fe8f5e75d194f96064ca"}, + {file = "black-26.1.0-cp314-cp314-macosx_10_15_x86_64.whl", hash = "sha256:9dc8c71656a79ca49b8d3e2ce8103210c9481c57798b48deeb3a8bb02db5f115"}, + {file = "black-26.1.0-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:b22b3810451abe359a964cc88121d57f7bce482b53a066de0f1584988ca36e79"}, + {file = "black-26.1.0-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:53c62883b3f999f14e5d30b5a79bd437236658ad45b2f853906c7cbe79de00af"}, + {file = "black-26.1.0-cp314-cp314-win_amd64.whl", hash = "sha256:f016baaadc423dc960cdddf9acae679e71ee02c4c341f78f3179d7e4819c095f"}, + {file = "black-26.1.0-cp314-cp314-win_arm64.whl", hash = "sha256:66912475200b67ef5a0ab665011964bf924745103f51977a78b4fb92a9fc1bf0"}, + {file = "black-26.1.0-py3-none-any.whl", hash = "sha256:1054e8e47ebd686e078c0bb0eaf31e6ce69c966058d122f2c0c950311f9f3ede"}, + {file = "black-26.1.0.tar.gz", hash = "sha256:d294ac3340eef9c9eb5d29288e96dc719ff269a88e27b396340459dd85da4c58"}, ] [package.dependencies] click = ">=8.0.0" mypy-extensions = ">=0.4.3" packaging = ">=22.0" -pathspec = ">=0.9.0" +pathspec = ">=1.0.0" platformdirs = ">=2" pytokens = ">=0.3.0" tomli = {version = ">=1.1.0", markers = "python_version < \"3.11\""} @@ -919,16 +919,22 @@ files = [ [[package]] name = "pathspec" -version = "0.12.1" +version = "1.0.4" description = "Utility library for gitignore style pattern matching of file paths." optional = false -python-versions = ">=3.8" +python-versions = ">=3.9" groups = ["dev"] files = [ - {file = "pathspec-0.12.1-py3-none-any.whl", hash = "sha256:a0d503e138a4c123b27490a4f7beda6a01c6f288df0e4a8b79c7eb0dc7b4cc08"}, - {file = "pathspec-0.12.1.tar.gz", hash = "sha256:a482d51503a1ab33b1c67a6c3813a26953dbdc71c31dacaef9a838c4e29f5712"}, + {file = "pathspec-1.0.4-py3-none-any.whl", hash = "sha256:fb6ae2fd4e7c921a165808a552060e722767cfa526f99ca5156ed2ce45a5c723"}, + {file = "pathspec-1.0.4.tar.gz", hash = "sha256:0210e2ae8a21a9137c0d470578cb0e595af87edaa6ebf12ff176f14a02e0e645"}, ] +[package.extras] +hyperscan = ["hyperscan (>=0.7)"] +optional = ["typing-extensions (>=4)"] +re2 = ["google-re2 (>=1.1)"] +tests = ["pytest (>=9)", "typing-extensions (>=4.15)"] + [[package]] name = "pefile" version = "2022.5.30" @@ -1804,4 +1810,4 @@ watchmedo = ["PyYAML (>=3.10)"] [metadata] lock-version = "2.1" python-versions = "^3.10,<3.15" -content-hash = "7e9aba4e76f2fdd2dea76aadc11c361224bf7151abbdb1a041f631a8dae5138c" +content-hash = "80e6893aad631b72e89119cf3c9981c5774e3637b91519baa82dda8e1abc408e" diff --git a/pyproject.toml b/pyproject.toml index 316ad76c..f756781d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -52,7 +52,7 @@ universal-startfile = ">=0.2,<0.5" [tool.poetry.group.dev.dependencies] # Formatters -black = ">=24.8,<26.0" +black = ">=24.8,<27.0" isort = ">=5.13,<7.0" # Linters diff --git a/tests/test_api.py b/tests/test_api.py index 5de4c56c..207028f0 100644 --- a/tests/test_api.py +++ b/tests/test_api.py @@ -98,8 +98,7 @@ def it_creates_a_new_config_file(tmpdir): expect(gitman.init()) == True - expect(Config().datafile.text) == strip( - """ + expect(Config().datafile.text) == strip(""" location: gitman_sources sources: - repo: https://github.com/githubtraining/hellogitworld @@ -132,8 +131,7 @@ def it_creates_a_new_config_file(tmpdir): default_group: '' groups: - - """ - ) + """) def it_does_not_modify_existing_config_file(config): expect(gitman.init()) == False @@ -155,8 +153,7 @@ def it_should_not_modify_config(config): expect(config.datafile.text) == CONFIG def it_merges_sources(config): - config.datafile.text = strip( - """ + config.datafile.text = strip(""" location: deps sources: - repo: https://github.com/mrpossoms/gitman-demo-submodule @@ -191,8 +188,7 @@ def it_merges_sources(config): - patches: - - """ - ) + """) config.datafile.load() expect(gitman.install(depth=1)) == True @@ -207,8 +203,7 @@ def it_merges_sources(config): ) == True def it_can_handle_missing_locked_sources(config): - config.datafile.text = strip( - """ + config.datafile.text = strip(""" location: deps sources: - repo: https://github.com/jacebrowning/gitman-demo @@ -233,8 +228,7 @@ def it_can_handle_missing_locked_sources(config): - patches: - - """ - ) + """) config.datafile.load() expect(gitman.install("gitman_1", depth=1)) == True @@ -255,8 +249,7 @@ def it_detects_invalid_repositories(config): def describe_links(): @pytest.fixture def config_with_link(config): - config.datafile.text = strip( - """ + config.datafile.text = strip(""" location: deps sources: - name: gitman_1 @@ -266,8 +259,7 @@ def config_with_link(config): - target: my_link scripts: - - """ - ) + """) config.datafile.load() return config @@ -298,8 +290,7 @@ def it_overwrites_files_with_force(config_with_link): def describe_multi_links(): @pytest.fixture def config_with_links(config): - config.datafile.text = strip( - """ + config.datafile.text = strip(""" location: deps sources: - name: gitman_1 @@ -312,8 +303,7 @@ def config_with_links(config): target: gmd_4 scripts: - - """ - ) + """) config.datafile.load() return config @@ -344,8 +334,7 @@ def it_overwrites_files_with_force(config_with_links): def describe_scripts(): @pytest.fixture def config_with_scripts(config): - config.datafile.text = strip( - """ + config.datafile.text = strip(""" location: deps sources: - name: gitman_1 @@ -357,8 +346,7 @@ def config_with_scripts(config): - scripts: - make foobar - """ - ) + """) config.datafile.load() return config @@ -373,8 +361,7 @@ def script_failures_can_be_ignored(config_with_scripts): def describe_sparse_paths(): @pytest.fixture def config_with_scripts(config): - config.datafile.text = strip( - """ + config.datafile.text = strip(""" location: deps sources: - name: gitman_1 @@ -388,8 +375,7 @@ def config_with_scripts(config): - scripts: - - """ - ) + """) config.datafile.load() return config @@ -408,8 +394,7 @@ def it_contains_only_the_sparse_paths(config): def describe_mixed_names(): @pytest.fixture def config_with_group(config): - config.datafile.text = strip( - """ + config.datafile.text = strip(""" location: deps sources: - name: gitman_1 @@ -442,8 +427,7 @@ def config_with_group(config): members: - gitman_1 - gitman_2 - """ - ) + """) config.datafile.load() return config @@ -472,8 +456,7 @@ def group_and_redundant_source_install_successfully(config_with_group): def describe_default_group(): @pytest.fixture def config_with_default_group(config): - config.datafile.text = strip( - """ + config.datafile.text = strip(""" location: deps sources: - repo: https://github.com/jacebrowning/gitman-demo @@ -510,16 +493,14 @@ def config_with_default_group(config): members: - gitman_2 default_group: 'main' - """ - ) + """) config.datafile.load() return config @pytest.fixture def config_without_default_group(config): - config.datafile.text = strip( - """ + config.datafile.text = strip(""" location: deps sources: - repo: https://github.com/jacebrowning/gitman-demo @@ -556,8 +537,7 @@ def config_without_default_group(config): members: - gitman_2 default_group: '' - """ - ) + """) config.datafile.load() return config @@ -663,8 +643,7 @@ def it_should_not_modify_config(config): expect(config.datafile.text) == CONFIG def it_locks_previously_unlocked_dependencies(config): - config.datafile.text = strip( - """ + config.datafile.text = strip(""" location: deps sources: - repo: https://github.com/jacebrowning/gitman-demo @@ -709,15 +688,13 @@ def it_locks_previously_unlocked_dependencies(config): - groups: - - """ - ) + """) config.datafile.load() gitman.update(depth=1) config.datafile.load() - expect(config.datafile.text) == strip( - """ + expect(config.datafile.text) == strip(""" location: deps sources: - repo: https://github.com/jacebrowning/gitman-demo @@ -763,12 +740,10 @@ def it_locks_previously_unlocked_dependencies(config): groups: - default_group: '' - """ - ) + """) def it_should_not_lock_dependencies_when_disabled(config): - config.datafile.text = strip( - """ + config.datafile.text = strip(""" location: deps sources: - repo: https://github.com/jacebrowning/gitman-demo @@ -813,14 +788,12 @@ def it_should_not_lock_dependencies_when_disabled(config): - groups: - - """ - ) + """) config.datafile.load() gitman.update(depth=1, lock=False) - expect(config.datafile.text) == strip( - """ + expect(config.datafile.text) == strip(""" location: deps sources: - repo: https://github.com/jacebrowning/gitman-demo @@ -866,12 +839,10 @@ def it_should_not_lock_dependencies_when_disabled(config): groups: - default_group: '' - """ - ) + """) def it_should_not_allow_source_and_group_name_conflicts(config): - config.datafile.text = strip( - """ + config.datafile.text = strip(""" location: deps sources: - name: gitman_1 @@ -889,16 +860,14 @@ def it_should_not_allow_source_and_group_name_conflicts(config): members: - gitman_1 - gitman_2 - """ - ) + """) config.datafile.load() with pytest.raises(InvalidConfig): gitman.update(depth=1, lock=True) def it_locks_previously_locked_dependencies_by_group_name(config): - config.datafile.text = strip( - """ + config.datafile.text = strip(""" location: deps sources: - repo: https://github.com/jacebrowning/gitman-demo @@ -972,15 +941,13 @@ def it_locks_previously_locked_dependencies_by_group_name(config): members: - gitman_1 - gitman_2 - """ - ) + """) config.datafile.load() gitman.update("group_a", depth=1) config.datafile.load() - expect(config.datafile.text) == strip( - """ + expect(config.datafile.text) == strip(""" location: deps sources: - repo: https://github.com/jacebrowning/gitman-demo @@ -1055,8 +1022,7 @@ def it_locks_previously_locked_dependencies_by_group_name(config): - gitman_1 - gitman_2 default_group: '' - """ - ) + """) def it_should_not_lock_dependencies_changes_force_interactive_no( config, monkeypatch @@ -1075,8 +1041,7 @@ def git_changes( # with no to skip the force process monkeypatch.setattr("builtins.input", lambda x: "n") - config.datafile.text = strip( - """ + config.datafile.text = strip(""" location: deps sources: - repo: https://github.com/jacebrowning/gitman-demo @@ -1108,14 +1073,12 @@ def git_changes( - groups: - - """ - ) + """) config.datafile.load() gitman.update(depth=1, force_interactive=True) - expect(config.datafile.text) == strip( - """ + expect(config.datafile.text) == strip(""" location: deps sources: - repo: https://github.com/jacebrowning/gitman-demo @@ -1148,8 +1111,7 @@ def git_changes( groups: - default_group: '' - """ - ) + """) def it_locks_dependencies_changes_force_interactive_yes(config, monkeypatch): def git_changes( @@ -1175,8 +1137,7 @@ def git_changes( # with yes to invoke the force process monkeypatch.setattr("builtins.input", lambda x: "y") - config.datafile.text = strip( - """ + config.datafile.text = strip(""" location: deps sources: - repo: https://github.com/jacebrowning/gitman-demo @@ -1208,15 +1169,13 @@ def git_changes( - groups: - - """ - ) + """) config.datafile.load() gitman.update(depth=1, force_interactive=True) config.datafile.load() - expect(config.datafile.text) == strip( - """ + expect(config.datafile.text) == strip(""" location: deps sources: - repo: https://github.com/jacebrowning/gitman-demo @@ -1249,12 +1208,10 @@ def git_changes( groups: - default_group: '' - """ - ) + """) def it_merges_sources(config): - config.datafile.text = strip( - """ + config.datafile.text = strip(""" location: deps sources: - repo: https://github.com/jacebrowning/gitman-demo @@ -1289,8 +1246,7 @@ def it_merges_sources(config): - patches: - - """ - ) + """) config.datafile.load() expect(gitman.install(depth=1)) == True @@ -1343,9 +1299,7 @@ def it_records_all_versions_when_no_arguments(config): expect(gitman.lock(depth=1)) == True config.datafile.load() - expect(config.datafile.text).contains( - strip( - """ + expect(config.datafile.text).contains(strip(""" sources_locked: - repo: https://github.com/jacebrowning/gitman-demo name: gitman_1 @@ -1386,18 +1340,14 @@ def it_records_all_versions_when_no_arguments(config): - patches: - - """ - ) - ) + """)) def it_records_specified_dependencies(config): expect(gitman.update(depth=1, lock=False)) == True expect(gitman.lock("gitman_1", "gitman_3", depth=1)) == True config.datafile.load() - expect(config.datafile.text).contains( - strip( - """ + expect(config.datafile.text).contains(strip(""" sources_locked: - repo: https://github.com/jacebrowning/gitman-demo name: gitman_1 @@ -1425,9 +1375,7 @@ def it_records_specified_dependencies(config): - patches: - - """ - ) - ) + """)) def it_should_fail_on_dirty_repositories(config): expect(gitman.update(depth=1, lock=False)) == True