diff --git a/poetry.lock b/poetry.lock index 4a2c97ae..113345c0 100644 --- a/poetry.lock +++ b/poetry.lock @@ -17,47 +17,48 @@ typing-extensions = {version = ">=4.0.0", markers = "python_version < \"3.11\""} [[package]] name = "black" -version = "25.11.0" +version = "26.3.0" description = "The uncompromising code formatter." optional = false -python-versions = ">=3.9" +python-versions = ">=3.10" groups = ["dev"] files = [ - {file = "black-25.11.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:ec311e22458eec32a807f029b2646f661e6859c3f61bc6d9ffb67958779f392e"}, - {file = "black-25.11.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:1032639c90208c15711334d681de2e24821af0575573db2810b0763bcd62e0f0"}, - {file = "black-25.11.0-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:0c0f7c461df55cf32929b002335883946a4893d759f2df343389c4396f3b6b37"}, - {file = "black-25.11.0-cp310-cp310-win_amd64.whl", hash = "sha256:f9786c24d8e9bd5f20dc7a7f0cdd742644656987f6ea6947629306f937726c03"}, - {file = "black-25.11.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:895571922a35434a9d8ca67ef926da6bc9ad464522a5fe0db99b394ef1c0675a"}, - {file = "black-25.11.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:cb4f4b65d717062191bdec8e4a442539a8ea065e6af1c4f4d36f0cdb5f71e170"}, - {file = "black-25.11.0-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:d81a44cbc7e4f73a9d6ae449ec2317ad81512d1e7dce7d57f6333fd6259737bc"}, - {file = "black-25.11.0-cp311-cp311-win_amd64.whl", hash = "sha256:7eebd4744dfe92ef1ee349dc532defbf012a88b087bb7ddd688ff59a447b080e"}, - {file = "black-25.11.0-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:80e7486ad3535636657aa180ad32a7d67d7c273a80e12f1b4bfa0823d54e8fac"}, - {file = "black-25.11.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:6cced12b747c4c76bc09b4db057c319d8545307266f41aaee665540bc0e04e96"}, - {file = "black-25.11.0-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:6cb2d54a39e0ef021d6c5eef442e10fd71fcb491be6413d083a320ee768329dd"}, - {file = "black-25.11.0-cp312-cp312-win_amd64.whl", hash = "sha256:ae263af2f496940438e5be1a0c1020e13b09154f3af4df0835ea7f9fe7bfa409"}, - {file = "black-25.11.0-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:0a1d40348b6621cc20d3d7530a5b8d67e9714906dfd7346338249ad9c6cedf2b"}, - {file = "black-25.11.0-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:51c65d7d60bb25429ea2bf0731c32b2a2442eb4bd3b2afcb47830f0b13e58bfd"}, - {file = "black-25.11.0-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:936c4dd07669269f40b497440159a221ee435e3fddcf668e0c05244a9be71993"}, - {file = "black-25.11.0-cp313-cp313-win_amd64.whl", hash = "sha256:f42c0ea7f59994490f4dccd64e6b2dd49ac57c7c84f38b8faab50f8759db245c"}, - {file = "black-25.11.0-cp314-cp314-macosx_10_15_x86_64.whl", hash = "sha256:35690a383f22dd3e468c85dc4b915217f87667ad9cce781d7b42678ce63c4170"}, - {file = "black-25.11.0-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:dae49ef7369c6caa1a1833fd5efb7c3024bb7e4499bf64833f65ad27791b1545"}, - {file = "black-25.11.0-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:5bd4a22a0b37401c8e492e994bce79e614f91b14d9ea911f44f36e262195fdda"}, - {file = "black-25.11.0-cp314-cp314-win_amd64.whl", hash = "sha256:aa211411e94fdf86519996b7f5f05e71ba34835d8f0c0f03c00a26271da02664"}, - {file = "black-25.11.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:a3bb5ce32daa9ff0605d73b6f19da0b0e6c1f8f2d75594db539fdfed722f2b06"}, - {file = "black-25.11.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:9815ccee1e55717fe9a4b924cae1646ef7f54e0f990da39a34fc7b264fcf80a2"}, - {file = "black-25.11.0-cp39-cp39-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:92285c37b93a1698dcbc34581867b480f1ba3a7b92acf1fe0467b04d7a4da0dc"}, - {file = "black-25.11.0-cp39-cp39-win_amd64.whl", hash = "sha256:43945853a31099c7c0ff8dface53b4de56c41294fa6783c0441a8b1d9bf668bc"}, - {file = "black-25.11.0-py3-none-any.whl", hash = "sha256:e3f562da087791e96cefcd9dda058380a442ab322a02e222add53736451f604b"}, - {file = "black-25.11.0.tar.gz", hash = "sha256:9a323ac32f5dc75ce7470501b887250be5005a01602e931a15e45593f70f6e08"}, + {file = "black-26.3.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:135bf8a352e35b3bfba4999c256063d8d86514654599eca7635e914a55d60ec3"}, + {file = "black-26.3.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:6024a2959b6c62c311c564ce23ce0eaa977a50ed52a53f7abc83d2c9eb62b8d8"}, + {file = "black-26.3.0-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:264144203ea3374542a1591b6fb317561662d074bce5d91ad6afa8d8d3e4ec3d"}, + {file = "black-26.3.0-cp310-cp310-win_amd64.whl", hash = "sha256:1a15d1386dce3af3993bf9baeb68d3e492cbb003dae05c3ecf8530a9b75edf85"}, + {file = "black-26.3.0-cp310-cp310-win_arm64.whl", hash = "sha256:d86a70bf048235aff62a79e229fe5d9e7809c7a05a3dd12982e7ccdc2678e096"}, + {file = "black-26.3.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:3da07abe65732483e915ab7f9c7c50332c293056436e9519373775d62539607c"}, + {file = "black-26.3.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:fc9fd683ccabc3dc9791b93db494d93b5c6c03b105453b76d71e5474e9dfa6e7"}, + {file = "black-26.3.0-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:8e2c7e2c5ee09ff575869258b2c07064c952637918fc5e15f6ebd45e45eae0aa"}, + {file = "black-26.3.0-cp311-cp311-win_amd64.whl", hash = "sha256:a849286bfc3054eaeb233b6df9056fcf969ee18bf7ecb71b0257e838a0f05e6d"}, + {file = "black-26.3.0-cp311-cp311-win_arm64.whl", hash = "sha256:c93c83af43cda73ed8265d001214779ab245fa7a861a75b3e43828f4fb1f5657"}, + {file = "black-26.3.0-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:c2b1e5eec220b419e3591a0aaa6351bd3a9c01fe6291fbaf76d84308eb7a2ede"}, + {file = "black-26.3.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:1bab64de70bccc992432bee56cdffbe004ceeaa07352127c386faa87e81f9261"}, + {file = "black-26.3.0-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:5b6c5f734290803b7b26493ffd734b02b72e6c90d82d45ac4d5b862b9bdf7720"}, + {file = "black-26.3.0-cp312-cp312-win_amd64.whl", hash = "sha256:7c767396af15b54e1a6aae99ddf241ae97e589f666b1d22c4b6618282a04e4ca"}, + {file = "black-26.3.0-cp312-cp312-win_arm64.whl", hash = "sha256:765fd6ddd00f35c55250fdc6b790c272d54ac3f44da719cc42df428269b45980"}, + {file = "black-26.3.0-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:59754fd8f43ef457be190594c07a52c999e22cb1534dc5344bff1d46fdf1027d"}, + {file = "black-26.3.0-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:1fd94cfee67b8d336761a0b08629a25938e4a491c440951ce517a7209c99b5ff"}, + {file = "black-26.3.0-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:6f7b3e653a90ca1ef4e821c20f8edaee80b649c38d2532ed2e9073a9534b14a7"}, + {file = "black-26.3.0-cp313-cp313-win_amd64.whl", hash = "sha256:f8fb9d7c2496adc83614856e1f6e55a9ce4b7ae7fc7f45b46af9189ddb493464"}, + {file = "black-26.3.0-cp313-cp313-win_arm64.whl", hash = "sha256:e8618c1d06838f56afbcb3ffa1aa16436cec62b86b38c7b32ca86f53948ffb91"}, + {file = "black-26.3.0-cp314-cp314-macosx_10_15_x86_64.whl", hash = "sha256:d0c6f64ead44f4369c66f1339ecf68e99b40f2e44253c257f7807c5a3ef0ca32"}, + {file = "black-26.3.0-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:ed6f0809134e51ec4a7509e069cdfa42bf996bd0fd1df6d3146b907f36e28893"}, + {file = "black-26.3.0-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:cc6ac0ea5dd5fa6311ca82edfa3620cba0ed0426022d10d2d5d39aedbf3e1958"}, + {file = "black-26.3.0-cp314-cp314-win_amd64.whl", hash = "sha256:884bc0aefa96adabcba0b77b10e9775fd52d4b766e88c44dc6f41f7c82787fc8"}, + {file = "black-26.3.0-cp314-cp314-win_arm64.whl", hash = "sha256:be3bd02aab5c4ab03703172f5530ddc8fc8b5b7bb8786230e84c9e011cee9ca1"}, + {file = "black-26.3.0-py3-none-any.whl", hash = "sha256:e825d6b121910dff6f04d7691f826d2449327e8e71c26254c030c4f3d2311985"}, + {file = "black-26.3.0.tar.gz", hash = "sha256:4d438dfdba1c807c6c7c63c4f15794dda0820d2222e7c4105042ac9ddfc5dd0b"}, ] [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" +pytokens = ">=0.4.0,<0.5.0" tomli = {version = ">=1.1.0", markers = "python_version < \"3.11\""} typing-extensions = {version = ">=4.0.1", markers = "python_version < \"3.11\""} @@ -65,7 +66,7 @@ typing-extensions = {version = ">=4.0.1", markers = "python_version < \"3.11\""} colorama = ["colorama (>=0.4.3)"] d = ["aiohttp (>=3.10)"] jupyter = ["ipython (>=7.8.0)", "tokenize-rt (>=3.2.0)"] -uvloop = ["uvloop (>=0.15.2)"] +uvloop = ["uvloop (>=0.15.2) ; sys_platform != \"win32\"", "winloop (>=0.5.0) ; sys_platform == \"win32\""] [[package]] name = "click" @@ -332,16 +333,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 = "platformdirs" version = "4.3.7" @@ -490,14 +497,54 @@ testing = ["process-tests", "pytest-xdist", "virtualenv"] [[package]] name = "pytokens" -version = "0.3.0" +version = "0.4.1" description = "A Fast, spec compliant Python 3.14+ tokenizer that runs on older Pythons." optional = false python-versions = ">=3.8" groups = ["dev"] files = [ - {file = "pytokens-0.3.0-py3-none-any.whl", hash = "sha256:95b2b5eaf832e469d141a378872480ede3f251a5a5041b8ec6e581d3ac71bbf3"}, - {file = "pytokens-0.3.0.tar.gz", hash = "sha256:2f932b14ed08de5fcf0b391ace2642f858f1394c0857202959000b68ed7a458a"}, + {file = "pytokens-0.4.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:2a44ed93ea23415c54f3face3b65ef2b844d96aeb3455b8a69b3df6beab6acc5"}, + {file = "pytokens-0.4.1-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:add8bf86b71a5d9fb5b89f023a80b791e04fba57960aa790cc6125f7f1d39dfe"}, + {file = "pytokens-0.4.1-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:670d286910b531c7b7e3c0b453fd8156f250adb140146d234a82219459b9640c"}, + {file = "pytokens-0.4.1-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:4e691d7f5186bd2842c14813f79f8884bb03f5995f0575272009982c5ac6c0f7"}, + {file = "pytokens-0.4.1-cp310-cp310-win_amd64.whl", hash = "sha256:27b83ad28825978742beef057bfe406ad6ed524b2d28c252c5de7b4a6dd48fa2"}, + {file = "pytokens-0.4.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:d70e77c55ae8380c91c0c18dea05951482e263982911fc7410b1ffd1dadd3440"}, + {file = "pytokens-0.4.1-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:4a58d057208cb9075c144950d789511220b07636dd2e4708d5645d24de666bdc"}, + {file = "pytokens-0.4.1-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:b49750419d300e2b5a3813cf229d4e5a4c728dae470bcc89867a9ad6f25a722d"}, + {file = "pytokens-0.4.1-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:d9907d61f15bf7261d7e775bd5d7ee4d2930e04424bab1972591918497623a16"}, + {file = "pytokens-0.4.1-cp311-cp311-win_amd64.whl", hash = "sha256:ee44d0f85b803321710f9239f335aafe16553b39106384cef8e6de40cb4ef2f6"}, + {file = "pytokens-0.4.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:140709331e846b728475786df8aeb27d24f48cbcf7bcd449f8de75cae7a45083"}, + {file = "pytokens-0.4.1-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:6d6c4268598f762bc8e91f5dbf2ab2f61f7b95bdc07953b602db879b3c8c18e1"}, + {file = "pytokens-0.4.1-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:24afde1f53d95348b5a0eb19488661147285ca4dd7ed752bbc3e1c6242a304d1"}, + {file = "pytokens-0.4.1-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:5ad948d085ed6c16413eb5fec6b3e02fa00dc29a2534f088d3302c47eb59adf9"}, + {file = "pytokens-0.4.1-cp312-cp312-win_amd64.whl", hash = "sha256:3f901fe783e06e48e8cbdc82d631fca8f118333798193e026a50ce1b3757ea68"}, + {file = "pytokens-0.4.1-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:8bdb9d0ce90cbf99c525e75a2fa415144fd570a1ba987380190e8b786bc6ef9b"}, + {file = "pytokens-0.4.1-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:5502408cab1cb18e128570f8d598981c68a50d0cbd7c61312a90507cd3a1276f"}, + {file = "pytokens-0.4.1-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:29d1d8fb1030af4d231789959f21821ab6325e463f0503a61d204343c9b355d1"}, + {file = "pytokens-0.4.1-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:970b08dd6b86058b6dc07efe9e98414f5102974716232d10f32ff39701e841c4"}, + {file = "pytokens-0.4.1-cp313-cp313-win_amd64.whl", hash = "sha256:9bd7d7f544d362576be74f9d5901a22f317efc20046efe2034dced238cbbfe78"}, + {file = "pytokens-0.4.1-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:4a14d5f5fc78ce85e426aa159489e2d5961acf0e47575e08f35584009178e321"}, + {file = "pytokens-0.4.1-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:97f50fd18543be72da51dd505e2ed20d2228c74e0464e4262e4899797803d7fa"}, + {file = "pytokens-0.4.1-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:dc74c035f9bfca0255c1af77ddd2d6ae8419012805453e4b0e7513e17904545d"}, + {file = "pytokens-0.4.1-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:f66a6bbe741bd431f6d741e617e0f39ec7257ca1f89089593479347cc4d13324"}, + {file = "pytokens-0.4.1-cp314-cp314-win_amd64.whl", hash = "sha256:b35d7e5ad269804f6697727702da3c517bb8a5228afa450ab0fa787732055fc9"}, + {file = "pytokens-0.4.1-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:8fcb9ba3709ff77e77f1c7022ff11d13553f3c30299a9fe246a166903e9091eb"}, + {file = "pytokens-0.4.1-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:79fc6b8699564e1f9b521582c35435f1bd32dd06822322ec44afdeba666d8cb3"}, + {file = "pytokens-0.4.1-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:d31b97b3de0f61571a124a00ffe9a81fb9939146c122c11060725bd5aea79975"}, + {file = "pytokens-0.4.1-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:967cf6e3fd4adf7de8fc73cd3043754ae79c36475c1c11d514fc72cf5490094a"}, + {file = "pytokens-0.4.1-cp314-cp314t-win_amd64.whl", hash = "sha256:584c80c24b078eec1e227079d56dc22ff755e0ba8654d8383b2c549107528918"}, + {file = "pytokens-0.4.1-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:da5baeaf7116dced9c6bb76dc31ba04a2dc3695f3d9f74741d7910122b456edc"}, + {file = "pytokens-0.4.1-cp38-cp38-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:11edda0942da80ff58c4408407616a310adecae1ddd22eef8c692fe266fa5009"}, + {file = "pytokens-0.4.1-cp38-cp38-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:0fc71786e629cef478cbf29d7ea1923299181d0699dbe7c3c0f4a583811d9fc1"}, + {file = "pytokens-0.4.1-cp38-cp38-musllinux_1_2_x86_64.whl", hash = "sha256:dcafc12c30dbaf1e2af0490978352e0c4041a7cde31f4f81435c2a5e8b9cabb6"}, + {file = "pytokens-0.4.1-cp38-cp38-win_amd64.whl", hash = "sha256:42f144f3aafa5d92bad964d471a581651e28b24434d184871bd02e3a0d956037"}, + {file = "pytokens-0.4.1-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:34bcc734bd2f2d5fe3b34e7b3c0116bfb2397f2d9666139988e7a3eb5f7400e3"}, + {file = "pytokens-0.4.1-cp39-cp39-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:941d4343bf27b605e9213b26bfa1c4bf197c9c599a9627eb7305b0defcfe40c1"}, + {file = "pytokens-0.4.1-cp39-cp39-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:3ad72b851e781478366288743198101e5eb34a414f1d5627cdd585ca3b25f1db"}, + {file = "pytokens-0.4.1-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:682fa37ff4d8e95f7df6fe6fe6a431e8ed8e788023c6bcc0f0880a12eab80ad1"}, + {file = "pytokens-0.4.1-cp39-cp39-win_amd64.whl", hash = "sha256:30f51edd9bb7f85c748979384165601d028b84f7bd13fe14d3e065304093916a"}, + {file = "pytokens-0.4.1-py3-none-any.whl", hash = "sha256:26cef14744a8385f35d0e095dc8b3a7583f6c953c2e3d269c7f82484bf5ad2de"}, + {file = "pytokens-0.4.1.tar.gz", hash = "sha256:292052fe80923aae2260c073f822ceba21f3872ced9a68bb7953b348e561179a"}, ] [package.extras] @@ -590,4 +637,4 @@ files = [ [metadata] lock-version = "2.1" python-versions = "^3.10" -content-hash = "9e5153ac8c0a26b2cbfdc61eadb9c1e60f4b076ea0c350403ed5308ac583da48" +content-hash = "acfdae250b1176c9ebab92b2961fea01807ce4527ad527fadf8918e518de42c3" diff --git a/pyproject.toml b/pyproject.toml index 38dc5f03..c14fea70 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -17,7 +17,7 @@ python = "^3.10" sqlparse = ">=0.4.1,<0.6.0" [tool.poetry.dev-dependencies] -black = "^25.11" +black = "^26.3" coverage = {extras = ["toml"], version = "^7.13"} pylint = "^3.3.9" pytest = "^9.0.2" diff --git a/sql_metadata/parser.py b/sql_metadata/parser.py index 367d128a..122075c8 100644 --- a/sql_metadata/parser.py +++ b/sql_metadata/parser.py @@ -2,6 +2,7 @@ """ This module provides SQL query parsing functions """ + import logging import re from typing import Dict, List, Optional, Set, Tuple, Union diff --git a/test/test_create_table.py b/test/test_create_table.py index 7a8551f5..6c065d75 100644 --- a/test/test_create_table.py +++ b/test/test_create_table.py @@ -19,29 +19,25 @@ def test_is_create_table_query(): def test_create_table(): - parser = Parser( - """ + parser = Parser(""" CREATE TABLE `new_table` ( `item_id` int(9) NOT NULL AUTO_INCREMENT, `foo` varchar(16) NOT NULL DEFAULT '', PRIMARY KEY (`item_id`,`foo`), KEY `idx_foo` (`foo`) ) CHARACTER SET utf8; - """ - ) + """) assert parser.query_type == QueryType.CREATE assert parser.tables == ["new_table"] assert parser.columns == ["item_id", "foo"] def test_simple_create_table_as_select(): - parser = Parser( - """ + parser = Parser(""" CREATE table abc.foo as SELECT pqr.foo1 , ab.foo2 FROM foo pqr, bar ab; - """ - ) + """) assert parser.query_type == QueryType.CREATE assert parser.tables == ["abc.foo", "foo", "bar"] assert parser.columns == ["foo.foo1", "bar.foo2"] @@ -168,11 +164,9 @@ def test_create_if_not_exists_simple_name(): def test_create_temporary_table(): # https://dev.mysql.com/doc/refman/8.4/en/create-temporary-table.html - parser = Parser( - """ + parser = Parser(""" CREATE TEMPORARY TABLE new_tbl SELECT * FROM orig_tbl LIMIT 0;; - """ - ) + """) assert parser.query_type == QueryType.CREATE assert parser.tables == ["new_tbl", "orig_tbl"] assert parser.columns == ["*"] diff --git a/test/test_getting_columns.py b/test/test_getting_columns.py index 06733204..902e4e51 100644 --- a/test/test_getting_columns.py +++ b/test/test_getting_columns.py @@ -92,15 +92,10 @@ def test_getting_columns(): "test", ] assert Parser("SELECT /* a comment */ bar FROM test_table").columns == ["bar"] - assert ( - Parser( - """ + assert Parser(""" WITH foo AS (SELECT test_table.* FROM test_table) SELECT foo.bar FROM foo - """ - ).columns - == ["test_table.*", "bar"] - ) + """).columns == ["test_table.*", "bar"] def test_columns_with_order_by(): @@ -273,11 +268,9 @@ def test_columns_with_comments(): "order_by": ["cl_sortkey"], } - parser = Parser( - """WITH aa AS --sdfsdfsdf + parser = Parser("""WITH aa AS --sdfsdfsdf (SELECT C1, C2 FROM T1) - SELECT C1, C2 FROM aa""" - ) + SELECT C1, C2 FROM aa""") assert parser.columns == ["C1", "C2"] assert parser.columns_dict == {"select": ["C1", "C2"]} diff --git a/test/test_getting_tables.py b/test/test_getting_tables.py index b4d2cdcf..d6617037 100644 --- a/test/test_getting_tables.py +++ b/test/test_getting_tables.py @@ -100,14 +100,9 @@ def test_complex_query_tables(): # test whitespaces in keywords # @see https://github.com/macbre/sql-metadata/issues/80 - assert ( - ["tab", "tab2"] - == Parser( - """SELECT a,b,c from tab + assert ["tab", "tab2"] == Parser("""SELECT a,b,c from tab full outer \r\n\t join tab2 on (col1 = col2) group -\r\n \t by a, b, c """ - ).tables - ) +\r\n \t by a, b, c """).tables def test_joins(): @@ -291,16 +286,11 @@ def test_table_name_with_group_by(): == expected_tables ) - assert ( - Parser( - """ + assert Parser(""" SELECT s.cust_id,count(s.cust_id) FROM SH.sales s GROUP BY s.cust_id HAVING s.cust_id != '1660' AND s.cust_id != '2' - """.strip() - ).tables - == expected_tables - ) + """.strip()).tables == expected_tables def test_datasets(): @@ -344,31 +334,21 @@ def test_unions(): def test_with_brackets(): - assert ( - ["database1.table1", "database2.table2"] - == Parser( - """ + assert ["database1.table1", "database2.table2"] == Parser(""" SELECT "xxxxx" FROM (database1.table1 alias LEFT JOIN database2.table2 ON ("tt"."ttt"."fff" = "xx"."xxx")) -""" - ).tables - ) +""").tables - assert ( - ["inner_table"] - == Parser( - """ + assert ["inner_table"] == Parser(""" SELECT t.foo FROM (SELECT foo FROM inner_table WHERE bar = '1') t -""" - ).tables - ) +""").tables def test_db2_query(): @@ -725,16 +705,14 @@ def test_join_followed_by_tables(): parser = Parser(query) assert parser.tables == ["web_sales", "web_returns", "date_dim", "web_site"] - parser = Parser( - """ + parser = Parser(""" SELECT * FROM Sales JOIN Customers ON Sales.CustomerID = Customers.CustomerID, (SELECT MAX(Revenue) FROM Sales), Stores - """ - ) + """) assert parser.tables == ["Sales", "Customers", "Stores"] diff --git a/test/test_mssql_server.py b/test/test_mssql_server.py index 3510b632..abf4cab1 100644 --- a/test/test_mssql_server.py +++ b/test/test_mssql_server.py @@ -39,8 +39,7 @@ def test_sql_server_cte(): @see https://www.sqlservertutorial.net/sql-server-basics/sql-server-cte/ """ - parser = Parser( - """ + parser = Parser(""" WITH x AS ( SELECT * FROM n ) @@ -48,15 +47,13 @@ def test_sql_server_cte(): * FROM x JOIN y ON x.a = y.a - """ - ) + """) assert parser.tables == ["n", "y"] assert parser.with_names == ["x"] assert parser.with_queries == {"x": "SELECT * FROM n"} assert parser.columns == ["*", "a", "y.a"] - parser = Parser( - """ + parser = Parser(""" WITH x AS ( SELECT * FROM n ) @@ -64,28 +61,23 @@ def test_sql_server_cte(): * FROM x JOIN y ON x.a = y.a - """ - ) + """) assert parser.tables == ["n", "y"] - parser = Parser( - """ + parser = Parser(""" WITH foo AS ( SELECT * FROM n ) UPDATE z from foo set z.q = foo.y - """ - ) + """) assert parser.tables == ["n", "z"] - parser = Parser( - """ + parser = Parser(""" WITH foo AS ( SELECT * FROM tab ) DELETE FROM z JOIN foo ON z.a = foo.a - """ - ) + """) assert parser.tables == ["tab", "z"] @@ -133,8 +125,7 @@ def test_sql_server_cte_sales_by_year(): def test_partition_over_with_rank_and_one_order(): """Test for #204""" - parser = Parser( - """ + parser = Parser(""" select t.RANKED, t.RANKED_two, t.test from ( SELECT RANK() OVER (PARTITION BY col_one ORDER BY col_two) RANKED, @@ -144,8 +135,7 @@ def test_partition_over_with_rank_and_one_order(): where t.RANKED = 1 and t.RANKED_two = 2 order by test - """ - ) + """) assert parser.tables == ["nice_table"] assert parser.columns_aliases_names == ["RANKED", "RANKED_two", "test"] assert parser.columns_aliases == { @@ -163,8 +153,7 @@ def test_partition_over_with_rank_and_one_order(): def test_partition_over_with_row_number_and_many_orders(): """Test for #204""" - parser = Parser( - """ + parser = Parser(""" select t.row_no, t.row_no_two, t.test from ( SELECT ROW_NUMBER() OVER ( @@ -178,8 +167,7 @@ def test_partition_over_with_row_number_and_many_orders(): where t.row_no = 1 and t.row_no_two = 2 order by t.row_no - """ - ) + """) assert parser.tables == ["nice_table"] assert parser.columns_aliases_names == ["row_no", "row_no_two", "test"] assert parser.columns_aliases == { diff --git a/test/test_multiple_subqueries.py b/test/test_multiple_subqueries.py index dbc38ba9..84d13124 100644 --- a/test/test_multiple_subqueries.py +++ b/test/test_multiple_subqueries.py @@ -410,14 +410,12 @@ def test_resolving_columns_in_sub_queries_functions(): def test_readme_query(): - parser = Parser( - """ + parser = Parser(""" SELECT COUNT(1) FROM (SELECT std.task_id FROM some_task_detail std WHERE std.STATUS = 1) a JOIN (SELECT st.task_id FROM some_task st WHERE task_type_id = 80) b ON a.task_id = b.task_id; - """ - ) + """) assert parser.subqueries == { "a": "SELECT std.task_id FROM some_task_detail std WHERE std.STATUS = 1", "b": "SELECT st.task_id FROM some_task st WHERE task_type_id = 80", diff --git a/test/test_with_statements.py b/test/test_with_statements.py index 8721d2d0..07805d0c 100644 --- a/test/test_with_statements.py +++ b/test/test_with_statements.py @@ -5,8 +5,7 @@ def test_with_statements(): - parser = Parser( - """ + parser = Parser(""" WITH database1.tableFromWith AS (SELECT aa.* FROM table3 as aa left join table4 on aa.col1=table4.col2), @@ -16,8 +15,7 @@ def test_with_statements(): FROM database1.tableFromWith alias LEFT JOIN database2.table2 ON ("tt"."ttt"."fff" = "xx"."xxx") -""" - ) +""") assert parser.tables == ["table3", "table4", "database2.table2"] assert parser.with_names == ["database1.tableFromWith", "test"] assert parser.with_queries == { @@ -25,8 +23,7 @@ def test_with_statements(): "aa.col1 = table4.col2", "test": "SELECT * from table3", } - parser = Parser( - """ + parser = Parser(""" WITH database1.tableFromWith AS (SELECT * FROM table3), database1.tableFromWith2 AS (SELECT * FROM table4), @@ -37,8 +34,7 @@ def test_with_statements(): FROM database1.tableFromWith alias LEFT JOIN database2.table2 ON ("tt"."ttt"."fff" = "xx"."xxx") -""" - ) +""") assert parser.with_names == [ "database1.tableFromWith", @@ -54,15 +50,13 @@ def test_with_statements(): } assert parser.tables == ["table3", "table4", "table5", "table6", "database2.table2"] - parser = Parser( - """ + parser = Parser(""" WITH cte1 AS (SELECT a, b FROM table1), cte2 AS (SELECT c, d FROM table2) SELECT cte1.b, d FROM cte1 JOIN cte2 WHERE cte1.a = cte2.c; -""" - ) +""") assert parser.with_names == ["cte1", "cte2"] assert parser.with_queries == {