diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 11bc862..6f75703 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -22,6 +22,7 @@ jobs: run: | python -m pip install --upgrade pip pip install poetry + poetry env use ${{ matrix.python-version }} poetry install - name: Run tests run: | diff --git a/plugins/yls-yara/pyproject.toml b/plugins/yls-yara/pyproject.toml index d86e953..d905fc6 100644 --- a/plugins/yls-yara/pyproject.toml +++ b/plugins/yls-yara/pyproject.toml @@ -9,7 +9,7 @@ license = "MIT" include = ["py.typed", "LICENSE"] [tool.poetry.dependencies] -python = ">=3.8,<3.12" +python = "^3.8" yara-python = "^4.2.0" yls = "^1.4.0" diff --git a/poetry.lock b/poetry.lock index a265936..a334a80 100644 --- a/poetry.lock +++ b/poetry.lock @@ -2,22 +2,17 @@ [[package]] name = "astroid" -version = "2.12.13" +version = "3.0.2" description = "An abstract syntax tree for Python with inference support." optional = false -python-versions = ">=3.7.2" +python-versions = ">=3.8.0" files = [ - {file = "astroid-2.12.13-py3-none-any.whl", hash = "sha256:10e0ad5f7b79c435179d0d0f0df69998c4eef4597534aae44910db060baeb907"}, - {file = "astroid-2.12.13.tar.gz", hash = "sha256:1493fe8bd3dfd73dc35bd53c9d5b6e49ead98497c47b2307662556a5692d29d7"}, + {file = "astroid-3.0.2-py3-none-any.whl", hash = "sha256:d6e62862355f60e716164082d6b4b041d38e2a8cf1c7cd953ded5108bac8ff5c"}, + {file = "astroid-3.0.2.tar.gz", hash = "sha256:4a61cf0a59097c7bb52689b0fd63717cd2a8a14dc9f1eee97b82d814881c8c91"}, ] [package.dependencies] -lazy-object-proxy = ">=1.4.0" -typing-extensions = {version = ">=3.10", markers = "python_version < \"3.10\""} -wrapt = [ - {version = ">=1.11,<2", markers = "python_version < \"3.11\""}, - {version = ">=1.14,<2", markers = "python_version >= \"3.11\""}, -] +typing-extensions = {version = ">=4.0.0", markers = "python_version < \"3.11\""} [[package]] name = "attrs" @@ -199,6 +194,20 @@ files = [ [package.extras] graph = ["objgraph (>=1.7.2)"] +[[package]] +name = "dill" +version = "0.3.7" +description = "serialize all of Python" +optional = false +python-versions = ">=3.7" +files = [ + {file = "dill-0.3.7-py3-none-any.whl", hash = "sha256:76b122c08ef4ce2eedcd4d1abd8e641114bfc6c2867f49f3c41facf65bf19f5e"}, + {file = "dill-0.3.7.tar.gz", hash = "sha256:cc1c8b182eb3013e24bd475ff2e9295af86c1a38eb1aff128dac8962a9ce3c03"}, +] + +[package.extras] +graph = ["objgraph (>=1.7.2)"] + [[package]] name = "exceptiongroup" version = "1.0.4" @@ -275,34 +284,6 @@ pipfile-deprecated-finder = ["pipreqs", "requirementslib"] plugins = ["setuptools"] requirements-deprecated-finder = ["pip-api", "pipreqs"] -[[package]] -name = "lazy-object-proxy" -version = "1.8.0" -description = "A fast and thorough lazy object proxy." -optional = false -python-versions = ">=3.7" -files = [ - {file = "lazy-object-proxy-1.8.0.tar.gz", hash = "sha256:c219a00245af0f6fa4e95901ed28044544f50152840c5b6a3e7b2568db34d156"}, - {file = "lazy_object_proxy-1.8.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:4fd031589121ad46e293629b39604031d354043bb5cdf83da4e93c2d7f3389fe"}, - {file = "lazy_object_proxy-1.8.0-cp310-cp310-win32.whl", hash = "sha256:b70d6e7a332eb0217e7872a73926ad4fdc14f846e85ad6749ad111084e76df25"}, - {file = "lazy_object_proxy-1.8.0-cp310-cp310-win_amd64.whl", hash = "sha256:eb329f8d8145379bf5dbe722182410fe8863d186e51bf034d2075eb8d85ee25b"}, - {file = "lazy_object_proxy-1.8.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:4e2d9f764f1befd8bdc97673261b8bb888764dfdbd7a4d8f55e4fbcabb8c3fb7"}, - {file = "lazy_object_proxy-1.8.0-cp311-cp311-win32.whl", hash = "sha256:e20bfa6db17a39c706d24f82df8352488d2943a3b7ce7d4c22579cb89ca8896e"}, - {file = "lazy_object_proxy-1.8.0-cp311-cp311-win_amd64.whl", hash = "sha256:14010b49a2f56ec4943b6cf925f597b534ee2fe1f0738c84b3bce0c1a11ff10d"}, - {file = "lazy_object_proxy-1.8.0-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:6850e4aeca6d0df35bb06e05c8b934ff7c533734eb51d0ceb2d63696f1e6030c"}, - {file = "lazy_object_proxy-1.8.0-cp37-cp37m-win32.whl", hash = "sha256:5b51d6f3bfeb289dfd4e95de2ecd464cd51982fe6f00e2be1d0bf94864d58acd"}, - {file = "lazy_object_proxy-1.8.0-cp37-cp37m-win_amd64.whl", hash = "sha256:6f593f26c470a379cf7f5bc6db6b5f1722353e7bf937b8d0d0b3fba911998858"}, - {file = "lazy_object_proxy-1.8.0-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:0c1c7c0433154bb7c54185714c6929acc0ba04ee1b167314a779b9025517eada"}, - {file = "lazy_object_proxy-1.8.0-cp38-cp38-win32.whl", hash = "sha256:d176f392dbbdaacccf15919c77f526edf11a34aece58b55ab58539807b85436f"}, - {file = "lazy_object_proxy-1.8.0-cp38-cp38-win_amd64.whl", hash = "sha256:afcaa24e48bb23b3be31e329deb3f1858f1f1df86aea3d70cb5c8578bfe5261c"}, - {file = "lazy_object_proxy-1.8.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:71d9ae8a82203511a6f60ca5a1b9f8ad201cac0fc75038b2dc5fa519589c9288"}, - {file = "lazy_object_proxy-1.8.0-cp39-cp39-win32.whl", hash = "sha256:8f6ce2118a90efa7f62dd38c7dbfffd42f468b180287b748626293bf12ed468f"}, - {file = "lazy_object_proxy-1.8.0-cp39-cp39-win_amd64.whl", hash = "sha256:eac3a9a5ef13b332c059772fd40b4b1c3d45a3a2b05e33a361dee48e54a4dad0"}, - {file = "lazy_object_proxy-1.8.0-pp37-pypy37_pp73-any.whl", hash = "sha256:ae032743794fba4d171b5b67310d69176287b5bf82a21f588282406a79498891"}, - {file = "lazy_object_proxy-1.8.0-pp38-pypy38_pp73-any.whl", hash = "sha256:7e1561626c49cb394268edd00501b289053a652ed762c58e1081224c8d881cec"}, - {file = "lazy_object_proxy-1.8.0-pp39-pypy39_pp73-any.whl", hash = "sha256:ce58b2b3734c73e68f0e30e4e725264d4d6be95818ec0a0be4bb6bf9a7e79aa8"}, -] - [[package]] name = "lsprotocol" version = "2023.0.0b1" @@ -494,20 +475,24 @@ ws = ["websockets (>=11.0.3,<12.0.0)"] [[package]] name = "pylint" -version = "2.15.6" +version = "3.0.3" description = "python code static checker" optional = false -python-versions = ">=3.7.2" +python-versions = ">=3.8.0" files = [ - {file = "pylint-2.15.6-py3-none-any.whl", hash = "sha256:15060cc22ed6830a4049cf40bc24977744df2e554d38da1b2657591de5bcd052"}, - {file = "pylint-2.15.6.tar.gz", hash = "sha256:25b13ddcf5af7d112cf96935e21806c1da60e676f952efb650130f2a4483421c"}, + {file = "pylint-3.0.3-py3-none-any.whl", hash = "sha256:7a1585285aefc5165db81083c3e06363a27448f6b467b3b0f30dbd0ac1f73810"}, + {file = "pylint-3.0.3.tar.gz", hash = "sha256:58c2398b0301e049609a8429789ec6edf3aabe9b6c5fec916acd18639c16de8b"}, ] [package.dependencies] -astroid = ">=2.12.12,<=2.14.0-dev0" +astroid = ">=3.0.1,<=3.1.0-dev0" colorama = {version = ">=0.4.5", markers = "sys_platform == \"win32\""} -dill = ">=0.2" -isort = ">=4.2.5,<6" +dill = [ + {version = ">=0.2", markers = "python_version < \"3.11\""}, + {version = ">=0.3.7", markers = "python_version >= \"3.12\""}, + {version = ">=0.3.6", markers = "python_version >= \"3.11\" and python_version < \"3.12\""}, +] +isort = ">=4.2.5,<5.13.0 || >5.13.0,<6" mccabe = ">=0.6,<0.8" platformdirs = ">=2.2.0" tomli = {version = ">=1.1.0", markers = "python_version < \"3.11\""} @@ -648,26 +633,26 @@ pytest = [ [[package]] name = "pytest-pylint" -version = "0.19.0" +version = "0.21.0" description = "pytest plugin to check source code with pylint" optional = false python-versions = ">=3.7" files = [ - {file = "pytest-pylint-0.19.0.tar.gz", hash = "sha256:d88e83c1023c641548a9ec3567707ceee7616632a986af133426d4a74d066932"}, - {file = "pytest_pylint-0.19.0-py3-none-any.whl", hash = "sha256:b51d3f93bed9c192e2b046f16520981bee5abe7bd61b070306e7ee685219fdd3"}, + {file = "pytest-pylint-0.21.0.tar.gz", hash = "sha256:88764b8e1d5cfa18809248e0ccc2fc05035f08c35f0b0222ddcfea1c3c4e553e"}, + {file = "pytest_pylint-0.21.0-py3-none-any.whl", hash = "sha256:f10d9eaa72b9fbe624ee4b55da0481f56482eee0a467afc1ee3ae8b1fefbd0b4"}, ] [package.dependencies] -pylint = ">=2.3.0" -pytest = ">=5.4" -toml = ">=0.7.1" +pylint = ">=2.15.0" +pytest = ">=7.0" +tomli = {version = ">=1.1.0", markers = "python_version < \"3.11\""} [[package]] name = "pytest-yls" version = "1.4.0" description = "Pytest plugin to test the YLS as a whole." optional = false -python-versions = ">=3.8,<3.12" +python-versions = "^3.8" files = [] develop = true @@ -747,86 +732,13 @@ test = ["mypy (>=0.991)", "pytest (>=7)"] [[package]] name = "typing-extensions" -version = "4.4.0" -description = "Backported and Experimental Type Hints for Python 3.7+" +version = "4.9.0" +description = "Backported and Experimental Type Hints for Python 3.8+" optional = false -python-versions = ">=3.7" +python-versions = ">=3.8" files = [ - {file = "typing_extensions-4.4.0-py3-none-any.whl", hash = "sha256:16fa4864408f655d35ec496218b85f79b3437c829e93320c7c9215ccfd92489e"}, - {file = "typing_extensions-4.4.0.tar.gz", hash = "sha256:1511434bb92bf8dd198c12b1cc812e800d4181cfcb867674e0f8279cc93087aa"}, -] - -[[package]] -name = "wrapt" -version = "1.14.1" -description = "Module for decorators, wrappers and monkey patching." -optional = false -python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,>=2.7" -files = [ - {file = "wrapt-1.14.1-cp27-cp27m-macosx_10_9_x86_64.whl", hash = "sha256:1b376b3f4896e7930f1f772ac4b064ac12598d1c38d04907e696cc4d794b43d3"}, - {file = "wrapt-1.14.1-cp27-cp27m-manylinux1_i686.whl", hash = "sha256:903500616422a40a98a5a3c4ff4ed9d0066f3b4c951fa286018ecdf0750194ef"}, - {file = "wrapt-1.14.1-cp27-cp27m-manylinux1_x86_64.whl", hash = "sha256:5a9a0d155deafd9448baff28c08e150d9b24ff010e899311ddd63c45c2445e28"}, - {file = "wrapt-1.14.1-cp27-cp27m-manylinux2010_i686.whl", hash = "sha256:ddaea91abf8b0d13443f6dac52e89051a5063c7d014710dcb4d4abb2ff811a59"}, - {file = "wrapt-1.14.1-cp27-cp27m-manylinux2010_x86_64.whl", hash = "sha256:36f582d0c6bc99d5f39cd3ac2a9062e57f3cf606ade29a0a0d6b323462f4dd87"}, - {file = "wrapt-1.14.1-cp27-cp27mu-manylinux1_i686.whl", hash = "sha256:7ef58fb89674095bfc57c4069e95d7a31cfdc0939e2a579882ac7d55aadfd2a1"}, - {file = "wrapt-1.14.1-cp27-cp27mu-manylinux1_x86_64.whl", hash = "sha256:e2f83e18fe2f4c9e7db597e988f72712c0c3676d337d8b101f6758107c42425b"}, - {file = "wrapt-1.14.1-cp27-cp27mu-manylinux2010_i686.whl", hash = "sha256:ee2b1b1769f6707a8a445162ea16dddf74285c3964f605877a20e38545c3c462"}, - {file = "wrapt-1.14.1-cp27-cp27mu-manylinux2010_x86_64.whl", hash = "sha256:833b58d5d0b7e5b9832869f039203389ac7cbf01765639c7309fd50ef619e0b1"}, - {file = "wrapt-1.14.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:80bb5c256f1415f747011dc3604b59bc1f91c6e7150bd7db03b19170ee06b320"}, - {file = "wrapt-1.14.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:07f7a7d0f388028b2df1d916e94bbb40624c59b48ecc6cbc232546706fac74c2"}, - {file = "wrapt-1.14.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:02b41b633c6261feff8ddd8d11c711df6842aba629fdd3da10249a53211a72c4"}, - {file = "wrapt-1.14.1-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:2fe803deacd09a233e4762a1adcea5db5d31e6be577a43352936179d14d90069"}, - {file = "wrapt-1.14.1-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:257fd78c513e0fb5cdbe058c27a0624c9884e735bbd131935fd49e9fe719d310"}, - {file = "wrapt-1.14.1-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:4fcc4649dc762cddacd193e6b55bc02edca674067f5f98166d7713b193932b7f"}, - {file = "wrapt-1.14.1-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:11871514607b15cfeb87c547a49bca19fde402f32e2b1c24a632506c0a756656"}, - {file = "wrapt-1.14.1-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:8ad85f7f4e20964db4daadcab70b47ab05c7c1cf2a7c1e51087bfaa83831854c"}, - {file = "wrapt-1.14.1-cp310-cp310-win32.whl", hash = "sha256:a9a52172be0b5aae932bef82a79ec0a0ce87288c7d132946d645eba03f0ad8a8"}, - {file = "wrapt-1.14.1-cp310-cp310-win_amd64.whl", hash = "sha256:6d323e1554b3d22cfc03cd3243b5bb815a51f5249fdcbb86fda4bf62bab9e164"}, - {file = "wrapt-1.14.1-cp35-cp35m-manylinux1_i686.whl", hash = "sha256:43ca3bbbe97af00f49efb06e352eae40434ca9d915906f77def219b88e85d907"}, - {file = "wrapt-1.14.1-cp35-cp35m-manylinux1_x86_64.whl", hash = "sha256:6b1a564e6cb69922c7fe3a678b9f9a3c54e72b469875aa8018f18b4d1dd1adf3"}, - {file = "wrapt-1.14.1-cp35-cp35m-manylinux2010_i686.whl", hash = "sha256:00b6d4ea20a906c0ca56d84f93065b398ab74b927a7a3dbd470f6fc503f95dc3"}, - {file = "wrapt-1.14.1-cp35-cp35m-manylinux2010_x86_64.whl", hash = "sha256:a85d2b46be66a71bedde836d9e41859879cc54a2a04fad1191eb50c2066f6e9d"}, - {file = "wrapt-1.14.1-cp35-cp35m-win32.whl", hash = "sha256:dbcda74c67263139358f4d188ae5faae95c30929281bc6866d00573783c422b7"}, - {file = "wrapt-1.14.1-cp35-cp35m-win_amd64.whl", hash = "sha256:b21bb4c09ffabfa0e85e3a6b623e19b80e7acd709b9f91452b8297ace2a8ab00"}, - {file = "wrapt-1.14.1-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:9e0fd32e0148dd5dea6af5fee42beb949098564cc23211a88d799e434255a1f4"}, - {file = "wrapt-1.14.1-cp36-cp36m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:9736af4641846491aedb3c3f56b9bc5568d92b0692303b5a305301a95dfd38b1"}, - {file = "wrapt-1.14.1-cp36-cp36m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:5b02d65b9ccf0ef6c34cba6cf5bf2aab1bb2f49c6090bafeecc9cd81ad4ea1c1"}, - {file = "wrapt-1.14.1-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:21ac0156c4b089b330b7666db40feee30a5d52634cc4560e1905d6529a3897ff"}, - {file = "wrapt-1.14.1-cp36-cp36m-musllinux_1_1_aarch64.whl", hash = "sha256:9f3e6f9e05148ff90002b884fbc2a86bd303ae847e472f44ecc06c2cd2fcdb2d"}, - {file = "wrapt-1.14.1-cp36-cp36m-musllinux_1_1_i686.whl", hash = "sha256:6e743de5e9c3d1b7185870f480587b75b1cb604832e380d64f9504a0535912d1"}, - {file = "wrapt-1.14.1-cp36-cp36m-musllinux_1_1_x86_64.whl", hash = "sha256:d79d7d5dc8a32b7093e81e97dad755127ff77bcc899e845f41bf71747af0c569"}, - {file = "wrapt-1.14.1-cp36-cp36m-win32.whl", hash = "sha256:81b19725065dcb43df02b37e03278c011a09e49757287dca60c5aecdd5a0b8ed"}, - {file = "wrapt-1.14.1-cp36-cp36m-win_amd64.whl", hash = "sha256:b014c23646a467558be7da3d6b9fa409b2c567d2110599b7cf9a0c5992b3b471"}, - {file = "wrapt-1.14.1-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:88bd7b6bd70a5b6803c1abf6bca012f7ed963e58c68d76ee20b9d751c74a3248"}, - {file = "wrapt-1.14.1-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:b5901a312f4d14c59918c221323068fad0540e34324925c8475263841dbdfe68"}, - {file = "wrapt-1.14.1-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:d77c85fedff92cf788face9bfa3ebaa364448ebb1d765302e9af11bf449ca36d"}, - {file = "wrapt-1.14.1-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8d649d616e5c6a678b26d15ece345354f7c2286acd6db868e65fcc5ff7c24a77"}, - {file = "wrapt-1.14.1-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:7d2872609603cb35ca513d7404a94d6d608fc13211563571117046c9d2bcc3d7"}, - {file = "wrapt-1.14.1-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:ee6acae74a2b91865910eef5e7de37dc6895ad96fa23603d1d27ea69df545015"}, - {file = "wrapt-1.14.1-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:2b39d38039a1fdad98c87279b48bc5dce2c0ca0d73483b12cb72aa9609278e8a"}, - {file = "wrapt-1.14.1-cp37-cp37m-win32.whl", hash = "sha256:60db23fa423575eeb65ea430cee741acb7c26a1365d103f7b0f6ec412b893853"}, - {file = "wrapt-1.14.1-cp37-cp37m-win_amd64.whl", hash = "sha256:709fe01086a55cf79d20f741f39325018f4df051ef39fe921b1ebe780a66184c"}, - {file = "wrapt-1.14.1-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:8c0ce1e99116d5ab21355d8ebe53d9460366704ea38ae4d9f6933188f327b456"}, - {file = "wrapt-1.14.1-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:e3fb1677c720409d5f671e39bac6c9e0e422584e5f518bfd50aa4cbbea02433f"}, - {file = "wrapt-1.14.1-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:642c2e7a804fcf18c222e1060df25fc210b9c58db7c91416fb055897fc27e8cc"}, - {file = "wrapt-1.14.1-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:7b7c050ae976e286906dd3f26009e117eb000fb2cf3533398c5ad9ccc86867b1"}, - {file = "wrapt-1.14.1-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ef3f72c9666bba2bab70d2a8b79f2c6d2c1a42a7f7e2b0ec83bb2f9e383950af"}, - {file = "wrapt-1.14.1-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:01c205616a89d09827986bc4e859bcabd64f5a0662a7fe95e0d359424e0e071b"}, - {file = "wrapt-1.14.1-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:5a0f54ce2c092aaf439813735584b9537cad479575a09892b8352fea5e988dc0"}, - {file = "wrapt-1.14.1-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:2cf71233a0ed05ccdabe209c606fe0bac7379fdcf687f39b944420d2a09fdb57"}, - {file = "wrapt-1.14.1-cp38-cp38-win32.whl", hash = "sha256:aa31fdcc33fef9eb2552cbcbfee7773d5a6792c137b359e82879c101e98584c5"}, - {file = "wrapt-1.14.1-cp38-cp38-win_amd64.whl", hash = "sha256:d1967f46ea8f2db647c786e78d8cc7e4313dbd1b0aca360592d8027b8508e24d"}, - {file = "wrapt-1.14.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:3232822c7d98d23895ccc443bbdf57c7412c5a65996c30442ebe6ed3df335383"}, - {file = "wrapt-1.14.1-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:988635d122aaf2bdcef9e795435662bcd65b02f4f4c1ae37fbee7401c440b3a7"}, - {file = "wrapt-1.14.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:9cca3c2cdadb362116235fdbd411735de4328c61425b0aa9f872fd76d02c4e86"}, - {file = "wrapt-1.14.1-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:d52a25136894c63de15a35bc0bdc5adb4b0e173b9c0d07a2be9d3ca64a332735"}, - {file = "wrapt-1.14.1-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:40e7bc81c9e2b2734ea4bc1aceb8a8f0ceaac7c5299bc5d69e37c44d9081d43b"}, - {file = "wrapt-1.14.1-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:b9b7a708dd92306328117d8c4b62e2194d00c365f18eff11a9b53c6f923b01e3"}, - {file = "wrapt-1.14.1-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:6a9a25751acb379b466ff6be78a315e2b439d4c94c1e99cb7266d40a537995d3"}, - {file = "wrapt-1.14.1-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:34aa51c45f28ba7f12accd624225e2b1e5a3a45206aa191f6f9aac931d9d56fe"}, - {file = "wrapt-1.14.1-cp39-cp39-win32.whl", hash = "sha256:dee0ce50c6a2dd9056c20db781e9c1cfd33e77d2d569f5d1d9321c641bb903d5"}, - {file = "wrapt-1.14.1-cp39-cp39-win_amd64.whl", hash = "sha256:dee60e1de1898bde3b238f18340eec6148986da0455d8ba7848d50470a7a32fb"}, - {file = "wrapt-1.14.1.tar.gz", hash = "sha256:380a85cf89e0e69b7cfbe2ea9f765f004ff419f34194018a6827ac0e3edfed4d"}, + {file = "typing_extensions-4.9.0-py3-none-any.whl", hash = "sha256:af72aea155e91adfc61c3ae9e0e342dbc0cba726d6cba4b6c72c1f34e47291cd"}, + {file = "typing_extensions-4.9.0.tar.gz", hash = "sha256:23478f88c37f27d76ac8aee6c905017a143b0b1b886c3c9f66bc2fd94f9f5783"}, ] [[package]] @@ -851,21 +763,23 @@ files = [ [[package]] name = "yari-py" -version = "0.1.6" +version = "0.2.1" description = "Python bindings for YARI." optional = false python-versions = ">=3.7" files = [ - {file = "yari_py-0.1.6-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:20f72229e086bd0f457a9e2466ee2934b6ca2dd7919a18ea7414f13000b156c5"}, - {file = "yari_py-0.1.6-cp310-none-win_amd64.whl", hash = "sha256:f5222972488601261fa7f23f7e65afa0f47fef1bff8f511e9a85e811f9d9d23f"}, - {file = "yari_py-0.1.6-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:2359bcb57504465d2c89cdd7ecef5791df5e5f9e7f806b246546ae09817214db"}, - {file = "yari_py-0.1.6-cp311-none-win_amd64.whl", hash = "sha256:582ded9a2addd08d1abbbb0187d13c69b178fbf3bb6eaf2c06f318643e6f260c"}, - {file = "yari_py-0.1.6-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:2d3a82fdb585f314a17b0e21ba67b86f3923f7328b6e40315e9fd32c10c1354e"}, - {file = "yari_py-0.1.6-cp37-none-win_amd64.whl", hash = "sha256:5d9628fb2bba4d7aa29227c120ba13f691c0d79f52c2b17e1f83ab8f7952b698"}, - {file = "yari_py-0.1.6-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:bfb338e0a3d2cde918a2a4408eaa340b9deb4fbefdcdeeacf6778eab87b51506"}, - {file = "yari_py-0.1.6-cp38-none-win_amd64.whl", hash = "sha256:7a7788224705e57b71e38ca92e88dde2ef6c64fee7ea58f4f278b05358d79858"}, - {file = "yari_py-0.1.6-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c6942eefbf6e7f905abdc6ca7c689136afa71f32b0aa5f77f53434a967b3772a"}, - {file = "yari_py-0.1.6-cp39-none-win_amd64.whl", hash = "sha256:eac1e82cbb5c72079c5d21aff44ad7ad762aae60b6e1d878e06b6190b80757b3"}, + {file = "yari_py-0.2.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:58a62745eb0f5acc8118da6a7b6f7833dbd8c9f80528c567908b8b21d18fc92d"}, + {file = "yari_py-0.2.1-cp310-none-win_amd64.whl", hash = "sha256:2094de4192ccd4460866bcb860deb1b17c62a96bd1dded9da7c24a72dd1f5298"}, + {file = "yari_py-0.2.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:1a772a2a0a4970aedb829eb138acf26506cf17bfb0eae48b664d1bd6422084c8"}, + {file = "yari_py-0.2.1-cp311-none-win_amd64.whl", hash = "sha256:12f13de8e1827917484ef46e545fa720c207873f7c7a71b50994830cba04480a"}, + {file = "yari_py-0.2.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4e48b4ecf243cf7b1c2b85cb3b9022ac802446438b2e6161f74c8ba8e9906137"}, + {file = "yari_py-0.2.1-cp312-none-win_amd64.whl", hash = "sha256:85df45ca5188528dfef8abdf2d15a479eaad9789a654e9f360a8260c73cb0775"}, + {file = "yari_py-0.2.1-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:38942ad9724ae2a5b43f95823b56a7b7b6e5aff75ed3c0e6d6eb06fab7ca1507"}, + {file = "yari_py-0.2.1-cp37-none-win_amd64.whl", hash = "sha256:6be1d0dc01033dcc8b46159eb31e03402634858982182a7960f77ecc47df237e"}, + {file = "yari_py-0.2.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b56b897733d035d269a8100d21f5eb036f211e2da140de4ec1a37c90d49f86ea"}, + {file = "yari_py-0.2.1-cp38-none-win_amd64.whl", hash = "sha256:a6fa250d20d0cd4979a7fe38bafaf19ea78f0d2ab9c1ab6ebacc4652e8deab15"}, + {file = "yari_py-0.2.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c9c903cac10924d485ef81b43d8390fb5c10763ce215b9a4a2e91b9af4114f9c"}, + {file = "yari_py-0.2.1-cp39-none-win_amd64.whl", hash = "sha256:59dd459ebecbfd49cac2167a553ec034e3ca581bd06e595d3e0311418a61937e"}, ] [[package]] @@ -885,5 +799,5 @@ testing = ["big-O", "jaraco.functools", "jaraco.itertools", "more-itertools", "p [metadata] lock-version = "2.0" -python-versions = ">=3.8,<3.12" -content-hash = "421f3201bed0621c3ae94a5ee9987b3f76b72b7b68776626c12584657a1b50f2" +python-versions = "^3.8" +content-hash = "81fc74829ead7111203404382cbb3063f54db5363fb0f248d88006a3d3c81270" diff --git a/pyproject.toml b/pyproject.toml index c91c754..b46bbaf 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -18,7 +18,7 @@ pytest-black = "^0.3.12" pytest-cov = "^3.0.0" pytest-mock = "^3.7.0" pytest-mypy = "^0.9.1" -pytest-pylint = "0.19.0" +pytest-pylint = "^0.21.0" pytest-yls = {path = "./pytest-yls", develop = true} [tool.black] @@ -56,10 +56,10 @@ test = "pytest -vvv --mypy --black --pylint --pylint-rcfile=pyproject.toml --cov yls = 'yls.server:main' [tool.poetry.dependencies] -python = ">=3.8,<3.12" +python = "^3.8" pygls = "^1.1.2" yaramod = "^3.21.0" -yari-py = "^0.1.6" +yari-py = "^0.2.1" pluggy = "^1.0.0" [build-system] diff --git a/pytest-yls/pyproject.toml b/pytest-yls/pyproject.toml index 03744e8..399b3d9 100644 --- a/pytest-yls/pyproject.toml +++ b/pytest-yls/pyproject.toml @@ -10,7 +10,7 @@ include = ["py.typed", "LICENSE"] [tool.poetry.dependencies] pytest = "^7.2.2" -python = ">=3.8,<3.12" +python = "^3.8" tenacity = "^8.0.1" [tool.poetry.plugins.pytest11] diff --git a/yls/utils.py b/yls/utils.py index adcef3b..4b445f0 100644 --- a/yls/utils.py +++ b/yls/utils.py @@ -337,120 +337,120 @@ def extract(self, expr: yaramod.Expression) -> None: self.expr = expr # pylint: disable-next=invalid-name - def visit_FunctionCallExpression(self, expr: yaramod.FunctionCallExpression) -> None: # type: ignore - self.extract(expr) + def visit_FunctionCallExpression(self, arg0: yaramod.FunctionCallExpression) -> None: # type: ignore + self.extract(arg0) # pylint: disable-next=invalid-name - def visit_IdExpression(self, expr: yaramod.IdExpression) -> None: # type: ignore - self.extract(expr) + def visit_IdExpression(self, arg0: yaramod.IdExpression) -> None: # type: ignore + self.extract(arg0) # pylint: disable-next=invalid-name - def visit_StructAccessExpression(self, expr: yaramod.StructAccessExpression) -> None: # type: ignore - self.extract(expr) + def visit_StructAccessExpression(self, arg0: yaramod.StructAccessExpression) -> None: # type: ignore + self.extract(arg0) # pylint: disable-next=invalid-name - def visit_ArrayAccessExpression(self, expr: yaramod.ArrayAccessExpression) -> None: # type: ignore - self.extract(expr) + def visit_ArrayAccessExpression(self, arg0: yaramod.ArrayAccessExpression) -> None: # type: ignore + self.extract(arg0) # pylint: disable-next=invalid-name - def visit_StringExpression(self, expr: yaramod.StringExpression) -> None: # type: ignore - self.extract(expr) + def visit_StringExpression(self, arg0: yaramod.StringExpression) -> None: # type: ignore + self.extract(arg0) # pylint: disable-next=invalid-name - def visit_StringCountExpression(self, expr: yaramod.StringCountExpression) -> None: # type: ignore - self.extract(expr) + def visit_StringCountExpression(self, arg0: yaramod.StringCountExpression) -> None: # type: ignore + self.extract(arg0) # pylint: disable-next=invalid-name - def visit_StringOffsetExpression(self, expr: yaramod.StringOffsetExpression) -> None: # type: ignore - self.extract(expr) + def visit_StringOffsetExpression(self, arg0: yaramod.StringOffsetExpression) -> None: # type: ignore + self.extract(arg0) # pylint: disable-next=invalid-name - def visit_StringLengthExpression(self, expr: yaramod.StringLengthExpression) -> None: # type: ignore - self.extract(expr) + def visit_StringLengthExpression(self, arg0: yaramod.StringLengthExpression) -> None: # type: ignore + self.extract(arg0) # pylint: disable-next=invalid-name - def visit_OfExpression(self, expr: yaramod.OfExpression) -> None: # type: ignore - self.extract(expr) + def visit_OfExpression(self, arg0: yaramod.OfExpression) -> None: # type: ignore + self.extract(arg0) # pylint: disable-next=invalid-name - def visit_ForExpression(self, expr: yaramod.ForExpression) -> None: - self.extract(expr) + def visit_ForExpression(self, arg0: yaramod.ForExpression) -> None: + self.extract(arg0) # pylint: disable-next=invalid-name - def visit_IequalsExpression(self, expr: yaramod.IequalsExpression) -> None: # type: ignore - self.extract(expr) - expr.left_operand.accept(self) - expr.right_operand.accept(self) + def visit_IequalsExpression(self, arg0: yaramod.IequalsExpression) -> None: # type: ignore + self.extract(arg0) + arg0.left_operand.accept(self) + arg0.right_operand.accept(self) # pylint: disable-next=invalid-name - def visit_LtExpression(self, expr: yaramod.LtExpression) -> None: # type: ignore - self.extract(expr) - expr.left_operand.accept(self) - expr.right_operand.accept(self) + def visit_LtExpression(self, arg0: yaramod.LtExpression) -> None: # type: ignore + self.extract(arg0) + arg0.left_operand.accept(self) + arg0.right_operand.accept(self) # pylint: disable-next=invalid-name - def visit_GtExpression(self, expr: yaramod.GtExpression) -> None: # type: ignore - self.extract(expr) - expr.left_operand.accept(self) - expr.right_operand.accept(self) + def visit_GtExpression(self, arg0: yaramod.GtExpression) -> None: # type: ignore + self.extract(arg0) + arg0.left_operand.accept(self) + arg0.right_operand.accept(self) # pylint: disable-next=invalid-name - def visit_LeExpression(self, expr: yaramod.LeExpression) -> None: # type: ignore - self.extract(expr) - expr.left_operand.accept(self) - expr.right_operand.accept(self) + def visit_LeExpression(self, arg0: yaramod.LeExpression) -> None: # type: ignore + self.extract(arg0) + arg0.left_operand.accept(self) + arg0.right_operand.accept(self) # pylint: disable-next=invalid-name - def visit_GeExpression(self, expr: yaramod.GeExpression) -> None: # type: ignore - self.extract(expr) - expr.left_operand.accept(self) - expr.right_operand.accept(self) + def visit_GeExpression(self, arg0: yaramod.GeExpression) -> None: # type: ignore + self.extract(arg0) + arg0.left_operand.accept(self) + arg0.right_operand.accept(self) # pylint: disable-next=invalid-name - def visit_EqExpression(self, expr: yaramod.EqExpression) -> None: # type: ignore - self.extract(expr) - expr.left_operand.accept(self) - expr.right_operand.accept(self) + def visit_EqExpression(self, arg0: yaramod.EqExpression) -> None: # type: ignore + self.extract(arg0) + arg0.left_operand.accept(self) + arg0.right_operand.accept(self) # pylint: disable-next=invalid-name - def visit_NeqExpression(self, expr: yaramod.NeqExpression) -> None: # type: ignore - self.extract(expr) - expr.left_operand.accept(self) - expr.right_operand.accept(self) + def visit_NeqExpression(self, arg0: yaramod.NeqExpression) -> None: # type: ignore + self.extract(arg0) + arg0.left_operand.accept(self) + arg0.right_operand.accept(self) # pylint: disable-next=invalid-name - def visit_AndExpression(self, expr: yaramod.AndExpression) -> None: # type: ignore - self.extract(expr) - expr.left_operand.accept(self) - expr.right_operand.accept(self) + def visit_AndExpression(self, arg0: yaramod.AndExpression) -> None: # type: ignore + self.extract(arg0) + arg0.left_operand.accept(self) + arg0.right_operand.accept(self) # pylint: disable-next=invalid-name - def visit_OrExpression(self, expr: yaramod.OrExpression) -> None: # type: ignore - self.extract(expr) - expr.left_operand.accept(self) - expr.right_operand.accept(self) + def visit_OrExpression(self, arg0: yaramod.OrExpression) -> None: # type: ignore + self.extract(arg0) + arg0.left_operand.accept(self) + arg0.right_operand.accept(self) # pylint: disable-next=invalid-name - def visit_NotExpression(self, expr: yaramod.NotExpression) -> None: # type: ignore - self.extract(expr) - expr.operand.accept(self) + def visit_NotExpression(self, arg0: yaramod.NotExpression) -> None: # type: ignore + self.extract(arg0) + arg0.operand.accept(self) # pylint: disable-next=invalid-name - def visit_DefinedExpression(self, expr: yaramod.DefinedExpression) -> None: # type: ignore - self.extract(expr) - expr.operand.accept(self) + def visit_DefinedExpression(self, arg0: yaramod.DefinedExpression) -> None: # type: ignore + self.extract(arg0) + arg0.operand.accept(self) # pylint: disable-next=invalid-name - def visit_ContainsExpression(self, expr: yaramod.ContainsExpression) -> None: # type: ignore - self.extract(expr) - expr.left_operand.accept(self) - expr.right_operand.accept(self) + def visit_ContainsExpression(self, arg0: yaramod.ContainsExpression) -> None: # type: ignore + self.extract(arg0) + arg0.left_operand.accept(self) + arg0.right_operand.accept(self) # pylint: disable-next=invalid-name - def visit_MatchesExpression(self, expr: yaramod.MatchesExpression) -> None: # type: ignore - self.extract(expr) - expr.left_operand.accept(self) - expr.right_operand.accept(self) + def visit_MatchesExpression(self, arg0: yaramod.MatchesExpression) -> None: # type: ignore + self.extract(arg0) + arg0.left_operand.accept(self) + arg0.right_operand.accept(self) def cursor_expression( @@ -705,9 +705,9 @@ def indirectly_affected(self, yara_file: yaramod.YaraFile, root_rule: str) -> se return self.discovered_rules - def visit_IdExpression(self, expr: yaramod.IdExpression) -> None: # type: ignore + def visit_IdExpression(self, arg0: yaramod.IdExpression) -> None: # type: ignore if self.last_rule and self.last_rule.name in self.discovered_rules: - self.discovered_rules.add(expr.symbol.name) + self.discovered_rules.add(arg0.symbol.name) def extract_rule_context_from_yarafile(yara_file: yaramod.YaraFile, rule: yaramod.Rule) -> str: