diff --git a/poetry.lock b/poetry.lock index e3d4b3c..42742ed 100644 --- a/poetry.lock +++ b/poetry.lock @@ -2,20 +2,22 @@ [[package]] name = "astroid" -version = "2.11.7" +version = "2.15.6" description = "An abstract syntax tree for Python with inference support." optional = false -python-versions = ">=3.6.2" +python-versions = ">=3.7.2" files = [ - {file = "astroid-2.11.7-py3-none-any.whl", hash = "sha256:86b0a340a512c65abf4368b80252754cda17c02cdbbd3f587dddf98112233e7b"}, - {file = "astroid-2.11.7.tar.gz", hash = "sha256:bb24615c77f4837c707669d16907331374ae8a964650a66999da3f5ca68dc946"}, + {file = "astroid-2.15.6-py3-none-any.whl", hash = "sha256:389656ca57b6108f939cf5d2f9a2a825a3be50ba9d589670f393236e0a03b91c"}, + {file = "astroid-2.15.6.tar.gz", hash = "sha256:903f024859b7c7687d7a7f3a3f73b17301f8e42dfd9cc9df9d4418172d3e2dbd"}, ] [package.dependencies] lazy-object-proxy = ">=1.4.0" -setuptools = ">=20.0" -typing-extensions = {version = ">=3.10", markers = "python_version < \"3.10\""} -wrapt = ">=1.11,<2" +typing-extensions = {version = ">=4.0.0", markers = "python_version < \"3.11\""} +wrapt = [ + {version = ">=1.11,<2", markers = "python_version < \"3.11\""}, + {version = ">=1.14,<2", markers = "python_version >= \"3.11\""}, +] [[package]] name = "black" @@ -359,27 +361,32 @@ testing = ["pytest", "pytest-benchmark"] [[package]] name = "pylint" -version = "2.13.9" +version = "2.17.4" description = "python code static checker" optional = false -python-versions = ">=3.6.2" +python-versions = ">=3.7.2" files = [ - {file = "pylint-2.13.9-py3-none-any.whl", hash = "sha256:705c620d388035bdd9ff8b44c5bcdd235bfb49d276d488dd2c8ff1736aa42526"}, - {file = "pylint-2.13.9.tar.gz", hash = "sha256:095567c96e19e6f57b5b907e67d265ff535e588fe26b12b5ebe1fc5645b2c731"}, + {file = "pylint-2.17.4-py3-none-any.whl", hash = "sha256:7a1145fb08c251bdb5cca11739722ce64a63db479283d10ce718b2460e54123c"}, + {file = "pylint-2.17.4.tar.gz", hash = "sha256:5dcf1d9e19f41f38e4e85d10f511e5b9c35e1aa74251bf95cdd8cb23584e2db1"}, ] [package.dependencies] -astroid = ">=2.11.5,<=2.12.0-dev0" -colorama = {version = "*", markers = "sys_platform == \"win32\""} -dill = ">=0.2" +astroid = ">=2.15.4,<=2.17.0-dev0" +colorama = {version = ">=0.4.5", markers = "sys_platform == \"win32\""} +dill = [ + {version = ">=0.2", markers = "python_version < \"3.11\""}, + {version = ">=0.3.6", markers = "python_version >= \"3.11\""}, +] isort = ">=4.2.5,<6" mccabe = ">=0.6,<0.8" platformdirs = ">=2.2.0" tomli = {version = ">=1.1.0", markers = "python_version < \"3.11\""} +tomlkit = ">=0.10.1" typing-extensions = {version = ">=3.10.0", markers = "python_version < \"3.10\""} [package.extras] -testutil = ["gitpython (>3)"] +spelling = ["pyenchant (>=3.2,<4.0)"] +testutils = ["gitpython (>3)"] [[package]] name = "pytest" @@ -422,30 +429,25 @@ pytest = ">=4.6" testing = ["fields", "hunter", "process-tests", "pytest-xdist", "six", "virtualenv"] [[package]] -name = "setuptools" -version = "65.6.3" -description = "Easily download, build, install, upgrade, and uninstall Python packages" +name = "tomli" +version = "2.0.1" +description = "A lil' TOML parser" optional = false python-versions = ">=3.7" files = [ - {file = "setuptools-65.6.3-py3-none-any.whl", hash = "sha256:57f6f22bde4e042978bcd50176fdb381d7c21a9efa4041202288d3737a0c6a54"}, - {file = "setuptools-65.6.3.tar.gz", hash = "sha256:a7620757bf984b58deaf32fc8a4577a9bbc0850cf92c20e1ce41c38c19e5fb75"}, + {file = "tomli-2.0.1-py3-none-any.whl", hash = "sha256:939de3e7a6161af0c887ef91b7d41a53e7c5a1ca976325f429cb46ea9bc30ecc"}, + {file = "tomli-2.0.1.tar.gz", hash = "sha256:de526c12914f0c550d15924c62d72abc48d6fe7364aa87328337a31007fe8a4f"}, ] -[package.extras] -docs = ["furo", "jaraco.packaging (>=9)", "jaraco.tidelift (>=1.4)", "pygments-github-lexers (==0.0.5)", "rst.linker (>=1.9)", "sphinx (>=3.5)", "sphinx-favicon", "sphinx-hoverxref (<2)", "sphinx-inline-tabs", "sphinx-notfound-page (==0.8.3)", "sphinx-reredirects", "sphinxcontrib-towncrier"] -testing = ["build[virtualenv]", "filelock (>=3.4.0)", "flake8 (<5)", "flake8-2020", "ini2toml[lite] (>=0.9)", "jaraco.envs (>=2.2)", "jaraco.path (>=3.2.0)", "pip (>=19.1)", "pip-run (>=8.8)", "pytest (>=6)", "pytest-black (>=0.3.7)", "pytest-checkdocs (>=2.4)", "pytest-cov", "pytest-enabler (>=1.3)", "pytest-flake8", "pytest-mypy (>=0.9.1)", "pytest-perf", "pytest-timeout", "pytest-xdist", "tomli-w (>=1.0.0)", "virtualenv (>=13.0.0)", "wheel"] -testing-integration = ["build[virtualenv]", "filelock (>=3.4.0)", "jaraco.envs (>=2.2)", "jaraco.path (>=3.2.0)", "pytest", "pytest-enabler", "pytest-xdist", "tomli", "virtualenv (>=13.0.0)", "wheel"] - [[package]] -name = "tomli" -version = "2.0.1" -description = "A lil' TOML parser" +name = "tomlkit" +version = "0.11.8" +description = "Style preserving TOML library" optional = false python-versions = ">=3.7" files = [ - {file = "tomli-2.0.1-py3-none-any.whl", hash = "sha256:939de3e7a6161af0c887ef91b7d41a53e7c5a1ca976325f429cb46ea9bc30ecc"}, - {file = "tomli-2.0.1.tar.gz", hash = "sha256:de526c12914f0c550d15924c62d72abc48d6fe7364aa87328337a31007fe8a4f"}, + {file = "tomlkit-0.11.8-py3-none-any.whl", hash = "sha256:8c726c4c202bdb148667835f68d68780b9a003a9ec34167b6c673b38eff2a171"}, + {file = "tomlkit-0.11.8.tar.gz", hash = "sha256:9330fc7faa1db67b541b28e62018c17d20be733177d290a13b24c62d1614e0c3"}, ] [[package]] @@ -535,4 +537,4 @@ files = [ [metadata] lock-version = "2.0" python-versions = "^3.8" -content-hash = "86017a3390178aeee25c75386a317866332b613601045f49ab4a94fd29506ed5" +content-hash = "a95fbf06c6359b5b7c3537de8aef2887e8fed936cad6682a42d44d1692db41df" diff --git a/pyproject.toml b/pyproject.toml index 19df950..0ec7eea 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -27,7 +27,7 @@ python = "^3.8" black = "^23.7" isort = "^5.12.0" mypy = "^1.4" -pylint = "^2.13.9" +pylint = "^2.17.4" pytest = "^7.4.0" pytest-cov = "^4.1.0" diff --git a/tests/issues/test_issue96.py b/tests/issues/test_issue96.py index 85cc25e..1381837 100644 --- a/tests/issues/test_issue96.py +++ b/tests/issues/test_issue96.py @@ -40,7 +40,7 @@ def test() -> None: with pytest.raises( AwesomeVersionStrategyException, match=re.escape( - "Strategy unknown does not match ['SemVer'" ", 'CalVer'] for whatever" + "Strategy unknown does not match ['SemVer', 'CalVer'] for whatever" ), ): AwesomeVersion( @@ -53,6 +53,6 @@ def test() -> None: with pytest.raises( AwesomeVersionStrategyException, - match=re.escape("Strategy CalVer does not match ['SemVer']" " for 2021.12"), + match=re.escape("Strategy CalVer does not match ['SemVer'] for 2021.12"), ): AwesomeVersion("2021.12", ensure_strategy=AwesomeVersionStrategy.SEMVER) diff --git a/tests/test_awesomeversion.py b/tests/test_awesomeversion.py index 2e09b19..4c74a63 100644 --- a/tests/test_awesomeversion.py +++ b/tests/test_awesomeversion.py @@ -247,7 +247,7 @@ def test_diff() -> None: diff = version - "2021.12.1" assert diff.major - assert diff.__repr__().startswith("AwesomeVersionDiff(") + assert repr(diff).startswith("AwesomeVersionDiff(") with pytest.raises(AwesomeVersionException): version.diff(None) diff --git a/tests/test_version_scheme.py b/tests/test_version_scheme.py index 7e7bc02..9ea371d 100644 --- a/tests/test_version_scheme.py +++ b/tests/test_version_scheme.py @@ -61,7 +61,9 @@ def test_named_sections() -> None: def test_named_sections_invalid() -> None: """Test invalid named sections.""" version = AwesomeVersion("latest") - assert version.major == version.year is None + assert version.major is None assert version.minor is None assert version.patch is None - assert version.micro == version.patch is None + + assert version.year == version.major + assert version.micro == version.patch