diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/array/no-close.toml b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/array/no-close.toml new file mode 100644 index 0000000000000000000000000000000000000000..032ebcc247f1a0e216b3a880c4bbd7cb06064c0c --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/array/no-close.toml @@ -0,0 +1 @@ +long_array = [ 1, 2, 3 diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/array/tables-1.toml b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/array/tables-1.toml new file mode 100644 index 0000000000000000000000000000000000000000..01d4d1381cd57a2542bd98548032fd4d7007bf10 --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/array/tables-1.toml @@ -0,0 +1,4 @@ +# INVALID TOML DOC +fruit = [] + +[[fruit]] # Not allowed diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/array/tables-2.toml b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/array/tables-2.toml new file mode 100644 index 0000000000000000000000000000000000000000..a77b0e4d3ef42fcc6941c0c663fe8bfa731f8617 --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/array/tables-2.toml @@ -0,0 +1,10 @@ +# INVALID TOML DOC +[[fruit]] + name = "apple" + + [[fruit.variety]] + name = "red delicious" + + # This table conflicts with the previous table + [fruit.variety] + name = "granny smith" diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/array/text-after-array-entries.toml b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/array/text-after-array-entries.toml new file mode 100644 index 0000000000000000000000000000000000000000..1a7289074ed131de598a6a296121779e2102615d --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/array/text-after-array-entries.toml @@ -0,0 +1,4 @@ +array = [ + "Is there life after an array separator?", No + "Entry" +] diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/array/text-before-array-separator.toml b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/array/text-before-array-separator.toml new file mode 100644 index 0000000000000000000000000000000000000000..9b06a392410634906e1dabd7487ffa3acc40f747 --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/array/text-before-array-separator.toml @@ -0,0 +1,4 @@ +array = [ + "Is there life before an array separator?" No, + "Entry" +] diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/array/text-in-array.toml b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/array/text-in-array.toml new file mode 100644 index 0000000000000000000000000000000000000000..a6a6c42075e24c483c568e6c4e7b07368b3f5e2c --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/array/text-in-array.toml @@ -0,0 +1,5 @@ +array = [ + "Entry 1", + I don't belong, + "Entry 2", +] diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/bool/mixed-case.toml b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/bool/mixed-case.toml new file mode 100644 index 0000000000000000000000000000000000000000..41d995a2d36bbf7c65ca9459a95f588d7a652a53 --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/bool/mixed-case.toml @@ -0,0 +1 @@ +valid = False diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/bool/wrong-case-false.toml b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/bool/wrong-case-false.toml new file mode 100644 index 0000000000000000000000000000000000000000..398222098f840a3eb8e79e4f59b77bb553caf55c --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/bool/wrong-case-false.toml @@ -0,0 +1 @@ +b = FALSE diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/bool/wrong-case-true.toml b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/bool/wrong-case-true.toml new file mode 100644 index 0000000000000000000000000000000000000000..85e34c5eb688d30e1e48adbfc0a12a3169524f8d --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/bool/wrong-case-true.toml @@ -0,0 +1 @@ +a = TRUE diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/control/comment-del.toml b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/control/comment-del.toml new file mode 100644 index 0000000000000000000000000000000000000000..fb904007ccd434e64c1267de9dc3406f63335916 --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/control/comment-del.toml @@ -0,0 +1 @@ +comment-del = "0x7f" #  diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/control/comment-lf.toml b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/control/comment-lf.toml new file mode 100644 index 0000000000000000000000000000000000000000..f6e963e02646ac9d0923caa6809af8c7405eebb3 --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/control/comment-lf.toml @@ -0,0 +1 @@ +comment-lf = "ctrl-P" #  diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/control/comment-null.toml b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/control/comment-null.toml new file mode 100644 index 0000000000000000000000000000000000000000..2c903729b9a0731eebedef6c551fe9ddb30ba882 Binary files /dev/null and b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/control/comment-null.toml differ diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/control/comment-us.toml b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/control/comment-us.toml new file mode 100644 index 0000000000000000000000000000000000000000..c685b798f6f66f17676d46f0750491f961be5843 --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/control/comment-us.toml @@ -0,0 +1 @@ +comment-us = "ctrl-_" #  diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/control/control.multi b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/control/control.multi new file mode 100644 index 0000000000000000000000000000000000000000..08c0e25b373fc9d9abcb25b554cc5ff3bd15f6f7 Binary files /dev/null and b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/control/control.multi differ diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/control/multi-del.toml b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/control/multi-del.toml new file mode 100644 index 0000000000000000000000000000000000000000..6629ae3b0e3382abab9ec3aca96cb84618fc95c7 --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/control/multi-del.toml @@ -0,0 +1 @@ +multi-del = """null""" diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/control/multi-lf.toml b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/control/multi-lf.toml new file mode 100644 index 0000000000000000000000000000000000000000..f207d33f199aefcf813d4899549b1618b278ed54 --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/control/multi-lf.toml @@ -0,0 +1 @@ +multi-lf = """null""" diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/control/multi-null.toml b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/control/multi-null.toml new file mode 100644 index 0000000000000000000000000000000000000000..ac6cb46c006286cd6c9133c5029e17b2f3976db2 Binary files /dev/null and b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/control/multi-null.toml differ diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/control/multi-us.toml b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/control/multi-us.toml new file mode 100644 index 0000000000000000000000000000000000000000..b923ca9e6f50a41612368aedd586b9e701291077 --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/control/multi-us.toml @@ -0,0 +1 @@ +multi-us = """null""" diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/control/rawmulti-del.toml b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/control/rawmulti-del.toml new file mode 100644 index 0000000000000000000000000000000000000000..17cde077854f03b301f7a5b78cf30853ad54a00d --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/control/rawmulti-del.toml @@ -0,0 +1 @@ +rawmulti-del = '''null''' diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/control/rawmulti-lf.toml b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/control/rawmulti-lf.toml new file mode 100644 index 0000000000000000000000000000000000000000..360d48987f1bae407c0bbef8bbb68bdb74296576 --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/control/rawmulti-lf.toml @@ -0,0 +1 @@ +rawmulti-lf = '''null''' diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/control/rawmulti-null.toml b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/control/rawmulti-null.toml new file mode 100644 index 0000000000000000000000000000000000000000..1b5bd092c5c54e408681c5bc215f34136f9d6029 Binary files /dev/null and b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/control/rawmulti-null.toml differ diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/control/rawmulti-us.toml b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/control/rawmulti-us.toml new file mode 100644 index 0000000000000000000000000000000000000000..025142071579eeb7034714b0ff26d7ecb868a828 --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/control/rawmulti-us.toml @@ -0,0 +1 @@ +rawmulti-us = '''null''' diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/control/rawstring-del.toml b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/control/rawstring-del.toml new file mode 100644 index 0000000000000000000000000000000000000000..8d83ba8e472460e1b2a707d5bc013c2b7e4cdbd3 --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/control/rawstring-del.toml @@ -0,0 +1 @@ +rawstring-del = 'null' diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/control/rawstring-lf.toml b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/control/rawstring-lf.toml new file mode 100644 index 0000000000000000000000000000000000000000..237470ae6a2030538237a925e187a50f61eebac7 --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/control/rawstring-lf.toml @@ -0,0 +1 @@ +rawstring-lf = 'null' diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/control/rawstring-null.toml b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/control/rawstring-null.toml new file mode 100644 index 0000000000000000000000000000000000000000..2d8d0b4cb8028a76db91a0455d23fc054577541b Binary files /dev/null and b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/control/rawstring-null.toml differ diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/control/rawstring-us.toml b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/control/rawstring-us.toml new file mode 100644 index 0000000000000000000000000000000000000000..76cb08c0b1a9e3a18c01e72a6b506958ff4c13c2 --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/control/rawstring-us.toml @@ -0,0 +1 @@ +rawstring-us = 'null' diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/control/string-bs.toml b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/control/string-bs.toml new file mode 100644 index 0000000000000000000000000000000000000000..0061c485423932544efb7b5075731bc760622d91 --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/control/string-bs.toml @@ -0,0 +1 @@ +string-bs = "backspace" diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/control/string-del.toml b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/control/string-del.toml new file mode 100644 index 0000000000000000000000000000000000000000..bc0ec7fb80312de6683feadcd4d20ce9240ac127 --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/control/string-del.toml @@ -0,0 +1 @@ +string-del = "null" diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/control/string-lf.toml b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/control/string-lf.toml new file mode 100644 index 0000000000000000000000000000000000000000..0cf9218d7bf082de32795b5579eee685dcf35d99 --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/control/string-lf.toml @@ -0,0 +1 @@ +string-lf = "null" diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/control/string-null.toml b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/control/string-null.toml new file mode 100644 index 0000000000000000000000000000000000000000..821c72c32cffdb36e3e090b510ad6699832fcd47 Binary files /dev/null and b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/control/string-null.toml differ diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/control/string-us.toml b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/control/string-us.toml new file mode 100644 index 0000000000000000000000000000000000000000..af31f57b95b69782f3e244087731aaa0c543d2ad --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/control/string-us.toml @@ -0,0 +1 @@ +string-us = "null" diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/datetime/impossible-date.toml b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/datetime/impossible-date.toml new file mode 100644 index 0000000000000000000000000000000000000000..78b55a39af66a37e8b5e112694d234e37cc22f60 --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/datetime/impossible-date.toml @@ -0,0 +1 @@ +d = 2006-01-50T00:00:00Z diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/datetime/no-leads-with-milli.toml b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/datetime/no-leads-with-milli.toml new file mode 100644 index 0000000000000000000000000000000000000000..eef792f34d6ef9c0880c70868c2ee076dba4f1c6 --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/datetime/no-leads-with-milli.toml @@ -0,0 +1 @@ +with-milli = 1987-07-5T17:45:00.12Z diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/datetime/no-leads.toml b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/datetime/no-leads.toml new file mode 100644 index 0000000000000000000000000000000000000000..123f173beb3ac7282059fe64bca9f8e60d65ac68 --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/datetime/no-leads.toml @@ -0,0 +1 @@ +no-leads = 1987-7-05T17:45:00Z diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/datetime/no-secs.toml b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/datetime/no-secs.toml new file mode 100644 index 0000000000000000000000000000000000000000..ba9390076273ddabaafe4471c9e943e4e312039d --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/datetime/no-secs.toml @@ -0,0 +1 @@ +no-secs = 1987-07-05T17:45Z diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/datetime/no-t.toml b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/datetime/no-t.toml new file mode 100644 index 0000000000000000000000000000000000000000..617e3c56d4008a000d8d705cf6e4eccf2a2707a6 --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/datetime/no-t.toml @@ -0,0 +1 @@ +no-t = 1987-07-0517:45:00Z diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/datetime/trailing-t.toml b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/datetime/trailing-t.toml new file mode 100644 index 0000000000000000000000000000000000000000..9b731ff01ef565d676bda9f9128044c20f5efe9b --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/datetime/trailing-t.toml @@ -0,0 +1 @@ +d = 2006-01-30T diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/encoding/bad-utf8-at-end.toml b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/encoding/bad-utf8-at-end.toml new file mode 100644 index 0000000000000000000000000000000000000000..df5f0b06640c465287d25dff89c660b3b7b2b452 --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/encoding/bad-utf8-at-end.toml @@ -0,0 +1,5 @@ +# There is a 0xda at after the quotes, and no EOL at the end of the file. +# +# This is a bit of an edge case: This indicates there should be two bytes +# (0b1101_1010) but there is no byte to follow because it's the end of the file. +x = """"""Ś \ No newline at end of file diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/encoding/bad-utf8-in-comment.toml b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/encoding/bad-utf8-in-comment.toml new file mode 100644 index 0000000000000000000000000000000000000000..816fa46981ad7c8ff14bfc00cf701a0e023c9a93 --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/encoding/bad-utf8-in-comment.toml @@ -0,0 +1 @@ +# Ć diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/encoding/bad-utf8-in-string.toml b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/encoding/bad-utf8-in-string.toml new file mode 100644 index 0000000000000000000000000000000000000000..6d376fb17b9745c43f3c3cfc01211d38ea047b78 --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/encoding/bad-utf8-in-string.toml @@ -0,0 +1,2 @@ +# The following line contains an invalid UTF-8 sequence. +bad = "Ć" diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/encoding/bom-not-at-start-1.toml b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/encoding/bom-not-at-start-1.toml new file mode 100644 index 0000000000000000000000000000000000000000..effe1f2359c691203eac408da201603fab204fcb --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/encoding/bom-not-at-start-1.toml @@ -0,0 +1 @@ +bom-not-at-start ’ż diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/encoding/bom-not-at-start-2.toml b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/encoding/bom-not-at-start-2.toml new file mode 100644 index 0000000000000000000000000000000000000000..71e52b41ed8d1c2caf66f1eded45928c808a3b71 --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/encoding/bom-not-at-start-2.toml @@ -0,0 +1 @@ +bom-not-at-start= ’ż diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/encoding/utf16-bom.toml b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/encoding/utf16-bom.toml new file mode 100644 index 0000000000000000000000000000000000000000..95b5f9608cb7861af19eecf94d67bdc6dc0e8f37 Binary files /dev/null and b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/encoding/utf16-bom.toml differ diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/encoding/utf16.toml b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/encoding/utf16.toml new file mode 100644 index 0000000000000000000000000000000000000000..de3cbb2cb2ceb28abb334066ac58c8bc06fb0f91 Binary files /dev/null and b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/encoding/utf16.toml differ diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/float/double-point-1.toml b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/float/double-point-1.toml new file mode 100644 index 0000000000000000000000000000000000000000..2105fa9beb2b986208bb21b9f47b28ff2afcafd6 --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/float/double-point-1.toml @@ -0,0 +1 @@ +double-point-1 = 0..1 diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/float/double-point-2.toml b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/float/double-point-2.toml new file mode 100644 index 0000000000000000000000000000000000000000..1ef3d0b736b9ba2eb132289708b4f85165f56c51 --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/float/double-point-2.toml @@ -0,0 +1 @@ +double-point-2 = 0.1.2 diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/float/exp-double-e-1.toml b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/float/exp-double-e-1.toml new file mode 100644 index 0000000000000000000000000000000000000000..ee568ce869510fd9ffb91f9b128b106243608e4b --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/float/exp-double-e-1.toml @@ -0,0 +1 @@ +exp-double-e-1 = 1ee2 diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/float/exp-double-e-2.toml b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/float/exp-double-e-2.toml new file mode 100644 index 0000000000000000000000000000000000000000..8fb0158548d34625e305a0cc78d4da8021deb621 --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/float/exp-double-e-2.toml @@ -0,0 +1 @@ +exp-double-e-2 = 1e2e3 diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/float/exp-double-us.toml b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/float/exp-double-us.toml new file mode 100644 index 0000000000000000000000000000000000000000..63f94e6c52cbdbe458e4215317e77940d93d3cf4 --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/float/exp-double-us.toml @@ -0,0 +1 @@ +exp-double-us = 1e__23 diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/float/exp-leading-us.toml b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/float/exp-leading-us.toml new file mode 100644 index 0000000000000000000000000000000000000000..1426f36af33da6f311794c6c024957720a98ef0e --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/float/exp-leading-us.toml @@ -0,0 +1 @@ +exp-leading-us = 1e_23 diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/float/exp-point-1.toml b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/float/exp-point-1.toml new file mode 100644 index 0000000000000000000000000000000000000000..569590bb8e254839091621fefaa14522d62088dc --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/float/exp-point-1.toml @@ -0,0 +1 @@ +exp-point-1 = 1e2.3 diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/float/exp-point-2.toml b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/float/exp-point-2.toml new file mode 100644 index 0000000000000000000000000000000000000000..4a5e1d4dda2a7836d61569bdd5704678856f43e4 --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/float/exp-point-2.toml @@ -0,0 +1 @@ +exp-point-2 = 1.e2 diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/float/exp-trailing-us.toml b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/float/exp-trailing-us.toml new file mode 100644 index 0000000000000000000000000000000000000000..07c06413c5327d9c26d7cda4e7f5772991e19c43 --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/float/exp-trailing-us.toml @@ -0,0 +1 @@ +exp-trailing-us = 1e_23_ diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/float/float.multi b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/float/float.multi new file mode 100644 index 0000000000000000000000000000000000000000..0708195408c9f121764c3ed1ccd50641ceaba4f3 --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/float/float.multi @@ -0,0 +1,40 @@ +leading-zero = 03.14 +leading-zero-neg = -03.14 +leading-zero-plus = +03.14 + +leading-point = .12345 +leading-point-neg = -.12345 +leading-point-plus = +.12345 + +trailing-point = 1. +trailing-point-min = -1. +trailing-point-plus = +1. + +trailing-us = 1.2_ +leading-us = _1.2 +us-before-point = 1_.2 +us-after-point = 1._2 + +double-point-1 = 0..1 +double-point-2 = 0.1.2 + +exp-point-1 = 1e2.3 +exp-point-2 = 1.e2 + +exp-double-e-1 = 1ee2 +exp-double-e-2 = 1e2e3 + +exp-leading-us = 1e_23 +exp-trailing-us = 1e_23_ +exp-double-us = 1e__23 + +inf-incomplete-1 = in +inf-incomplete-2 = +in +inf-incomplete-3 = -in + +nan-incomplete-1 = na +nan-incomplete-2 = +na +nan-incomplete-3 = -na + +nan_underscore = na_n +inf_underscore = in_f diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/float/inf-incomplete-1.toml b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/float/inf-incomplete-1.toml new file mode 100644 index 0000000000000000000000000000000000000000..2c9ef598e6b0702a6d7bb4cbced95dfda8cb5caa --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/float/inf-incomplete-1.toml @@ -0,0 +1 @@ +inf-incomplete-1 = in diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/float/inf-incomplete-2.toml b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/float/inf-incomplete-2.toml new file mode 100644 index 0000000000000000000000000000000000000000..afda7123dc9fd6aa1b6c52b427e5af36da8b4a87 --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/float/inf-incomplete-2.toml @@ -0,0 +1 @@ +inf-incomplete-2 = +in diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/float/inf-incomplete-3.toml b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/float/inf-incomplete-3.toml new file mode 100644 index 0000000000000000000000000000000000000000..bd8273866d9726271d04b493b723b80a07e84eaf --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/float/inf-incomplete-3.toml @@ -0,0 +1 @@ +inf-incomplete-3 = -in diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/float/inf_underscore.toml b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/float/inf_underscore.toml new file mode 100644 index 0000000000000000000000000000000000000000..8e6ab170933bbe7920fb5e4fd8d416bcef8274aa --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/float/inf_underscore.toml @@ -0,0 +1 @@ +inf_underscore = in_f diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/float/leading-point-neg.toml b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/float/leading-point-neg.toml new file mode 100644 index 0000000000000000000000000000000000000000..74c526fc2baacbae07d4a2056b222c640f3037a0 --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/float/leading-point-neg.toml @@ -0,0 +1 @@ +leading-point-neg = -.12345 diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/float/leading-point-plus.toml b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/float/leading-point-plus.toml new file mode 100644 index 0000000000000000000000000000000000000000..85e23a28245b24b5c933185aec3e97bc5431cab8 --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/float/leading-point-plus.toml @@ -0,0 +1 @@ +leading-point-plus = +.12345 diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/float/leading-point.toml b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/float/leading-point.toml new file mode 100644 index 0000000000000000000000000000000000000000..a3c29b972c1087b88682bb8d59e0d15dec4946e2 --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/float/leading-point.toml @@ -0,0 +1 @@ +leading-point = .12345 diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/float/leading-us.toml b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/float/leading-us.toml new file mode 100644 index 0000000000000000000000000000000000000000..fa94fd0f51228da8377cda1f46673b0fd5bc05c1 --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/float/leading-us.toml @@ -0,0 +1 @@ +leading-us = _1.2 diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/float/leading-zero-neg.toml b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/float/leading-zero-neg.toml new file mode 100644 index 0000000000000000000000000000000000000000..94a4e70aa7661a8ba79477d4536d47aa9b0baf8f --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/float/leading-zero-neg.toml @@ -0,0 +1 @@ +leading-zero-neg = -03.14 diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/float/leading-zero-plus.toml b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/float/leading-zero-plus.toml new file mode 100644 index 0000000000000000000000000000000000000000..12bfd60037adc93628df346405bc199b84c05064 --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/float/leading-zero-plus.toml @@ -0,0 +1 @@ +leading-zero-plus = +03.14 diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/float/leading-zero.toml b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/float/leading-zero.toml new file mode 100644 index 0000000000000000000000000000000000000000..551fb2551053a25b2969302857dba35052f42d0b --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/float/leading-zero.toml @@ -0,0 +1 @@ +leading-zero = 03.14 diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/float/nan-incomplete-1.toml b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/float/nan-incomplete-1.toml new file mode 100644 index 0000000000000000000000000000000000000000..df2e26135289ee5e6d59918a7693b83003a595c9 --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/float/nan-incomplete-1.toml @@ -0,0 +1 @@ +nan-incomplete-1 = na diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/float/nan-incomplete-2.toml b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/float/nan-incomplete-2.toml new file mode 100644 index 0000000000000000000000000000000000000000..6d2e8fb7623207485ad263173e59820520e7ae7a --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/float/nan-incomplete-2.toml @@ -0,0 +1 @@ +nan-incomplete-2 = +na diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/float/nan-incomplete-3.toml b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/float/nan-incomplete-3.toml new file mode 100644 index 0000000000000000000000000000000000000000..9d365acf9ed3d0f9403c18c6c1f78befe912a6cf --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/float/nan-incomplete-3.toml @@ -0,0 +1 @@ +nan-incomplete-3 = -na diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/float/nan_underscore.toml b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/float/nan_underscore.toml new file mode 100644 index 0000000000000000000000000000000000000000..44c8bf16f259d9d021b5374b0087f00982f12e48 --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/float/nan_underscore.toml @@ -0,0 +1 @@ +nan_underscore = na_n diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/float/trailing-point-min.toml b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/float/trailing-point-min.toml new file mode 100644 index 0000000000000000000000000000000000000000..48741e3b1896c6808c27ac155b19edf37ade51d8 --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/float/trailing-point-min.toml @@ -0,0 +1 @@ +trailing-point-min = -1. diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/float/trailing-point-plus.toml b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/float/trailing-point-plus.toml new file mode 100644 index 0000000000000000000000000000000000000000..99260390f772a952d1775003df78f20d16b6c9c0 --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/float/trailing-point-plus.toml @@ -0,0 +1 @@ +trailing-point-plus = +1. diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/float/trailing-point.toml b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/float/trailing-point.toml new file mode 100644 index 0000000000000000000000000000000000000000..76c95d916d80130551b81da9441ecb6d69fc5ae1 --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/float/trailing-point.toml @@ -0,0 +1 @@ +trailing-point = 1. diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/float/trailing-us.toml b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/float/trailing-us.toml new file mode 100644 index 0000000000000000000000000000000000000000..ddfb7ba00522e7aa046e6f5acf7bb6e8b1f7564d --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/float/trailing-us.toml @@ -0,0 +1 @@ +trailing-us = 1.2_ diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/float/us-after-point.toml b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/float/us-after-point.toml new file mode 100644 index 0000000000000000000000000000000000000000..7f15f5709112da73eeb432c616c564720e4c45ec --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/float/us-after-point.toml @@ -0,0 +1 @@ +us-after-point = 1._2 diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/float/us-before-point.toml b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/float/us-before-point.toml new file mode 100644 index 0000000000000000000000000000000000000000..c8edcbf0ce42d054eb198d9764dbae606aacd337 --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/float/us-before-point.toml @@ -0,0 +1 @@ +us-before-point = 1_.2 diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/inline-table/double-comma.toml b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/inline-table/double-comma.toml new file mode 100644 index 0000000000000000000000000000000000000000..2d2913a3959707fb3114003caf841ac07b90ad92 --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/inline-table/double-comma.toml @@ -0,0 +1 @@ +t = {x=3,,y=4} diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/inline-table/empty.toml b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/inline-table/empty.toml new file mode 100644 index 0000000000000000000000000000000000000000..ebbb06664de4c2026b46eb1f2e8c3caedbae484e --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/inline-table/empty.toml @@ -0,0 +1 @@ +t = {,} diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/inline-table/linebreak-1.toml b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/inline-table/linebreak-1.toml new file mode 100644 index 0000000000000000000000000000000000000000..0ae44b63cec2b325653cb7a228e29f6344e0bce8 --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/inline-table/linebreak-1.toml @@ -0,0 +1,4 @@ +# No newlines are allowed between the curly braces unless they are valid within +# a value. +simple = { a = 1 +} diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/inline-table/linebreak-2.toml b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/inline-table/linebreak-2.toml new file mode 100644 index 0000000000000000000000000000000000000000..5ea4eaf5fb03e33aa77c976dc6e2e367724c4ba2 --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/inline-table/linebreak-2.toml @@ -0,0 +1,2 @@ +t = {a=1, +b=2} diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/inline-table/linebreak-3.toml b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/inline-table/linebreak-3.toml new file mode 100644 index 0000000000000000000000000000000000000000..7f6e89249404ff4c82f72ed5e4d3bc9baade137f --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/inline-table/linebreak-3.toml @@ -0,0 +1,2 @@ +t = {a=1 +,b=2} diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/inline-table/linebreak-4.toml b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/inline-table/linebreak-4.toml new file mode 100644 index 0000000000000000000000000000000000000000..3f34e15c07216925adae9ec72f2e01e1b0c24fbf --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/inline-table/linebreak-4.toml @@ -0,0 +1,4 @@ +json_like = { + first = "Tom", + last = "Preston-Werner" +} diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/inline-table/no-comma.toml b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/inline-table/no-comma.toml new file mode 100644 index 0000000000000000000000000000000000000000..0a4083de557c57a0b1adf17a5c980165feb52107 --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/inline-table/no-comma.toml @@ -0,0 +1 @@ +t = {x = 3 y = 4} diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/inline-table/trailing-comma.toml b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/inline-table/trailing-comma.toml new file mode 100644 index 0000000000000000000000000000000000000000..6b67e02096c10895776a553e653f92f49e9c8290 --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/inline-table/trailing-comma.toml @@ -0,0 +1,3 @@ +# A terminating comma (also called trailing comma) is not permitted after the +# last key/value pair in an inline table +abc = { abc = 123, } diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/integer/capital-bin.toml b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/integer/capital-bin.toml new file mode 100644 index 0000000000000000000000000000000000000000..bea4e5e2709d5df49b6c3c3b34d77e23d4860e29 --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/integer/capital-bin.toml @@ -0,0 +1 @@ +capital-bin = 0B0 diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/integer/capital-hex.toml b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/integer/capital-hex.toml new file mode 100644 index 0000000000000000000000000000000000000000..bc064bb6301c32ba7dd9c1bdebc083222cd9c539 --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/integer/capital-hex.toml @@ -0,0 +1 @@ +capital-hex = 0X1 diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/integer/capital-oct.toml b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/integer/capital-oct.toml new file mode 100644 index 0000000000000000000000000000000000000000..ea08a4da9161a15a1ba3c9e9692dbc04dd5626f4 --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/integer/capital-oct.toml @@ -0,0 +1 @@ +capital-oct = 0O0 diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/integer/double-sign-nex.toml b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/integer/double-sign-nex.toml new file mode 100644 index 0000000000000000000000000000000000000000..ff014cf051b37db2a5961f310476b3ecf446ba02 --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/integer/double-sign-nex.toml @@ -0,0 +1 @@ +double-sign-nex = --99 diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/integer/double-sign-plus.toml b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/integer/double-sign-plus.toml new file mode 100644 index 0000000000000000000000000000000000000000..845ebb599a1aa357dfb8252690ec59da02606e17 --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/integer/double-sign-plus.toml @@ -0,0 +1 @@ +double-sign-plus = ++99 diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/integer/double-us.toml b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/integer/double-us.toml new file mode 100644 index 0000000000000000000000000000000000000000..cd00561f6d0d022beb0f92114018924898811072 --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/integer/double-us.toml @@ -0,0 +1 @@ +double-us = 1__23 diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/integer/integer.multi b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/integer/integer.multi new file mode 100644 index 0000000000000000000000000000000000000000..eaf4b082d02e9003a4bded8775573a25df338308 --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/integer/integer.multi @@ -0,0 +1,39 @@ +leading-zero-1 = 01 +leading-zero-2 = 00 +leading-zero-sign-1 = -01 +leading-zero-sign-2 = +01 + +double-sign-plus = ++99 +double-sign-nex = --99 + +negative-hex = -0xff +negative-bin = -0b11010110 +negative-oct = -0o99 + +positive-hex = +0xff +positive-bin = +0b11010110 +positive-oct = +0o99 + +trailing-us = 123_ +leading-us = _123 +double-us = 1__23 + +us-after-hex = 0x_1 +us-after-oct = 0o_1 +us-after-bin = 0b_1 + +trailing-us-hex = 0x1_ +trailing-us-oct = 0o1_ +trailing-us-bin = 0b1_ + +leading-us-hex = _0o1 +leading-us-oct = _0o1 +leading-us-bin = _0o1 + +invalid-hex = 0xaafz +invalid-oct = 0o778 +invalid-bin = 0b0012 + +capital-hex = 0X1 +capital-oct = 0O0 +capital-bin = 0B0 diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/integer/invalid-bin.toml b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/integer/invalid-bin.toml new file mode 100644 index 0000000000000000000000000000000000000000..d0182581bc199d8822c554def0f29bc2d6449ec7 --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/integer/invalid-bin.toml @@ -0,0 +1 @@ +invalid-bin = 0b0012 diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/integer/invalid-hex.toml b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/integer/invalid-hex.toml new file mode 100644 index 0000000000000000000000000000000000000000..7cc0e855e556cfe652daab868544dade497dc6b0 --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/integer/invalid-hex.toml @@ -0,0 +1 @@ +invalid-hex = 0xaafz diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/integer/invalid-oct.toml b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/integer/invalid-oct.toml new file mode 100644 index 0000000000000000000000000000000000000000..03181b1a4553e062233a9318be9032d320ce4de1 --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/integer/invalid-oct.toml @@ -0,0 +1 @@ +invalid-oct = 0o778 diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/integer/leading-us-bin.toml b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/integer/leading-us-bin.toml new file mode 100644 index 0000000000000000000000000000000000000000..8885c031a8524c13fa3979f4c6f0186af0e254ee --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/integer/leading-us-bin.toml @@ -0,0 +1 @@ +leading-us-bin = _0o1 diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/integer/leading-us-hex.toml b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/integer/leading-us-hex.toml new file mode 100644 index 0000000000000000000000000000000000000000..9f193f80e9830a4af6d0b571a5c4ea8cb0df2e4d --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/integer/leading-us-hex.toml @@ -0,0 +1 @@ +leading-us-hex = _0o1 diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/integer/leading-us-oct.toml b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/integer/leading-us-oct.toml new file mode 100644 index 0000000000000000000000000000000000000000..a717f1c81436e83ed31348c45c89147f389d6dc2 --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/integer/leading-us-oct.toml @@ -0,0 +1 @@ +leading-us-oct = _0o1 diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/integer/leading-us.toml b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/integer/leading-us.toml new file mode 100644 index 0000000000000000000000000000000000000000..d059f50a87aced5ce41b7db5b4861f7a257bc1b5 --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/integer/leading-us.toml @@ -0,0 +1 @@ +leading-us = _123 diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/integer/leading-zero-1.toml b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/integer/leading-zero-1.toml new file mode 100644 index 0000000000000000000000000000000000000000..eba6bda313bf604b90c16472fe7e94e66146e618 --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/integer/leading-zero-1.toml @@ -0,0 +1 @@ +leading-zero-1 = 01 diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/integer/leading-zero-2.toml b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/integer/leading-zero-2.toml new file mode 100644 index 0000000000000000000000000000000000000000..436af56527d611664808f28587617bf21dc4b6fd --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/integer/leading-zero-2.toml @@ -0,0 +1 @@ +leading-zero-2 = 00 diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/integer/leading-zero-sign-1.toml b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/integer/leading-zero-sign-1.toml new file mode 100644 index 0000000000000000000000000000000000000000..1f15a9da548eacd556be22d56280d71af1a10b16 --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/integer/leading-zero-sign-1.toml @@ -0,0 +1 @@ +leading-zero-sign-1 = -01 diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/integer/leading-zero-sign-2.toml b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/integer/leading-zero-sign-2.toml new file mode 100644 index 0000000000000000000000000000000000000000..fa259c3cd352af373f4f216f54d5669690da09b9 --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/integer/leading-zero-sign-2.toml @@ -0,0 +1 @@ +leading-zero-sign-2 = +01 diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/integer/negative-bin.toml b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/integer/negative-bin.toml new file mode 100644 index 0000000000000000000000000000000000000000..948b23678af83b1654c6ca23bd9496ec2339177f --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/integer/negative-bin.toml @@ -0,0 +1 @@ +negative-bin = -0b11010110 diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/integer/negative-hex.toml b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/integer/negative-hex.toml new file mode 100644 index 0000000000000000000000000000000000000000..67c31ea4364fbfc0debf72080f89c00b8ca1e2de --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/integer/negative-hex.toml @@ -0,0 +1 @@ +negative-hex = -0xff diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/integer/negative-oct.toml b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/integer/negative-oct.toml new file mode 100644 index 0000000000000000000000000000000000000000..b0c5ab0da3de066d02f48ae889bf2bea6c2e2536 --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/integer/negative-oct.toml @@ -0,0 +1 @@ +negative-oct = -0o99 diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/integer/positive-bin.toml b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/integer/positive-bin.toml new file mode 100644 index 0000000000000000000000000000000000000000..7d6de6517243382387e7c490e612d3ef27d6564b --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/integer/positive-bin.toml @@ -0,0 +1 @@ +positive-bin = +0b11010110 diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/integer/positive-hex.toml b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/integer/positive-hex.toml new file mode 100644 index 0000000000000000000000000000000000000000..bd503aad41807471971b2f4402b96697ce9c0da3 --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/integer/positive-hex.toml @@ -0,0 +1 @@ +positive-hex = +0xff diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/integer/positive-oct.toml b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/integer/positive-oct.toml new file mode 100644 index 0000000000000000000000000000000000000000..d77aa5213e15e95dc03612d4e94c558312b0fae0 --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/integer/positive-oct.toml @@ -0,0 +1 @@ +positive-oct = +0o99 diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/integer/text-after-integer.toml b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/integer/text-after-integer.toml new file mode 100644 index 0000000000000000000000000000000000000000..42de7aff4d85693158d073e53fa73f96b36215cf --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/integer/text-after-integer.toml @@ -0,0 +1 @@ +answer = 42 the ultimate answer? diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/integer/trailing-us-bin.toml b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/integer/trailing-us-bin.toml new file mode 100644 index 0000000000000000000000000000000000000000..9a0b57419ce0237975c4035a0b932906fbe41ce4 --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/integer/trailing-us-bin.toml @@ -0,0 +1 @@ +trailing-us-bin = 0b1_ diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/integer/trailing-us-hex.toml b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/integer/trailing-us-hex.toml new file mode 100644 index 0000000000000000000000000000000000000000..2a9645509a79e30976e7c8db967e5c4af8b4a6bc --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/integer/trailing-us-hex.toml @@ -0,0 +1 @@ +trailing-us-hex = 0x1_ diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/integer/trailing-us-oct.toml b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/integer/trailing-us-oct.toml new file mode 100644 index 0000000000000000000000000000000000000000..d28e8bca90916cad093def954a303c8310e5dfba --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/integer/trailing-us-oct.toml @@ -0,0 +1 @@ +trailing-us-oct = 0o1_ diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/integer/trailing-us.toml b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/integer/trailing-us.toml new file mode 100644 index 0000000000000000000000000000000000000000..e11e8ff6b04f5b70fcdfd4e8180caf9ca291ec4d --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/integer/trailing-us.toml @@ -0,0 +1 @@ +trailing-us = 123_ diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/integer/us-after-bin.toml b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/integer/us-after-bin.toml new file mode 100644 index 0000000000000000000000000000000000000000..61dd895deacd6a61db94cadf8566d1b3793bc0ae --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/integer/us-after-bin.toml @@ -0,0 +1 @@ +us-after-bin = 0b_1 diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/integer/us-after-hex.toml b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/integer/us-after-hex.toml new file mode 100644 index 0000000000000000000000000000000000000000..200220ad93ab517118d20f668ee206f373bb0078 --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/integer/us-after-hex.toml @@ -0,0 +1 @@ +us-after-hex = 0x_1 diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/integer/us-after-oct.toml b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/integer/us-after-oct.toml new file mode 100644 index 0000000000000000000000000000000000000000..23f530030d608a5625c0b3d02754085fc33a732c --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/integer/us-after-oct.toml @@ -0,0 +1 @@ +us-after-oct = 0o_1 diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/key/after-array.toml b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/key/after-array.toml new file mode 100644 index 0000000000000000000000000000000000000000..5c1a1b0a9bc50fd2ab7b2bab904e452827590998 --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/key/after-array.toml @@ -0,0 +1 @@ +[[agencies]] owner = "S Cjelli" diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/key/after-table.toml b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/key/after-table.toml new file mode 100644 index 0000000000000000000000000000000000000000..68867842cb8e202f193075a7e721d77c6234ae02 --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/key/after-table.toml @@ -0,0 +1 @@ +[error] this = "should not be here" diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/key/after-value.toml b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/key/after-value.toml new file mode 100644 index 0000000000000000000000000000000000000000..e05c47c231f3f3be4ee4d156e5480f7933b47980 --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/key/after-value.toml @@ -0,0 +1 @@ +first = "Tom" last = "Preston-Werner" # INVALID diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/key/bare-invalid-character.toml b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/key/bare-invalid-character.toml new file mode 100644 index 0000000000000000000000000000000000000000..e50dbe38894c9bdb25b5955e2d50ac2cec4e22ec --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/key/bare-invalid-character.toml @@ -0,0 +1 @@ +bare!key = 123 diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/key/dotted-redefine-table.toml b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/key/dotted-redefine-table.toml new file mode 100644 index 0000000000000000000000000000000000000000..55e25ac08388544af7acc388acf219e03b816804 --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/key/dotted-redefine-table.toml @@ -0,0 +1,4 @@ +# Defined a.b as int +a.b = 1 +# Tries to access it as table: error +a.b.c = 2 diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/key/duplicate-keys.toml b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/key/duplicate-keys.toml new file mode 100644 index 0000000000000000000000000000000000000000..9b5aee0e59b35b0b547c93ddcc6effe42ab9a45d --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/key/duplicate-keys.toml @@ -0,0 +1,2 @@ +dupe = false +dupe = true diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/key/duplicate.toml b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/key/duplicate.toml new file mode 100644 index 0000000000000000000000000000000000000000..7847bd401dcc2a32801f71f2d65b7ab2c46cffe0 --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/key/duplicate.toml @@ -0,0 +1,3 @@ +# DO NOT DO THIS +name = "Tom" +name = "Pradyun" diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/key/empty.toml b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/key/empty.toml new file mode 100644 index 0000000000000000000000000000000000000000..09f998f4163e1bff9e58278ebd89573819285c18 --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/key/empty.toml @@ -0,0 +1 @@ + = 1 diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/key/escape.toml b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/key/escape.toml new file mode 100644 index 0000000000000000000000000000000000000000..cdb8f4d68e378e6153df084a3ffff88595275b71 --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/key/escape.toml @@ -0,0 +1 @@ +\u00c0 = "latin capital letter A with grave" diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/key/hash.toml b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/key/hash.toml new file mode 100644 index 0000000000000000000000000000000000000000..e321b1fbd0c969ce97800814ed51d605f886b9ae --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/key/hash.toml @@ -0,0 +1 @@ +a# = 1 diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/key/multiline.toml b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/key/multiline.toml new file mode 100644 index 0000000000000000000000000000000000000000..31ff67e4233d080b8f666bf3bb57870ad8c1c2c6 --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/key/multiline.toml @@ -0,0 +1,2 @@ +"""long +key""" = 1 diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/key/newline.toml b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/key/newline.toml new file mode 100644 index 0000000000000000000000000000000000000000..24acaa1b1fc44a8802a5b1032f53a1c76cf8344c --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/key/newline.toml @@ -0,0 +1,2 @@ +barekey + = 123 diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/key/no-eol.toml b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/key/no-eol.toml new file mode 100644 index 0000000000000000000000000000000000000000..3c58eee182b2118be78f98b42a4aee0e8ec9f713 --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/key/no-eol.toml @@ -0,0 +1 @@ +a = 1 b = 2 diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/key/open-bracket.toml b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/key/open-bracket.toml new file mode 100644 index 0000000000000000000000000000000000000000..f0aeb16e50003fe97ae7bb08f923168a4cacdfec --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/key/open-bracket.toml @@ -0,0 +1 @@ +[abc = 1 diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/key/partial-quoted.toml b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/key/partial-quoted.toml new file mode 100644 index 0000000000000000000000000000000000000000..e491a2f11fa16356730bbffafccc4cbe49cb9888 --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/key/partial-quoted.toml @@ -0,0 +1 @@ +partial"quoted" = 5 diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/key/single-open-bracket.toml b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/key/single-open-bracket.toml new file mode 100644 index 0000000000000000000000000000000000000000..558ed37d93c5c3777af9d85eb79760e5b95d64c6 --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/key/single-open-bracket.toml @@ -0,0 +1 @@ +[ diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/key/space.toml b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/key/space.toml new file mode 100644 index 0000000000000000000000000000000000000000..7c22703e888e74a9837eb8222af6486365470e79 --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/key/space.toml @@ -0,0 +1 @@ +a b = 1 diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/key/special-character.toml b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/key/special-character.toml new file mode 100644 index 0000000000000000000000000000000000000000..bc181a5cc9f52dfc191acc21977134c797522506 --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/key/special-character.toml @@ -0,0 +1 @@ +μ = "greek small letter mu" diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/key/start-bracket.toml b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/key/start-bracket.toml new file mode 100644 index 0000000000000000000000000000000000000000..e0597ae1c6f1ca3fbc8dc3ba692d5aa9661d8b95 --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/key/start-bracket.toml @@ -0,0 +1,3 @@ +[a] +[xyz = 5 +[b] diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/key/two-equals.toml b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/key/two-equals.toml new file mode 100644 index 0000000000000000000000000000000000000000..25a037894eb0fc9adef5fa3ef69547dd087b7662 --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/key/two-equals.toml @@ -0,0 +1 @@ +key= = 1 diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/key/two-equals2.toml b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/key/two-equals2.toml new file mode 100644 index 0000000000000000000000000000000000000000..c5f2de8b69f28221be33ea98a24a27cba57811ad --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/key/two-equals2.toml @@ -0,0 +1 @@ +a==1 diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/key/two-equals3.toml b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/key/two-equals3.toml new file mode 100644 index 0000000000000000000000000000000000000000..eb203729a8ae7563308c70d57cb2732b4171a0c1 --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/key/two-equals3.toml @@ -0,0 +1 @@ +a=b=1 diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/key/without-value-1.toml b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/key/without-value-1.toml new file mode 100644 index 0000000000000000000000000000000000000000..06bfde493370196db0ee5355ce9c073af4c3c272 --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/key/without-value-1.toml @@ -0,0 +1 @@ +key diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/key/without-value-2.toml b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/key/without-value-2.toml new file mode 100644 index 0000000000000000000000000000000000000000..ca6d7eba676dab06a8b87577887896926011643b --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/key/without-value-2.toml @@ -0,0 +1 @@ +key = diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/string/bad-byte-escape.toml b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/string/bad-byte-escape.toml new file mode 100644 index 0000000000000000000000000000000000000000..4c7be59f4b16cb34c0586a94b586a99e86238705 --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/string/bad-byte-escape.toml @@ -0,0 +1 @@ +naughty = "\xAg" diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/string/bad-codepoint.toml b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/string/bad-codepoint.toml new file mode 100644 index 0000000000000000000000000000000000000000..592db75bb0c34c361e55429a7a77b4d9e63e3ab5 --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/string/bad-codepoint.toml @@ -0,0 +1 @@ +invalid-codepoint = "This string contains a non scalar unicode codepoint \uD801" diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/string/bad-concat.toml b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/string/bad-concat.toml new file mode 100644 index 0000000000000000000000000000000000000000..fc6d3c9cf0f9d672ff0c97c32f3aa341913c9c13 --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/string/bad-concat.toml @@ -0,0 +1 @@ +no_concat = "first" "second" diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/string/bad-escape.toml b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/string/bad-escape.toml new file mode 100644 index 0000000000000000000000000000000000000000..60acb0ccc50774299c963e18acaa8277f7503b9f --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/string/bad-escape.toml @@ -0,0 +1 @@ +invalid-escape = "This string has a bad \a escape character." diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/string/bad-multiline.toml b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/string/bad-multiline.toml new file mode 100644 index 0000000000000000000000000000000000000000..786046b55a41b4b55c449202ce19ecd773dbe053 --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/string/bad-multiline.toml @@ -0,0 +1,2 @@ +multi = "first line +second line" diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/string/bad-slash-escape.toml b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/string/bad-slash-escape.toml new file mode 100644 index 0000000000000000000000000000000000000000..154abadd5c3eb6d4d83c9147cc44a415111e4698 --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/string/bad-slash-escape.toml @@ -0,0 +1 @@ +invalid-escape = "This string has a bad \/ escape character." diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/string/bad-uni-esc.toml b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/string/bad-uni-esc.toml new file mode 100644 index 0000000000000000000000000000000000000000..9eae4ab96e5fd5f89b3d6ba8fb6b260584536fb3 --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/string/bad-uni-esc.toml @@ -0,0 +1 @@ +str = "val\ue" diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/string/basic-byte-escapes.toml b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/string/basic-byte-escapes.toml new file mode 100644 index 0000000000000000000000000000000000000000..e94452a8dfc882903934f2e086f50427af5266f8 --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/string/basic-byte-escapes.toml @@ -0,0 +1 @@ +answer = "\x33" diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/string/basic-multiline-out-of-range-unicode-escape-1.toml b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/string/basic-multiline-out-of-range-unicode-escape-1.toml new file mode 100644 index 0000000000000000000000000000000000000000..b27e203c748a92e759e0744f45e924857368eee0 --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/string/basic-multiline-out-of-range-unicode-escape-1.toml @@ -0,0 +1 @@ +a = """\UFFFFFFFF""" diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/string/basic-multiline-out-of-range-unicode-escape-2.toml b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/string/basic-multiline-out-of-range-unicode-escape-2.toml new file mode 100644 index 0000000000000000000000000000000000000000..17a9361b3fd7c1f04cba6e72d98aa63bbc8c18d4 --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/string/basic-multiline-out-of-range-unicode-escape-2.toml @@ -0,0 +1 @@ +a = """\U00D80000""" diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/string/basic-multiline-quotes.toml b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/string/basic-multiline-quotes.toml new file mode 100644 index 0000000000000000000000000000000000000000..02ebf13a0c8ce48f5268396c5b480c417a29922c --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/string/basic-multiline-quotes.toml @@ -0,0 +1 @@ +str5 = """Here are three quotation marks: """.""" diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/string/basic-multiline-unknown-escape.toml b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/string/basic-multiline-unknown-escape.toml new file mode 100644 index 0000000000000000000000000000000000000000..35c5cc5ea75c771c2699848c657d339144437721 --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/string/basic-multiline-unknown-escape.toml @@ -0,0 +1 @@ +a = """\@""" diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/string/basic-out-of-range-unicode-escape-1.toml b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/string/basic-out-of-range-unicode-escape-1.toml new file mode 100644 index 0000000000000000000000000000000000000000..ada1f557ff9c119ad0031ce9d50400a7a665f1b3 --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/string/basic-out-of-range-unicode-escape-1.toml @@ -0,0 +1 @@ +a = "\UFFFFFFFF" diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/string/basic-out-of-range-unicode-escape-2.toml b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/string/basic-out-of-range-unicode-escape-2.toml new file mode 100644 index 0000000000000000000000000000000000000000..d4833b3dbbbc558cc0275dc5b074725dc3350f34 --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/string/basic-out-of-range-unicode-escape-2.toml @@ -0,0 +1 @@ +a = "\U00D80000" diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/string/basic-unknown-escape.toml b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/string/basic-unknown-escape.toml new file mode 100644 index 0000000000000000000000000000000000000000..381dd858c1573c4f2d95b58789ca6ea0836f5c91 --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/string/basic-unknown-escape.toml @@ -0,0 +1 @@ +a = "\@" diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/string/literal-multiline-quotes-1.toml b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/string/literal-multiline-quotes-1.toml new file mode 100644 index 0000000000000000000000000000000000000000..9cfb763560b5f68692eb41186ef5da29f3df6de2 --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/string/literal-multiline-quotes-1.toml @@ -0,0 +1,2 @@ +a = '''6 apostrophes: '''''' + diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/string/literal-multiline-quotes-2.toml b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/string/literal-multiline-quotes-2.toml new file mode 100644 index 0000000000000000000000000000000000000000..9924236e96b5b1bd1b8884c8aedc3763db27b71c --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/string/literal-multiline-quotes-2.toml @@ -0,0 +1 @@ +a = '''15 apostrophes: '''''''''''''''''' diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/string/missing-quotes.toml b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/string/missing-quotes.toml new file mode 100644 index 0000000000000000000000000000000000000000..22927931ae1c76c3863b3a87a4888bd534f3ceba --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/string/missing-quotes.toml @@ -0,0 +1 @@ +name = value diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/string/multiline-escape-space.toml b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/string/multiline-escape-space.toml new file mode 100644 index 0000000000000000000000000000000000000000..13570d3b6a9a9a473a23a56af8228564f6ba06d9 --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/string/multiline-escape-space.toml @@ -0,0 +1,3 @@ +a = """ + foo \ \n + bar""" diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/string/multiline-no-close-2.toml b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/string/multiline-no-close-2.toml new file mode 100644 index 0000000000000000000000000000000000000000..f46940206c18f65a55db6e2278fbf0a0ffd8f951 --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/string/multiline-no-close-2.toml @@ -0,0 +1 @@ +x=""" diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/string/multiline-no-close.toml b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/string/multiline-no-close.toml new file mode 100644 index 0000000000000000000000000000000000000000..4ca959715a95379cdfda60120c8405d32827a567 --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/string/multiline-no-close.toml @@ -0,0 +1,2 @@ +invalid = """ + this will fail diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/string/multiline-quotes-1.toml b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/string/multiline-quotes-1.toml new file mode 100644 index 0000000000000000000000000000000000000000..9f7a42b7775ba97d1bfedcba61af6412ed96b951 --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/string/multiline-quotes-1.toml @@ -0,0 +1 @@ +a = """6 quotes: """""" diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/string/multiline-quotes-2.toml b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/string/multiline-quotes-2.toml new file mode 100644 index 0000000000000000000000000000000000000000..9f7a42b7775ba97d1bfedcba61af6412ed96b951 --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/string/multiline-quotes-2.toml @@ -0,0 +1 @@ +a = """6 quotes: """""" diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/string/no-close.toml b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/string/no-close.toml new file mode 100644 index 0000000000000000000000000000000000000000..0c292fcab730d5ee7e3026407407b992fdcabab8 --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/string/no-close.toml @@ -0,0 +1 @@ +no-ending-quote = "One time, at band camp diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/string/text-after-string.toml b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/string/text-after-string.toml new file mode 100644 index 0000000000000000000000000000000000000000..c92a6f11d85a7570cce1d9383a2911812d914e5b --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/string/text-after-string.toml @@ -0,0 +1 @@ +string = "Is there life after strings?" No. diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/string/wrong-close.toml b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/string/wrong-close.toml new file mode 100644 index 0000000000000000000000000000000000000000..0f5c8011ea58f304ad8ade7aed752c1488e8999c --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/string/wrong-close.toml @@ -0,0 +1 @@ +bad-ending-quote = "double and single' diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/table/array-empty.toml b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/table/array-empty.toml new file mode 100644 index 0000000000000000000000000000000000000000..a470ca332f31f4a9c57a5971c36aec0caf999781 --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/table/array-empty.toml @@ -0,0 +1,2 @@ +[[]] +name = "Born to Run" diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/table/array-implicit.toml b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/table/array-implicit.toml new file mode 100644 index 0000000000000000000000000000000000000000..05f2507ecb687f308c655182da0a1f28d34a18a1 --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/table/array-implicit.toml @@ -0,0 +1,14 @@ +# This test is a bit tricky. It should fail because the first use of +# `[[albums.songs]]` without first declaring `albums` implies that `albums` +# must be a table. The alternative would be quite weird. Namely, it wouldn't +# comply with the TOML spec: "Each double-bracketed sub-table will belong to +# the most *recently* defined table element *above* it." +# +# This is in contrast to the *valid* test, table-array-implicit where +# `[[albums.songs]]` works by itself, so long as `[[albums]]` isn't declared +# later. (Although, `[albums]` could be.) +[[albums.songs]] +name = "Glory Days" + +[[albums]] +name = "Born in the USA" diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/table/array-missing-bracket.toml b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/table/array-missing-bracket.toml new file mode 100644 index 0000000000000000000000000000000000000000..39c73b05c44e44043f7187ff87a22a70071c7944 --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/table/array-missing-bracket.toml @@ -0,0 +1,2 @@ +[[albums] +name = "Born to Run" diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/table/duplicate-key-table.toml b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/table/duplicate-key-table.toml new file mode 100644 index 0000000000000000000000000000000000000000..cedf05fc53bff115a6530fb2c8917ca7e2afd95b --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/table/duplicate-key-table.toml @@ -0,0 +1,5 @@ +[fruit] +type = "apple" + +[fruit.type] +apple = "yes" diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/table/duplicate-table-array.toml b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/table/duplicate-table-array.toml new file mode 100644 index 0000000000000000000000000000000000000000..a1d87059eb029ca0a7fea51ecbb2188ecec9d5ba --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/table/duplicate-table-array.toml @@ -0,0 +1,2 @@ +[tbl] +[[tbl]] diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/table/duplicate-table-array2.toml b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/table/duplicate-table-array2.toml new file mode 100644 index 0000000000000000000000000000000000000000..72eacbd10b43fd4e284670b8cd0068c989980d9c --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/table/duplicate-table-array2.toml @@ -0,0 +1,2 @@ +[[tbl]] +[tbl] diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/table/duplicate.toml b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/table/duplicate.toml new file mode 100644 index 0000000000000000000000000000000000000000..73ef1cc7c720a2251dbb82e6cebbffbffb04dfa5 --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/table/duplicate.toml @@ -0,0 +1,5 @@ +[a] +b = 1 + +[a] +c = 2 diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/table/empty-implicit-table.toml b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/table/empty-implicit-table.toml new file mode 100644 index 0000000000000000000000000000000000000000..0cc36d0d28154acd0cf9c4399a7f3c5b499373bc --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/table/empty-implicit-table.toml @@ -0,0 +1 @@ +[naughty..naughty] diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/table/empty.toml b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/table/empty.toml new file mode 100644 index 0000000000000000000000000000000000000000..fe51488c7066f6687ef680d6bfaa4f7768ef205c --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/table/empty.toml @@ -0,0 +1 @@ +[] diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/table/equals-sign.toml b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/table/equals-sign.toml new file mode 100644 index 0000000000000000000000000000000000000000..eb5e742f768845265a98e244b631362d3e499f6b --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/table/equals-sign.toml @@ -0,0 +1 @@ +[name=bad] diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/table/llbrace.toml b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/table/llbrace.toml new file mode 100644 index 0000000000000000000000000000000000000000..047978e5bc784825b6f92aa5ca8c0827049358c6 --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/table/llbrace.toml @@ -0,0 +1 @@ +[ [table]] diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/table/nested-brackets-close.toml b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/table/nested-brackets-close.toml new file mode 100644 index 0000000000000000000000000000000000000000..c8b5a67858006c557bbb420d91fee14af778011b --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/table/nested-brackets-close.toml @@ -0,0 +1,2 @@ +[a]b] +zyx = 42 diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/table/nested-brackets-open.toml b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/table/nested-brackets-open.toml new file mode 100644 index 0000000000000000000000000000000000000000..246d7e91fe4fb16ba1f2b3f89294fbff0c6ea1c7 --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/table/nested-brackets-open.toml @@ -0,0 +1,2 @@ +[a[b] +zyx = 42 diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/table/quoted-no-close.toml b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/table/quoted-no-close.toml new file mode 100644 index 0000000000000000000000000000000000000000..6e7c1a1ed3fa23c789a4be28d87482368e74dc8f --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/table/quoted-no-close.toml @@ -0,0 +1,2 @@ +["where will it end] +name = value diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/table/redefine.toml b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/table/redefine.toml new file mode 100644 index 0000000000000000000000000000000000000000..fc23bf7d61788ce3be2c72583266f2a8cafee073 --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/table/redefine.toml @@ -0,0 +1,6 @@ +# Define b as int, and try to use it as a table: error +[a] +b = 1 + +[a.b] +c = 2 diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/table/rrbrace.toml b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/table/rrbrace.toml new file mode 100644 index 0000000000000000000000000000000000000000..3a4dee471268539d6a162086fe4dee8b458dd138 --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/table/rrbrace.toml @@ -0,0 +1 @@ +[[table] ] diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/table/text-after-table.toml b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/table/text-after-table.toml new file mode 100644 index 0000000000000000000000000000000000000000..87da9db26dffc26cfef91ddaee80e4c87dc5b326 --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/table/text-after-table.toml @@ -0,0 +1 @@ +[error] this shouldn't be here diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/table/whitespace.toml b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/table/whitespace.toml new file mode 100644 index 0000000000000000000000000000000000000000..0a6a6a69725c4af727e5f86ecc3436b3b2726061 --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/table/whitespace.toml @@ -0,0 +1 @@ +[invalid key] diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/table/with-pound.toml b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/table/with-pound.toml new file mode 100644 index 0000000000000000000000000000000000000000..e7b777ecfb305f8855fd4d5aa38927ea41b59105 --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/invalid/table/with-pound.toml @@ -0,0 +1,2 @@ +[key#group] +answer = 42 diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/array/array.json b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/array/array.json new file mode 100644 index 0000000000000000000000000000000000000000..4e9d45b86ff93419edb90f203af155d929c8fed8 --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/array/array.json @@ -0,0 +1,68 @@ +{ + "comments": [ + { + "type": "integer", + "value": "1" + }, + { + "type": "integer", + "value": "2" + } + ], + "dates": [ + { + "type": "datetime", + "value": "1987-07-05T17:45:00Z" + }, + { + "type": "datetime", + "value": "1979-05-27T07:32:00Z" + }, + { + "type": "datetime", + "value": "2006-06-01T11:00:00Z" + } + ], + "floats": [ + { + "type": "float", + "value": "1.1" + }, + { + "type": "float", + "value": "2.1" + }, + { + "type": "float", + "value": "3.1" + } + ], + "ints": [ + { + "type": "integer", + "value": "1" + }, + { + "type": "integer", + "value": "2" + }, + { + "type": "integer", + "value": "3" + } + ], + "strings": [ + { + "type": "string", + "value": "a" + }, + { + "type": "string", + "value": "b" + }, + { + "type": "string", + "value": "c" + } + ] +} diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/array/array.toml b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/array/array.toml new file mode 100644 index 0000000000000000000000000000000000000000..ab884652bc9871d0b9463bed4f9e8f5c3d05baf9 --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/array/array.toml @@ -0,0 +1,12 @@ +ints = [1, 2, 3, ] +floats = [1.1, 2.1, 3.1] +strings = ["a", "b", "c"] +dates = [ + 1987-07-05T17:45:00Z, + 1979-05-27T07:32:00Z, + 2006-06-01T11:00:00Z, +] +comments = [ + 1, + 2, #this is ok +] diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/array/bool.json b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/array/bool.json new file mode 100644 index 0000000000000000000000000000000000000000..7cede3fc5dab1f00aa6fa9af6a96b882741161a4 --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/array/bool.json @@ -0,0 +1,12 @@ +{ + "a": [ + { + "type": "bool", + "value": "true" + }, + { + "type": "bool", + "value": "false" + } + ] +} diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/array/bool.toml b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/array/bool.toml new file mode 100644 index 0000000000000000000000000000000000000000..d2010c5870335b867fd042e43e36c37cc58003eb --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/array/bool.toml @@ -0,0 +1 @@ +a = [true, false] diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/array/empty.json b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/array/empty.json new file mode 100644 index 0000000000000000000000000000000000000000..7b1ca0cfa2b2153b07877c935e605d6b3c1891d0 --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/array/empty.json @@ -0,0 +1,11 @@ +{ + "thevoid": [ + [ + [ + [ + [] + ] + ] + ] + ] +} diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/array/empty.toml b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/array/empty.toml new file mode 100644 index 0000000000000000000000000000000000000000..fa58dc63d48803656e188ede9452726f79e6f5c2 --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/array/empty.toml @@ -0,0 +1 @@ +thevoid = [[[[[]]]]] diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/array/hetergeneous.json b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/array/hetergeneous.json new file mode 100644 index 0000000000000000000000000000000000000000..751b6244b8249d7ab190dd0dda10e8e89b10a348 --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/array/hetergeneous.json @@ -0,0 +1,34 @@ +{ + "mixed": [ + [ + { + "type": "integer", + "value": "1" + }, + { + "type": "integer", + "value": "2" + } + ], + [ + { + "type": "string", + "value": "a" + }, + { + "type": "string", + "value": "b" + } + ], + [ + { + "type": "float", + "value": "1.1" + }, + { + "type": "float", + "value": "2.1" + } + ] + ] +} diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/array/hetergeneous.toml b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/array/hetergeneous.toml new file mode 100644 index 0000000000000000000000000000000000000000..a246fcf1deb371f8f4452eea08503b23a987fb25 --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/array/hetergeneous.toml @@ -0,0 +1 @@ +mixed = [[1, 2], ["a", "b"], [1.1, 2.1]] diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/array/mixed-int-array.json b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/array/mixed-int-array.json new file mode 100644 index 0000000000000000000000000000000000000000..2f3ac5ee6746b58b360a20d13cba24ece474d7ab --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/array/mixed-int-array.json @@ -0,0 +1,14 @@ +{ + "arrays-and-ints": [ + { + "type": "integer", + "value": "1" + }, + [ + { + "type": "string", + "value": "Arrays are not integers." + } + ] + ] +} diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/array/mixed-int-array.toml b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/array/mixed-int-array.toml new file mode 100644 index 0000000000000000000000000000000000000000..051ec73136b2b6c2f933a5a380253aa42bb0b848 --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/array/mixed-int-array.toml @@ -0,0 +1 @@ +arrays-and-ints = [1, ["Arrays are not integers."]] diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/array/mixed-int-float.json b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/array/mixed-int-float.json new file mode 100644 index 0000000000000000000000000000000000000000..e73059b807777a44ed5bc68376bb74949bf0f34b --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/array/mixed-int-float.json @@ -0,0 +1,12 @@ +{ + "ints-and-floats": [ + { + "type": "integer", + "value": "1" + }, + { + "type": "float", + "value": "1.1" + } + ] +} diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/array/mixed-int-float.toml b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/array/mixed-int-float.toml new file mode 100644 index 0000000000000000000000000000000000000000..a5aa9b7a03375a0d7971260daa1aee51b518951f --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/array/mixed-int-float.toml @@ -0,0 +1 @@ +ints-and-floats = [1, 1.1] diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/array/mixed-int-string.json b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/array/mixed-int-string.json new file mode 100644 index 0000000000000000000000000000000000000000..c6acc7633742bd5675ce3c0d9e48c63bfa64a49a --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/array/mixed-int-string.json @@ -0,0 +1,12 @@ +{ + "strings-and-ints": [ + { + "type": "string", + "value": "hi" + }, + { + "type": "integer", + "value": "42" + } + ] +} diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/array/mixed-int-string.toml b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/array/mixed-int-string.toml new file mode 100644 index 0000000000000000000000000000000000000000..f3483080532f395b58b60fb58a3c80ef564d1a91 --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/array/mixed-int-string.toml @@ -0,0 +1 @@ +strings-and-ints = ["hi", 42] diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/array/mixed-string-table.json b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/array/mixed-string-table.json new file mode 100644 index 0000000000000000000000000000000000000000..6185aa95682d3f6affc1cfe4e2c3a71de4eca281 --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/array/mixed-string-table.json @@ -0,0 +1,22 @@ +{ + "contributors": [ + { + "type": "string", + "value": "Foo Bar \u003cfoo@example.com\u003e" + }, + { + "email": { + "type": "string", + "value": "bazqux@example.com" + }, + "name": { + "type": "string", + "value": "Baz Qux" + }, + "url": { + "type": "string", + "value": "https://example.com/bazqux" + } + } + ] +} diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/array/mixed-string-table.toml b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/array/mixed-string-table.toml new file mode 100644 index 0000000000000000000000000000000000000000..bd7ada8da38a928314ad85a19efae410ca11afdf --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/array/mixed-string-table.toml @@ -0,0 +1,4 @@ +contributors = [ + "Foo Bar ", + { name = "Baz Qux", email = "bazqux@example.com", url = "https://example.com/bazqux" } +] diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/array/nested-double.json b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/array/nested-double.json new file mode 100644 index 0000000000000000000000000000000000000000..c89a8c9b726049457ab9e5b867bb6bae3fd36a78 --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/array/nested-double.json @@ -0,0 +1,28 @@ +{ + "nest": [ + [ + [ + { + "type": "string", + "value": "a" + } + ], + [ + { + "type": "integer", + "value": "1" + }, + { + "type": "integer", + "value": "2" + }, + [ + { + "type": "integer", + "value": "3" + } + ] + ] + ] + ] +} diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/array/nested-double.toml b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/array/nested-double.toml new file mode 100644 index 0000000000000000000000000000000000000000..c1de7477fe22745017898deffdab9a6c30ae1d4a --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/array/nested-double.toml @@ -0,0 +1,6 @@ +nest = [ + [ + ["a"], + [1, 2, [3]] + ] +] diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/array/nested-inline-table.json b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/array/nested-inline-table.json new file mode 100644 index 0000000000000000000000000000000000000000..2ae5fa70c43c8dfb833f44e8c736069e752eecca --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/array/nested-inline-table.json @@ -0,0 +1,7 @@ +{ + "a": [ + { + "b": {} + } + ] +} diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/array/nested-inline-table.toml b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/array/nested-inline-table.toml new file mode 100644 index 0000000000000000000000000000000000000000..e1e24f6c38f8a92a11a3b9bab94a42bd913ee6db --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/array/nested-inline-table.toml @@ -0,0 +1 @@ +a = [ { b = {} } ] diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/array/nested.json b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/array/nested.json new file mode 100644 index 0000000000000000000000000000000000000000..72c75897f685bf6b59660aa9098fbeb54aedc658 --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/array/nested.json @@ -0,0 +1,16 @@ +{ + "nest": [ + [ + { + "type": "string", + "value": "a" + } + ], + [ + { + "type": "string", + "value": "b" + } + ] + ] +} diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/array/nested.toml b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/array/nested.toml new file mode 100644 index 0000000000000000000000000000000000000000..ce3302249b72dcf5f0d9f7d394390e78bef5932a --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/array/nested.toml @@ -0,0 +1 @@ +nest = [["a"], ["b"]] diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/array/nospaces.json b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/array/nospaces.json new file mode 100644 index 0000000000000000000000000000000000000000..6c89fced1929ed2881106d646fef7cb7de0e5111 --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/array/nospaces.json @@ -0,0 +1,16 @@ +{ + "ints": [ + { + "type": "integer", + "value": "1" + }, + { + "type": "integer", + "value": "2" + }, + { + "type": "integer", + "value": "3" + } + ] +} diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/array/nospaces.toml b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/array/nospaces.toml new file mode 100644 index 0000000000000000000000000000000000000000..66189367fe9eb53de353a250f70431404b4d0349 --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/array/nospaces.toml @@ -0,0 +1 @@ +ints = [1,2,3] diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/array/string-quote-comma-2.json b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/array/string-quote-comma-2.json new file mode 100644 index 0000000000000000000000000000000000000000..7cd54063a6959e0fafc1fa82460e4ae4a0065f3f --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/array/string-quote-comma-2.json @@ -0,0 +1,8 @@ +{ + "title": [ + { + "type": "string", + "value": " \", " + } + ] +} diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/array/string-quote-comma-2.toml b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/array/string-quote-comma-2.toml new file mode 100644 index 0000000000000000000000000000000000000000..4758ddcade2f49cdd7ab1527b0f84f44a5ece857 --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/array/string-quote-comma-2.toml @@ -0,0 +1 @@ +title = [ " \", ",] diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/array/string-quote-comma.json b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/array/string-quote-comma.json new file mode 100644 index 0000000000000000000000000000000000000000..b78db423e524359fbc263b458478d55930f33f8e --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/array/string-quote-comma.json @@ -0,0 +1,12 @@ +{ + "title": [ + { + "type": "string", + "value": "Client: \"XXXX\", Job: XXXX" + }, + { + "type": "string", + "value": "Code: XXXX" + } + ] +} diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/array/string-quote-comma.toml b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/array/string-quote-comma.toml new file mode 100644 index 0000000000000000000000000000000000000000..6b458e1e8b96bc606eb3f8d49ee5df622d8e37ed --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/array/string-quote-comma.toml @@ -0,0 +1,4 @@ +title = [ +"Client: \"XXXX\", Job: XXXX", +"Code: XXXX" +] diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/array/string-with-comma.json b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/array/string-with-comma.json new file mode 100644 index 0000000000000000000000000000000000000000..42b77ef7259b8f9675a21f34081144e933af4bc4 --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/array/string-with-comma.json @@ -0,0 +1,12 @@ +{ + "title": [ + { + "type": "string", + "value": "Client: XXXX, Job: XXXX" + }, + { + "type": "string", + "value": "Code: XXXX" + } + ] +} diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/array/string-with-comma.toml b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/array/string-with-comma.toml new file mode 100644 index 0000000000000000000000000000000000000000..655c40e27ed44db90348b1d1e649f2a56aca5f3e --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/array/string-with-comma.toml @@ -0,0 +1,4 @@ +title = [ +"Client: XXXX, Job: XXXX", +"Code: XXXX" +] diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/array/strings.json b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/array/strings.json new file mode 100644 index 0000000000000000000000000000000000000000..27617b4d0effcf9f7bcd2f79d21be230c2a1fecc --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/array/strings.json @@ -0,0 +1,20 @@ +{ + "string_array": [ + { + "type": "string", + "value": "all" + }, + { + "type": "string", + "value": "strings" + }, + { + "type": "string", + "value": "are the same" + }, + { + "type": "string", + "value": "type" + } + ] +} diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/array/strings.toml b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/array/strings.toml new file mode 100644 index 0000000000000000000000000000000000000000..51894ce10027d0903f8f50eccfd822042b98c5a3 --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/array/strings.toml @@ -0,0 +1 @@ +string_array = [ "all", 'strings', """are the same""", '''type'''] diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/array/table-array-string-backslash.json b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/array/table-array-string-backslash.json new file mode 100644 index 0000000000000000000000000000000000000000..2c0feb13d79f1e313787f880723b754db71d251a --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/array/table-array-string-backslash.json @@ -0,0 +1,10 @@ +{ + "foo": [ + { + "bar": { + "type": "string", + "value": "\"{{baz}}\"" + } + } + ] +} diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/array/table-array-string-backslash.toml b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/array/table-array-string-backslash.toml new file mode 100644 index 0000000000000000000000000000000000000000..f0de81e0d646d4ae9ff5aab89e9a0bdad678fc44 --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/array/table-array-string-backslash.toml @@ -0,0 +1 @@ +foo = [ { bar="\"{{baz}}\""} ] diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/bool/bool.json b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/bool/bool.json new file mode 100644 index 0000000000000000000000000000000000000000..be47d6d046d172d60c238e8367ec3fd707dab56c --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/bool/bool.json @@ -0,0 +1,10 @@ +{ + "f": { + "type": "bool", + "value": "false" + }, + "t": { + "type": "bool", + "value": "true" + } +} diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/bool/bool.toml b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/bool/bool.toml new file mode 100644 index 0000000000000000000000000000000000000000..a8a829b34de9bcc694b0886bd82cde6fc40d9dbf --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/bool/bool.toml @@ -0,0 +1,2 @@ +t = true +f = false diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/comment/at-eof.json b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/comment/at-eof.json new file mode 100644 index 0000000000000000000000000000000000000000..af3154ab4c2985f37a0ddc1a2fc1c68ce2f13dde --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/comment/at-eof.json @@ -0,0 +1,6 @@ +{ + "key": { + "type": "string", + "value": "value" + } +} diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/comment/at-eof.toml b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/comment/at-eof.toml new file mode 100644 index 0000000000000000000000000000000000000000..090b474834610cb018e511c9e8aa67ed0a6986fa --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/comment/at-eof.toml @@ -0,0 +1,2 @@ +# This is a full-line comment +key = "value" # This is a comment at the end of a line diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/comment/at-eof2.json b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/comment/at-eof2.json new file mode 100644 index 0000000000000000000000000000000000000000..af3154ab4c2985f37a0ddc1a2fc1c68ce2f13dde --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/comment/at-eof2.json @@ -0,0 +1,6 @@ +{ + "key": { + "type": "string", + "value": "value" + } +} diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/comment/at-eof2.toml b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/comment/at-eof2.toml new file mode 100644 index 0000000000000000000000000000000000000000..090b474834610cb018e511c9e8aa67ed0a6986fa --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/comment/at-eof2.toml @@ -0,0 +1,2 @@ +# This is a full-line comment +key = "value" # This is a comment at the end of a line diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/comment/everywhere.json b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/comment/everywhere.json new file mode 100644 index 0000000000000000000000000000000000000000..c3dd422de8b051a299ec50cbbe605f5f22820b76 --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/comment/everywhere.json @@ -0,0 +1,22 @@ +{ + "group": { + "answer": { + "type": "integer", + "value": "42" + }, + "d": { + "type": "datetime", + "value": "1979-05-27T07:32:12-07:00" + }, + "more": [ + { + "type": "integer", + "value": "42" + }, + { + "type": "integer", + "value": "42" + } + ] + } +} diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/comment/everywhere.toml b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/comment/everywhere.toml new file mode 100644 index 0000000000000000000000000000000000000000..aa9ebdc7e9e48f40b4cd329580dcac2c81069ad2 --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/comment/everywhere.toml @@ -0,0 +1,27 @@ +# Top comment. + # Top comment. +# Top comment. + +# [no-extraneous-groups-please] + +[group] # Comment +answer = 42 # Comment +# no-extraneous-keys-please = 999 +# Inbetween comment. +more = [ # Comment + # What about multiple # comments? + # Can you handle it? + # + # Evil. +# Evil. + 42, 42, # Comments within arrays are fun. + # What about multiple # comments? + # Can you handle it? + # + # Evil. +# Evil. +# ] Did I fool you? +] # Hopefully not. + +# Make sure the space between the datetime and "#" isn't lexed. +d = 1979-05-27T07:32:12-07:00 # c diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/comment/tricky.json b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/comment/tricky.json new file mode 100644 index 0000000000000000000000000000000000000000..09948647cac43c955a64e23920eb07df53d621b8 --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/comment/tricky.json @@ -0,0 +1,98 @@ +{ + "hash#tag": { + "#!": { + "type": "string", + "value": "hash bang" + }, + "arr3": [ + { + "type": "string", + "value": "#" + }, + { + "type": "string", + "value": "#" + }, + { + "type": "string", + "value": "###" + } + ], + "arr4": [ + { + "type": "integer", + "value": "1" + }, + { + "type": "integer", + "value": "2" + }, + { + "type": "integer", + "value": "3" + }, + { + "type": "integer", + "value": "4" + } + ], + "arr5": [ + [ + [ + [ + [ + { + "type": "string", + "value": "#" + } + ] + ] + ] + ] + ], + "tbl1": { + "#": { + "type": "string", + "value": "}#" + } + } + }, + "section": { + "8": { + "type": "string", + "value": "eight" + }, + "eleven": { + "type": "float", + "value": "11.1" + }, + "five": { + "type": "float", + "value": "5.5" + }, + "four": { + "type": "string", + "value": "# no comment\n# nor this\n#also not comment" + }, + "one": { + "type": "string", + "value": "11" + }, + "six": { + "type": "integer", + "value": "6" + }, + "ten": { + "type": "float", + "value": "1000.0" + }, + "three": { + "type": "string", + "value": "#" + }, + "two": { + "type": "string", + "value": "22#" + } + } +} diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/comment/tricky.toml b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/comment/tricky.toml new file mode 100644 index 0000000000000000000000000000000000000000..c95f94d0d96ef9361fc61244737d2f2219bc2a42 --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/comment/tricky.toml @@ -0,0 +1,31 @@ +[section]#attached comment +#[notsection] +one = "11"#cmt +two = "22#" +three = '#' + +four = """# no comment +# nor this +#also not comment"""#is_comment + +five = 5.5#66 +six = 6#7 +8 = "eight" +#nine = 99 +ten = 10e2#1 +eleven = 1.11e1#23 + +["hash#tag"] +"#!" = "hash bang" +arr3 = [ "#", '#', """###""" ] +arr4 = [ 1,# 9, 9, +2#,9 +,#9 +3#] +,4] +arr5 = [[[[#["#"], +["#"]]]]#] +] +tbl1 = { "#" = '}#'}#}} + + diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/datetime/datetime.json b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/datetime/datetime.json new file mode 100644 index 0000000000000000000000000000000000000000..514633596ff512083b5f2ae04b9f978db1b0d8b0 --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/datetime/datetime.json @@ -0,0 +1,10 @@ +{ + "lower": { + "type": "datetime", + "value": "1987-07-05T17:45:00Z" + }, + "space": { + "type": "datetime", + "value": "1987-07-05T17:45:00Z" + } +} diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/datetime/datetime.toml b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/datetime/datetime.toml new file mode 100644 index 0000000000000000000000000000000000000000..653d521fd9a39370f41f0cee5e21cb3375079ba8 --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/datetime/datetime.toml @@ -0,0 +1,2 @@ +space = 1987-07-05 17:45:00Z +lower = 1987-07-05t17:45:00z diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/datetime/local-date.json b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/datetime/local-date.json new file mode 100644 index 0000000000000000000000000000000000000000..8fea2fe06a1f24f70cb217c0249648e33fd3f258 --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/datetime/local-date.json @@ -0,0 +1,6 @@ +{ + "bestdayever": { + "type": "date-local", + "value": "1987-07-05" + } +} diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/datetime/local-date.toml b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/datetime/local-date.toml new file mode 100644 index 0000000000000000000000000000000000000000..1be4a5f8ebe68faa1b5d8b770b7cfbdb993ae4ac --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/datetime/local-date.toml @@ -0,0 +1 @@ +bestdayever = 1987-07-05 diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/datetime/local-time.json b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/datetime/local-time.json new file mode 100644 index 0000000000000000000000000000000000000000..5e527e97b6423b9b8a8f61878534457e67a1702f --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/datetime/local-time.json @@ -0,0 +1,10 @@ +{ + "besttimeever": { + "type": "time-local", + "value": "17:45:00" + }, + "milliseconds": { + "type": "time-local", + "value": "10:32:00.555" + } +} diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/datetime/local-time.toml b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/datetime/local-time.toml new file mode 100644 index 0000000000000000000000000000000000000000..6b07f6ffeed8386751fb1bbc44ed159ca172d746 --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/datetime/local-time.toml @@ -0,0 +1,2 @@ +besttimeever = 17:45:00 +milliseconds = 10:32:00.555 diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/datetime/local.json b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/datetime/local.json new file mode 100644 index 0000000000000000000000000000000000000000..12f8df5d56754769eb4abdc212c405f7d950a742 --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/datetime/local.json @@ -0,0 +1,14 @@ +{ + "local": { + "type": "datetime-local", + "value": "1987-07-05T17:45:00" + }, + "milli": { + "type": "datetime-local", + "value": "1977-12-21T10:32:00.555" + }, + "space": { + "type": "datetime-local", + "value": "1987-07-05T17:45:00" + } +} diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/datetime/local.toml b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/datetime/local.toml new file mode 100644 index 0000000000000000000000000000000000000000..ab425ecacf349ca4a0b84676289e8d41232051f8 --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/datetime/local.toml @@ -0,0 +1,3 @@ +local = 1987-07-05T17:45:00 +milli = 1977-12-21T10:32:00.555 +space = 1987-07-05 17:45:00 diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/datetime/milliseconds.json b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/datetime/milliseconds.json new file mode 100644 index 0000000000000000000000000000000000000000..bb896af46262288763073377d67d34e7181859cd --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/datetime/milliseconds.json @@ -0,0 +1,18 @@ +{ + "utc1": { + "type": "datetime", + "value": "1987-07-05T17:45:56.123456Z" + }, + "utc2": { + "type": "datetime", + "value": "1987-07-05T17:45:56.600000Z" + }, + "wita1": { + "type": "datetime", + "value": "1987-07-05T17:45:56.123456+08:00" + }, + "wita2": { + "type": "datetime", + "value": "1987-07-05T17:45:56.600000+08:00" + } +} diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/datetime/milliseconds.toml b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/datetime/milliseconds.toml new file mode 100644 index 0000000000000000000000000000000000000000..a6c05903a7cb9a74a96bf4e08434ef8c36190bac --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/datetime/milliseconds.toml @@ -0,0 +1,4 @@ +utc1 = 1987-07-05T17:45:56.123456Z +utc2 = 1987-07-05T17:45:56.6Z +wita1 = 1987-07-05T17:45:56.123456+08:00 +wita2 = 1987-07-05T17:45:56.6+08:00 diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/datetime/timezone.json b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/datetime/timezone.json new file mode 100644 index 0000000000000000000000000000000000000000..8dc83281b240c839135d72a4eba9d0551dd509f0 --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/datetime/timezone.json @@ -0,0 +1,18 @@ +{ + "nzdt": { + "type": "datetime", + "value": "1987-07-05T17:45:56+13:00" + }, + "nzst": { + "type": "datetime", + "value": "1987-07-05T17:45:56+12:00" + }, + "pdt": { + "type": "datetime", + "value": "1987-07-05T17:45:56-05:00" + }, + "utc": { + "type": "datetime", + "value": "1987-07-05T17:45:56Z" + } +} diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/datetime/timezone.toml b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/datetime/timezone.toml new file mode 100644 index 0000000000000000000000000000000000000000..20f3835b707d60f4d27a3eeaac8e84f8363642f8 --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/datetime/timezone.toml @@ -0,0 +1,4 @@ +utc = 1987-07-05T17:45:56Z +pdt = 1987-07-05T17:45:56-05:00 +nzst = 1987-07-05T17:45:56+12:00 +nzdt = 1987-07-05T17:45:56+13:00 # DST diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/empty-file.json b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/empty-file.json new file mode 100644 index 0000000000000000000000000000000000000000..0967ef424bce6791893e9a57bb952f80fd536e93 --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/empty-file.json @@ -0,0 +1 @@ +{} diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/empty-file.toml b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/empty-file.toml new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/example.json b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/example.json new file mode 100644 index 0000000000000000000000000000000000000000..2ea95a20d2f380a02f04dd51e959f176ba747e88 --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/example.json @@ -0,0 +1,26 @@ +{ + "best-day-ever": { + "type": "datetime", + "value": "1987-07-05T17:45:00Z" + }, + "numtheory": { + "boring": { + "type": "bool", + "value": "false" + }, + "perfection": [ + { + "type": "integer", + "value": "6" + }, + { + "type": "integer", + "value": "28" + }, + { + "type": "integer", + "value": "496" + } + ] + } +} diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/example.toml b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/example.toml new file mode 100644 index 0000000000000000000000000000000000000000..8cb02e01b03485b173b5aa3eb945c8fc95fb4b19 --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/example.toml @@ -0,0 +1,5 @@ +best-day-ever = 1987-07-05T17:45:00Z + +[numtheory] +boring = false +perfection = [6, 28, 496] diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/float/exponent.json b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/float/exponent.json new file mode 100644 index 0000000000000000000000000000000000000000..e79a6e13d3b3e812b9b4a3b499a4a39ba3173c56 --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/float/exponent.json @@ -0,0 +1,34 @@ +{ + "lower": { + "type": "float", + "value": "300.0" + }, + "minustenth": { + "type": "float", + "value": "-0.1" + }, + "neg": { + "type": "float", + "value": "0.03" + }, + "pointlower": { + "type": "float", + "value": "310.0" + }, + "pointupper": { + "type": "float", + "value": "310.0" + }, + "pos": { + "type": "float", + "value": "300.0" + }, + "upper": { + "type": "float", + "value": "300.0" + }, + "zero": { + "type": "float", + "value": "3.0" + } +} diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/float/exponent.toml b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/float/exponent.toml new file mode 100644 index 0000000000000000000000000000000000000000..573e0a85aa6560aaff729587053bdd1c483f65f9 --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/float/exponent.toml @@ -0,0 +1,8 @@ +lower = 3e2 +upper = 3E2 +neg = 3e-2 +pos = 3E+2 +zero = 3e0 +pointlower = 3.1e2 +pointupper = 3.1E2 +minustenth = -1E-1 diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/float/float.json b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/float/float.json new file mode 100644 index 0000000000000000000000000000000000000000..f92d8d879277764c30b9eb55441ec1e64823cca0 --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/float/float.json @@ -0,0 +1,18 @@ +{ + "negpi": { + "type": "float", + "value": "-3.14" + }, + "pi": { + "type": "float", + "value": "3.14" + }, + "pospi": { + "type": "float", + "value": "3.14" + }, + "zero-intpart": { + "type": "float", + "value": "0.123" + } +} diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/float/float.toml b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/float/float.toml new file mode 100644 index 0000000000000000000000000000000000000000..5f023229486b9e4fb1cbf028d8ee0965cdf14b09 --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/float/float.toml @@ -0,0 +1,4 @@ +pi = 3.14 +pospi = +3.14 +negpi = -3.14 +zero-intpart = 0.123 diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/float/inf-and-nan.json b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/float/inf-and-nan.json new file mode 100644 index 0000000000000000000000000000000000000000..e3f1ba3c7f6226b771d84c74e50ee607a46badab --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/float/inf-and-nan.json @@ -0,0 +1,26 @@ +{ + "infinity": { + "type": "float", + "value": "inf" + }, + "infinity_neg": { + "type": "float", + "value": "-inf" + }, + "infinity_plus": { + "type": "float", + "value": "+inf" + }, + "nan": { + "type": "float", + "value": "nan" + }, + "nan_neg": { + "type": "float", + "value": "nan" + }, + "nan_plus": { + "type": "float", + "value": "nan" + } +} diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/float/inf-and-nan.toml b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/float/inf-and-nan.toml new file mode 100644 index 0000000000000000000000000000000000000000..c8f8459c69384ed6f905ff68ef41d93c82d822bf --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/float/inf-and-nan.toml @@ -0,0 +1,8 @@ +# We don't encode +nan and -nan back with the signs; many languages don't +# support a sign on NaN (it doesn't really make much sense). +nan = nan +nan_neg = -nan +nan_plus = +nan +infinity = inf +infinity_neg = -inf +infinity_plus = +inf diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/float/long.json b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/float/long.json new file mode 100644 index 0000000000000000000000000000000000000000..73d75052773983742d52ec74ebfbe9ad072ef9a9 --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/float/long.json @@ -0,0 +1,10 @@ +{ + "longpi": { + "type": "float", + "value": "3.141592653589793" + }, + "neglongpi": { + "type": "float", + "value": "-3.141592653589793" + } +} diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/float/long.toml b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/float/long.toml new file mode 100644 index 0000000000000000000000000000000000000000..9558ae47c023ffef9327ea0a9813dbca99cd9f9d --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/float/long.toml @@ -0,0 +1,2 @@ +longpi = 3.141592653589793 +neglongpi = -3.141592653589793 diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/float/underscore.json b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/float/underscore.json new file mode 100644 index 0000000000000000000000000000000000000000..f54f7b5022eee3888bf8500088827504ae61a867 --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/float/underscore.json @@ -0,0 +1,14 @@ +{ + "after": { + "type": "float", + "value": "3141.5927" + }, + "before": { + "type": "float", + "value": "3141.5927" + }, + "exponent": { + "type": "float", + "value": "3.0e14" + } +} diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/float/underscore.toml b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/float/underscore.toml new file mode 100644 index 0000000000000000000000000000000000000000..343353a89e063b6981261d6d80bc26530c9207c5 --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/float/underscore.toml @@ -0,0 +1,3 @@ +before = 3_141.5927 +after = 3141.592_7 +exponent = 3e1_4 diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/float/zero.json b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/float/zero.json new file mode 100644 index 0000000000000000000000000000000000000000..43381dd90930e97ee15eeb10c7689aeee18f7bda --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/float/zero.json @@ -0,0 +1,30 @@ +{ + "f1": { + "type": "float", + "value": "0" + }, + "f2": { + "type": "float", + "value": "0" + }, + "f3": { + "type": "float", + "value": "0" + }, + "f4": { + "type": "float", + "value": "0" + }, + "f5": { + "type": "float", + "value": "0" + }, + "f6": { + "type": "float", + "value": "0" + }, + "f7": { + "type": "float", + "value": "0" + } +} diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/float/zero.toml b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/float/zero.toml new file mode 100644 index 0000000000000000000000000000000000000000..5f2a8ffa46c7d0c0761bddb3a9a8705461a33b16 --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/float/zero.toml @@ -0,0 +1,7 @@ +f1 = 0.0 +f2 = +0.0 +f3 = -0.0 +f4 = 0e0 +f5 = 0e00 +f6 = +0e0 +f7 = -0e0 diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/implicit-and-explicit-after.json b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/implicit-and-explicit-after.json new file mode 100644 index 0000000000000000000000000000000000000000..663a34e8e8c99408f01617c6e0c59bb676ed3002 --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/implicit-and-explicit-after.json @@ -0,0 +1,16 @@ +{ + "a": { + "b": { + "c": { + "answer": { + "type": "integer", + "value": "42" + } + } + }, + "better": { + "type": "integer", + "value": "43" + } + } +} diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/implicit-and-explicit-after.toml b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/implicit-and-explicit-after.toml new file mode 100644 index 0000000000000000000000000000000000000000..c0e8865b392c2878cba97ed38b671172d3e6d94d --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/implicit-and-explicit-after.toml @@ -0,0 +1,5 @@ +[a.b.c] +answer = 42 + +[a] +better = 43 diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/implicit-and-explicit-before.json b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/implicit-and-explicit-before.json new file mode 100644 index 0000000000000000000000000000000000000000..663a34e8e8c99408f01617c6e0c59bb676ed3002 --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/implicit-and-explicit-before.json @@ -0,0 +1,16 @@ +{ + "a": { + "b": { + "c": { + "answer": { + "type": "integer", + "value": "42" + } + } + }, + "better": { + "type": "integer", + "value": "43" + } + } +} diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/implicit-and-explicit-before.toml b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/implicit-and-explicit-before.toml new file mode 100644 index 0000000000000000000000000000000000000000..eee68ff5143aa00cb613f7737512d9fa225b2531 --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/implicit-and-explicit-before.toml @@ -0,0 +1,5 @@ +[a] +better = 43 + +[a.b.c] +answer = 42 diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/implicit-groups.json b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/implicit-groups.json new file mode 100644 index 0000000000000000000000000000000000000000..347c693cf63c29ba90fcbd0b2fc7b79b5c0bc89b --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/implicit-groups.json @@ -0,0 +1,12 @@ +{ + "a": { + "b": { + "c": { + "answer": { + "type": "integer", + "value": "42" + } + } + } + } +} diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/implicit-groups.toml b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/implicit-groups.toml new file mode 100644 index 0000000000000000000000000000000000000000..b6333e49d577e895c34e26f0b50d30d037f10b67 --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/implicit-groups.toml @@ -0,0 +1,2 @@ +[a.b.c] +answer = 42 diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/inline-table/array.json b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/inline-table/array.json new file mode 100644 index 0000000000000000000000000000000000000000..fe78bf6b5bee1f42faa403ae5d8fc368bf8c285f --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/inline-table/array.json @@ -0,0 +1,34 @@ +{ + "people": [ + { + "first_name": { + "type": "string", + "value": "Bruce" + }, + "last_name": { + "type": "string", + "value": "Springsteen" + } + }, + { + "first_name": { + "type": "string", + "value": "Eric" + }, + "last_name": { + "type": "string", + "value": "Clapton" + } + }, + { + "first_name": { + "type": "string", + "value": "Bob" + }, + "last_name": { + "type": "string", + "value": "Seger" + } + } + ] +} diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/inline-table/array.toml b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/inline-table/array.toml new file mode 100644 index 0000000000000000000000000000000000000000..3fa60d6695574c7b576b6a5700c4d57d0d4ce5cf --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/inline-table/array.toml @@ -0,0 +1,3 @@ +people = [{first_name = "Bruce", last_name = "Springsteen"}, + {first_name = "Eric", last_name = "Clapton"}, + {first_name = "Bob", last_name = "Seger"}] diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/inline-table/bool.json b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/inline-table/bool.json new file mode 100644 index 0000000000000000000000000000000000000000..717952fabfa37cddafe3bb2ac2415c83176c2196 --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/inline-table/bool.json @@ -0,0 +1,12 @@ +{ + "a": { + "a": { + "type": "bool", + "value": "true" + }, + "b": { + "type": "bool", + "value": "false" + } + } +} diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/inline-table/bool.toml b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/inline-table/bool.toml new file mode 100644 index 0000000000000000000000000000000000000000..d228fc2641ce9564e90167b265191e268ad7ed03 --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/inline-table/bool.toml @@ -0,0 +1 @@ +a = {a = true, b = false} diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/inline-table/empty.json b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/inline-table/empty.json new file mode 100644 index 0000000000000000000000000000000000000000..28beacf88b70e808d3434b7838af2baf06614f64 --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/inline-table/empty.json @@ -0,0 +1,30 @@ +{ + "empty1": {}, + "empty2": {}, + "empty_in_array": [ + { + "not_empty": { + "type": "integer", + "value": "1" + } + }, + {} + ], + "empty_in_array2": [ + {}, + { + "not_empty": { + "type": "integer", + "value": "1" + } + } + ], + "many_empty": [ + {}, + {}, + {} + ], + "nested_empty": { + "empty": {} + } +} diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/inline-table/empty.toml b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/inline-table/empty.toml new file mode 100644 index 0000000000000000000000000000000000000000..910d458f1936169e90aff0bca8d0377b3762b7d6 --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/inline-table/empty.toml @@ -0,0 +1,6 @@ +empty1 = {} +empty2 = { } +empty_in_array = [ { not_empty = 1 }, {} ] +empty_in_array2 = [{},{not_empty=1}] +many_empty = [{},{},{}] +nested_empty = {"empty"={}} diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/inline-table/end-in-bool.json b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/inline-table/end-in-bool.json new file mode 100644 index 0000000000000000000000000000000000000000..90e700abaa1cd61338a3ba1cc41014c5fb3690c8 --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/inline-table/end-in-bool.json @@ -0,0 +1,16 @@ +{ + "black": { + "allow_prereleases": { + "type": "bool", + "value": "true" + }, + "python": { + "type": "string", + "value": "\u003e3.6" + }, + "version": { + "type": "string", + "value": "\u003e=18.9b0" + } + } +} diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/inline-table/end-in-bool.toml b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/inline-table/end-in-bool.toml new file mode 100644 index 0000000000000000000000000000000000000000..94e5651d582e28492edb60afba514ff1853fb726 --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/inline-table/end-in-bool.toml @@ -0,0 +1 @@ +black = { python=">3.6", version=">=18.9b0", allow_prereleases=true } diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/inline-table/inline-table.json b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/inline-table/inline-table.json new file mode 100644 index 0000000000000000000000000000000000000000..2468f62c074fedfadaa599c9c3fd53e6b685c0eb --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/inline-table/inline-table.json @@ -0,0 +1,48 @@ +{ + "name": { + "first": { + "type": "string", + "value": "Tom" + }, + "last": { + "type": "string", + "value": "Preston-Werner" + } + }, + "point": { + "x": { + "type": "integer", + "value": "1" + }, + "y": { + "type": "integer", + "value": "2" + } + }, + "simple": { + "a": { + "type": "integer", + "value": "1" + } + }, + "str-key": { + "a": { + "type": "integer", + "value": "1" + } + }, + "table-array": [ + { + "a": { + "type": "integer", + "value": "1" + } + }, + { + "b": { + "type": "integer", + "value": "2" + } + } + ] +} diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/inline-table/inline-table.toml b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/inline-table/inline-table.toml new file mode 100644 index 0000000000000000000000000000000000000000..257047eebc019014403fd0a12e9d79e649a4fe48 --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/inline-table/inline-table.toml @@ -0,0 +1,5 @@ +name = { first = "Tom", last = "Preston-Werner" } +point = { x = 1, y = 2 } +simple = { a = 1 } +str-key = { "a" = 1 } +table-array = [{ "a" = 1 }, { "b" = 2 }] diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/inline-table/key-dotted.json b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/inline-table/key-dotted.json new file mode 100644 index 0000000000000000000000000000000000000000..38868032ae4d9909df43ddb61d8cd5aa2c79d8ce --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/inline-table/key-dotted.json @@ -0,0 +1,140 @@ +{ + "a": { + "a": { + "b": { + "type": "integer", + "value": "1" + } + } + }, + "arr": [ + { + "T": { + "a": { + "b": { + "type": "integer", + "value": "1" + } + } + }, + "t": { + "a": { + "b": { + "type": "integer", + "value": "1" + } + } + } + }, + { + "T": { + "a": { + "b": { + "type": "integer", + "value": "2" + } + } + }, + "t": { + "a": { + "b": { + "type": "integer", + "value": "2" + } + } + } + } + ], + "b": { + "a": { + "b": { + "type": "integer", + "value": "1" + } + } + }, + "c": { + "a": { + "b": { + "type": "integer", + "value": "1" + } + } + }, + "d": { + "a": { + "b": { + "type": "integer", + "value": "1" + } + } + }, + "e": { + "a": { + "b": { + "type": "integer", + "value": "1" + } + } + }, + "inline": { + "a": { + "b": { + "type": "integer", + "value": "42" + } + } + }, + "many": { + "dots": { + "here": { + "dot": { + "dot": { + "dot": { + "a": { + "b": { + "c": { + "type": "integer", + "value": "1" + }, + "d": { + "type": "integer", + "value": "2" + } + } + } + } + } + } + } + } + }, + "tbl": { + "a": { + "b": { + "c": { + "d": { + "e": { + "type": "integer", + "value": "1" + } + } + } + } + }, + "x": { + "a": { + "b": { + "c": { + "d": { + "e": { + "type": "integer", + "value": "1" + } + } + } + } + } + } + } +} diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/inline-table/key-dotted.toml b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/inline-table/key-dotted.toml new file mode 100644 index 0000000000000000000000000000000000000000..e812943a939bbbdc86b6d1a633ed360751789cd8 --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/inline-table/key-dotted.toml @@ -0,0 +1,23 @@ +inline = {a.b = 42} + +many.dots.here.dot.dot.dot = {a.b.c = 1, a.b.d = 2} + +a = { a.b = 1 } +b = { "a"."b" = 1 } +c = { a . b = 1 } +d = { 'a' . "b" = 1 } +e = {a.b=1} + +[tbl] +a.b.c = {d.e=1} + +[tbl.x] +a.b.c = {d.e=1} + +[[arr]] +t = {a.b=1} +T = {a.b=1} + +[[arr]] +t = {a.b=2} +T = {a.b=2} diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/inline-table/multiline.json b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/inline-table/multiline.json new file mode 100644 index 0000000000000000000000000000000000000000..f946d819e6c7a40084deb051553bb49b4ffb0304 --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/inline-table/multiline.json @@ -0,0 +1,20 @@ +{ + "tbl_multiline": { + "a": { + "type": "integer", + "value": "1" + }, + "b": { + "type": "string", + "value": "multiline\n" + }, + "c": { + "type": "string", + "value": "and yet\nanother line" + }, + "d": { + "type": "integer", + "value": "4" + } + } +} diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/inline-table/multiline.toml b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/inline-table/multiline.toml new file mode 100644 index 0000000000000000000000000000000000000000..a653b18f4a0616957f5ad967c0d037f00d24ba96 --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/inline-table/multiline.toml @@ -0,0 +1,4 @@ +tbl_multiline = { a = 1, b = """ +multiline +""", c = """and yet +another line""", d = 4 } diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/inline-table/nest.json b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/inline-table/nest.json new file mode 100644 index 0000000000000000000000000000000000000000..70aebb3f96f9c2b1e126ae66ca21c7f912479b99 --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/inline-table/nest.json @@ -0,0 +1,64 @@ +{ + "arr_arr_tbl_empty": [ + [ + {} + ] + ], + "arr_arr_tbl_val": [ + [ + { + "one": { + "type": "integer", + "value": "1" + } + } + ] + ], + "arr_arr_tbls": [ + [ + { + "one": { + "type": "integer", + "value": "1" + } + }, + { + "two": { + "type": "integer", + "value": "2" + } + } + ] + ], + "arr_tbl_tbl": [ + { + "tbl": { + "one": { + "type": "integer", + "value": "1" + } + } + } + ], + "tbl_arr_tbl": { + "arr_tbl": [ + { + "one": { + "type": "integer", + "value": "1" + } + } + ] + }, + "tbl_tbl_empty": { + "tbl_0": {} + }, + "tbl_tbl_val": { + "tbl_1": { + "one": { + "type": "integer", + "value": "1" + } + } + } +} diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/inline-table/nest.toml b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/inline-table/nest.toml new file mode 100644 index 0000000000000000000000000000000000000000..2624c1d5453ae6a74e4df508cf0286ed4a8bdc40 --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/inline-table/nest.toml @@ -0,0 +1,10 @@ +tbl_tbl_empty = { tbl_0 = {} } +tbl_tbl_val = { tbl_1 = { one = 1 } } +tbl_arr_tbl = { arr_tbl = [ { one = 1 } ] } +arr_tbl_tbl = [ { tbl = { one = 1 } } ] + +# Array-of-array-of-table is interesting because it can only +# be represented in inline form. +arr_arr_tbl_empty = [ [ {} ] ] +arr_arr_tbl_val = [ [ { one = 1 } ] ] +arr_arr_tbls = [ [ { one = 1 }, { two = 2 } ] ] diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/integer/integer.json b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/integer/integer.json new file mode 100644 index 0000000000000000000000000000000000000000..eee9758068894d30f821ae99515f381c62490822 --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/integer/integer.json @@ -0,0 +1,18 @@ +{ + "answer": { + "type": "integer", + "value": "42" + }, + "neganswer": { + "type": "integer", + "value": "-42" + }, + "posanswer": { + "type": "integer", + "value": "42" + }, + "zero": { + "type": "integer", + "value": "0" + } +} diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/integer/integer.toml b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/integer/integer.toml new file mode 100644 index 0000000000000000000000000000000000000000..b62de30aee0e36f753cb74a1b781118536b306c4 --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/integer/integer.toml @@ -0,0 +1,4 @@ +answer = 42 +posanswer = +42 +neganswer = -42 +zero = 0 diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/integer/literals.json b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/integer/literals.json new file mode 100644 index 0000000000000000000000000000000000000000..1a8555bddd80974ff52fd1e2e06d9613904d51f3 --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/integer/literals.json @@ -0,0 +1,38 @@ +{ + "bin1": { + "type": "integer", + "value": "214" + }, + "bin2": { + "type": "integer", + "value": "5" + }, + "hex1": { + "type": "integer", + "value": "3735928559" + }, + "hex2": { + "type": "integer", + "value": "3735928559" + }, + "hex3": { + "type": "integer", + "value": "3735928559" + }, + "hex4": { + "type": "integer", + "value": "2439" + }, + "oct1": { + "type": "integer", + "value": "342391" + }, + "oct2": { + "type": "integer", + "value": "493" + }, + "oct3": { + "type": "integer", + "value": "501" + } +} diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/integer/literals.toml b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/integer/literals.toml new file mode 100644 index 0000000000000000000000000000000000000000..a07859047f036181511c419b36feca5c68176f94 --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/integer/literals.toml @@ -0,0 +1,11 @@ +bin1 = 0b11010110 +bin2 = 0b1_0_1 + +oct1 = 0o01234567 +oct2 = 0o755 +oct3 = 0o7_6_5 + +hex1 = 0xDEADBEEF +hex2 = 0xdeadbeef +hex3 = 0xdead_beef +hex4 = 0x00987 diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/integer/long.json b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/integer/long.json new file mode 100644 index 0000000000000000000000000000000000000000..6f4f0a7cbe34c3d1717528528b44437dff5717c8 --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/integer/long.json @@ -0,0 +1,10 @@ +{ + "int64-max": { + "type": "integer", + "value": "9223372036854775807" + }, + "int64-max-neg": { + "type": "integer", + "value": "-9223372036854775808" + } +} diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/integer/long.toml b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/integer/long.toml new file mode 100644 index 0000000000000000000000000000000000000000..5db5ed79e3f5fdca83e316bbc046e6e31ca82aee --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/integer/long.toml @@ -0,0 +1,2 @@ +int64-max = 9223372036854775807 +int64-max-neg = -9223372036854775808 diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/integer/underscore.json b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/integer/underscore.json new file mode 100644 index 0000000000000000000000000000000000000000..10b9b591dceecf46eac745b9853be598038cf9ff --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/integer/underscore.json @@ -0,0 +1,10 @@ +{ + "kilo": { + "type": "integer", + "value": "1000" + }, + "x": { + "type": "integer", + "value": "1111" + } +} diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/integer/underscore.toml b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/integer/underscore.toml new file mode 100644 index 0000000000000000000000000000000000000000..7c2da5fec794dc15591e3f0ac7d7ca382a4251e0 --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/integer/underscore.toml @@ -0,0 +1,2 @@ +kilo = 1_000 +x = 1_1_1_1 diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/integer/zero.json b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/integer/zero.json new file mode 100644 index 0000000000000000000000000000000000000000..9d5c7077173f2461bfddf343df1fd0ef5493ed37 --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/integer/zero.json @@ -0,0 +1,50 @@ +{ + "a2": { + "type": "integer", + "value": "0" + }, + "a3": { + "type": "integer", + "value": "0" + }, + "b1": { + "type": "integer", + "value": "0" + }, + "b2": { + "type": "integer", + "value": "0" + }, + "b3": { + "type": "integer", + "value": "0" + }, + "d1": { + "type": "integer", + "value": "0" + }, + "d2": { + "type": "integer", + "value": "0" + }, + "d3": { + "type": "integer", + "value": "0" + }, + "h1": { + "type": "integer", + "value": "0" + }, + "h2": { + "type": "integer", + "value": "0" + }, + "h3": { + "type": "integer", + "value": "0" + }, + "o1": { + "type": "integer", + "value": "0" + } +} diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/integer/zero.toml b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/integer/zero.toml new file mode 100644 index 0000000000000000000000000000000000000000..4687c2810239b9b35f74eae4da9c62ae5caf6779 --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/integer/zero.toml @@ -0,0 +1,15 @@ +d1 = 0 +d2 = +0 +d3 = -0 + +h1 = 0x0 +h2 = 0x00 +h3 = 0x00000 + +o1 = 0o0 +a2 = 0o00 +a3 = 0o00000 + +b1 = 0b0 +b2 = 0b00 +b3 = 0b00000 diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/key/alphanum.json b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/key/alphanum.json new file mode 100644 index 0000000000000000000000000000000000000000..a54e1d3515d573d6893fc30beb523b7a8f75f050 --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/key/alphanum.json @@ -0,0 +1,46 @@ +{ + "000111": { + "type": "string", + "value": "leading" + }, + "10e3": { + "type": "string", + "value": "false float" + }, + "123": { + "type": "string", + "value": "num" + }, + "2018_10": { + "001": { + "type": "integer", + "value": "1" + } + }, + "34-11": { + "type": "integer", + "value": "23" + }, + "a-a-a": { + "_": { + "type": "bool", + "value": "false" + } + }, + "alpha": { + "type": "string", + "value": "a" + }, + "one1two2": { + "type": "string", + "value": "mixed" + }, + "under_score": { + "type": "string", + "value": "___" + }, + "with-dash": { + "type": "string", + "value": "dashed" + } +} diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/key/alphanum.toml b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/key/alphanum.toml new file mode 100644 index 0000000000000000000000000000000000000000..0632e9ccde38c0497cee287587b82c79221fe6c8 --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/key/alphanum.toml @@ -0,0 +1,14 @@ +alpha = "a" +123 = "num" +000111 = "leading" +10e3 = "false float" +one1two2 = "mixed" +with-dash = "dashed" +under_score = "___" +34-11 = 23 + +[2018_10] +001 = 1 + +[a-a-a] +_ = false diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/key/case-sensitive.json b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/key/case-sensitive.json new file mode 100644 index 0000000000000000000000000000000000000000..1f205d20cde335e01ee4efb231166d53a2d6efc0 --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/key/case-sensitive.json @@ -0,0 +1,38 @@ +{ + "Section": { + "M": { + "type": "string", + "value": "latin letter M" + }, + "name": { + "type": "string", + "value": "different section!!" + }, + "Μ": { + "type": "string", + "value": "greek capital letter MU" + }, + "μ": { + "type": "string", + "value": "greek small letter mu" + } + }, + "sectioN": { + "type": "string", + "value": "NN" + }, + "section": { + "NAME": { + "type": "string", + "value": "upper" + }, + "Name": { + "type": "string", + "value": "capitalized" + }, + "name": { + "type": "string", + "value": "lower" + } + } +} diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/key/case-sensitive.toml b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/key/case-sensitive.toml new file mode 100644 index 0000000000000000000000000000000000000000..e02b3a51ad0fde5400da5c9d1a633883cbf7141d --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/key/case-sensitive.toml @@ -0,0 +1,13 @@ +sectioN = "NN" + +[section] +name = "lower" +NAME = "upper" +Name = "capitalized" + +[Section] +name = "different section!!" +"μ" = "greek small letter mu" +"Μ" = "greek capital letter MU" +M = "latin letter M" + diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/key/dotted.json b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/key/dotted.json new file mode 100644 index 0000000000000000000000000000000000000000..a527a72c2d838c6bd0341a23def0accbdbbd2896 --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/key/dotted.json @@ -0,0 +1,132 @@ +{ + "a": { + "few": { + "dots": { + "polka": { + "dance-with": { + "type": "string", + "value": "Dot" + }, + "dot": { + "type": "string", + "value": "again?" + } + } + } + } + }, + "arr": [ + { + "a": { + "b": { + "c": { + "type": "integer", + "value": "1" + }, + "d": { + "type": "integer", + "value": "2" + } + } + } + }, + { + "a": { + "b": { + "c": { + "type": "integer", + "value": "3" + }, + "d": { + "type": "integer", + "value": "4" + } + } + } + } + ], + "count": { + "a": { + "type": "integer", + "value": "1" + }, + "b": { + "type": "integer", + "value": "2" + }, + "c": { + "type": "integer", + "value": "3" + }, + "d": { + "type": "integer", + "value": "4" + }, + "e": { + "type": "integer", + "value": "5" + }, + "f": { + "type": "integer", + "value": "6" + }, + "g": { + "type": "integer", + "value": "7" + }, + "h": { + "type": "integer", + "value": "8" + }, + "i": { + "type": "integer", + "value": "9" + }, + "j": { + "type": "integer", + "value": "10" + }, + "k": { + "type": "integer", + "value": "11" + }, + "l": { + "type": "integer", + "value": "12" + } + }, + "many": { + "dots": { + "here": { + "dot": { + "dot": { + "dot": { + "type": "integer", + "value": "42" + } + } + } + } + } + }, + "name": { + "first": { + "type": "string", + "value": "Arthur" + }, + "last": { + "type": "string", + "value": "Dent" + } + }, + "tbl": { + "a": { + "b": { + "c": { + "type": "float", + "value": "42.666" + } + } + } + } +} diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/key/dotted.toml b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/key/dotted.toml new file mode 100644 index 0000000000000000000000000000000000000000..52d62d72f22457b2207a1560ba2e8e6013a5a4a4 --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/key/dotted.toml @@ -0,0 +1,35 @@ +# Note: this file contains literal tab characters. + +name.first = "Arthur" +"name".'last' = "Dent" + +many.dots.here.dot.dot.dot = 42 + +# Space are ignored, and key parts can be quoted. +count.a = 1 +count . b = 2 +"count"."c" = 3 +"count" . "d" = 4 +'count'.'e' = 5 +'count' . 'f' = 6 +"count".'g' = 7 +"count" . 'h' = 8 +count.'i' = 9 +count . 'j' = 10 +"count".k = 11 +"count" . l = 12 + +[tbl] +a.b.c = 42.666 + +[a.few.dots] +polka.dot = "again?" +polka.dance-with = "Dot" + +[[arr]] +a.b.c=1 +a.b.d=2 + +[[arr]] +a.b.c=3 +a.b.d=4 diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/key/empty.json b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/key/empty.json new file mode 100644 index 0000000000000000000000000000000000000000..44948a9e76503adbb71af95ce0f6812e7c329995 --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/key/empty.json @@ -0,0 +1,6 @@ +{ + "": { + "type": "string", + "value": "blank" + } +} diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/key/empty.toml b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/key/empty.toml new file mode 100644 index 0000000000000000000000000000000000000000..0a1640dc2b77a0b7c228914416c978f740a43699 --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/key/empty.toml @@ -0,0 +1 @@ +"" = "blank" diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/key/equals-nospace.json b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/key/equals-nospace.json new file mode 100644 index 0000000000000000000000000000000000000000..9394e562be8daa633c09f92d4af817717a2d3970 --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/key/equals-nospace.json @@ -0,0 +1,6 @@ +{ + "answer": { + "type": "integer", + "value": "42" + } +} diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/key/equals-nospace.toml b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/key/equals-nospace.toml new file mode 100644 index 0000000000000000000000000000000000000000..560901c5a43f20751e78d665433bdd1d03f64aeb --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/key/equals-nospace.toml @@ -0,0 +1 @@ +answer=42 diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/key/escapes.json b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/key/escapes.json new file mode 100644 index 0000000000000000000000000000000000000000..e62b3a14e951d5eecbad2b98c5d55baa55145634 --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/key/escapes.json @@ -0,0 +1,24 @@ +{ + "\n": { + "type": "string", + "value": "newline" + }, + "\"": { + "type": "string", + "value": "just a quote" + }, + "\"quoted\"": { + "quote": { + "type": "bool", + "value": "true" + } + }, + "a.b": { + "ƀ": {} + }, + "backsp\u0008\u0008": {}, + "ƀ": { + "type": "string", + "value": "latin capital letter A with grave" + } +} diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/key/escapes.toml b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/key/escapes.toml new file mode 100644 index 0000000000000000000000000000000000000000..aac3c0a5116ee11761e2539c2883ddea4f37979d --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/key/escapes.toml @@ -0,0 +1,10 @@ +"\n" = "newline" +"\u00c0" = "latin capital letter A with grave" +"\"" = "just a quote" + +["backsp\b\b"] + +["\"quoted\""] +quote = true + +["a.b"."\u00c0"] diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/key/numeric-dotted.json b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/key/numeric-dotted.json new file mode 100644 index 0000000000000000000000000000000000000000..43dd4d1f2b3c4bb64f7092ecd1dc5afd5b484171 --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/key/numeric-dotted.json @@ -0,0 +1,8 @@ +{ + "1": { + "2": { + "type": "integer", + "value": "3" + } + } +} diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/key/numeric-dotted.toml b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/key/numeric-dotted.toml new file mode 100644 index 0000000000000000000000000000000000000000..538204c68161c763c4a609b3861864547af74f34 --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/key/numeric-dotted.toml @@ -0,0 +1 @@ +1.2 = 3 diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/key/numeric.json b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/key/numeric.json new file mode 100644 index 0000000000000000000000000000000000000000..eddb88be1905316e60124beea4da086fad3612a8 --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/key/numeric.json @@ -0,0 +1,6 @@ +{ + "1": { + "type": "integer", + "value": "1" + } +} diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/key/numeric.toml b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/key/numeric.toml new file mode 100644 index 0000000000000000000000000000000000000000..532356f49b43ea20653b85bf60fed32cb6f27d48 --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/key/numeric.toml @@ -0,0 +1 @@ +1 = 1 diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/key/quoted-dots.json b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/key/quoted-dots.json new file mode 100644 index 0000000000000000000000000000000000000000..1582c5b88ffbf26eff1cabf6243644d686832582 --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/key/quoted-dots.json @@ -0,0 +1,32 @@ +{ + "plain": { + "type": "integer", + "value": "1" + }, + "plain_table": { + "plain": { + "type": "integer", + "value": "3" + }, + "with.dot": { + "type": "integer", + "value": "4" + } + }, + "table": { + "withdot": { + "key.with.dots": { + "type": "integer", + "value": "6" + }, + "plain": { + "type": "integer", + "value": "5" + } + } + }, + "with.dot": { + "type": "integer", + "value": "2" + } +} diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/key/quoted-dots.toml b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/key/quoted-dots.toml new file mode 100644 index 0000000000000000000000000000000000000000..65fcddf96a491ec7a9d43b115c0e639fcabb976e --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/key/quoted-dots.toml @@ -0,0 +1,10 @@ +plain = 1 +"with.dot" = 2 + +[plain_table] +plain = 3 +"with.dot" = 4 + +[table.withdot] +plain = 5 +"key.with.dots" = 6 diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/key/space.json b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/key/space.json new file mode 100644 index 0000000000000000000000000000000000000000..6d95f1ad48d99da6f64c81da5e004d8c64a5b40c --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/key/space.json @@ -0,0 +1,6 @@ +{ + "a b": { + "type": "integer", + "value": "1" + } +} diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/key/space.toml b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/key/space.toml new file mode 100644 index 0000000000000000000000000000000000000000..f4f36c4f6df2c06466ffd59b76a319e663bf27b3 --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/key/space.toml @@ -0,0 +1 @@ +"a b" = 1 diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/key/special-chars.json b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/key/special-chars.json new file mode 100644 index 0000000000000000000000000000000000000000..60840475169a806410b679194956bd31735847a8 --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/key/special-chars.json @@ -0,0 +1,6 @@ +{ + "~!@$^\u0026*()_+-`1234567890[]|/?\u003e\u003c.,;:'": { + "type": "integer", + "value": "1" + } +} diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/key/special-chars.toml b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/key/special-chars.toml new file mode 100644 index 0000000000000000000000000000000000000000..cc572befd06e5d843338e9a582b19b0d31a5e1da --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/key/special-chars.toml @@ -0,0 +1 @@ +"~!@$^&*()_+-`1234567890[]|/?><.,;:'" = 1 diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/key/special-word.json b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/key/special-word.json new file mode 100644 index 0000000000000000000000000000000000000000..59ce693a6fac8b47b2c49a18bc8c92ab2dd44fa0 --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/key/special-word.json @@ -0,0 +1,18 @@ +{ + "false": { + "type": "bool", + "value": "false" + }, + "inf": { + "type": "integer", + "value": "100000000" + }, + "nan": { + "type": "string", + "value": "ceci n'est pas un nombre" + }, + "true": { + "type": "integer", + "value": "1" + } +} diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/key/special-word.toml b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/key/special-word.toml new file mode 100644 index 0000000000000000000000000000000000000000..0b836f17dc0e130fa9d2147d99d9e9f6e1fa3a1f --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/key/special-word.toml @@ -0,0 +1,5 @@ +false = false +true = 1 +inf = 100000000 +nan = "ceci n'est pas un nombre" + diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/newline-crlf.json b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/newline-crlf.json new file mode 100644 index 0000000000000000000000000000000000000000..acf617e32fd481be8c4c344dcd412c3ab8d4443a --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/newline-crlf.json @@ -0,0 +1,10 @@ +{ + "newline": { + "type": "string", + "value": "crlf" + }, + "os": { + "type": "string", + "value": "DOS" + } +} diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/newline-crlf.toml b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/newline-crlf.toml new file mode 100644 index 0000000000000000000000000000000000000000..003002442866cba465c5a380098ef1fbde9ebc7c --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/newline-crlf.toml @@ -0,0 +1,2 @@ +os = "DOS" +newline = "crlf" diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/newline-lf.json b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/newline-lf.json new file mode 100644 index 0000000000000000000000000000000000000000..66cf871f392a1f9eabf05457aad9d2043373fd50 --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/newline-lf.json @@ -0,0 +1,10 @@ +{ + "newline": { + "type": "string", + "value": "lf" + }, + "os": { + "type": "string", + "value": "unix" + } +} diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/newline-lf.toml b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/newline-lf.toml new file mode 100644 index 0000000000000000000000000000000000000000..0f3377cd990e3c696738f8e31a7df415505b8763 --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/newline-lf.toml @@ -0,0 +1,2 @@ +os = "unix" +newline = "lf" diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/spec-example-1-compact.json b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/spec-example-1-compact.json new file mode 100644 index 0000000000000000000000000000000000000000..9f4078aa787a5ed663a44a7ea970ebc4dbeb4008 --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/spec-example-1-compact.json @@ -0,0 +1,100 @@ +{ + "clients": { + "data": [ + [ + { + "type": "string", + "value": "gamma" + }, + { + "type": "string", + "value": "delta" + } + ], + [ + { + "type": "integer", + "value": "1" + }, + { + "type": "integer", + "value": "2" + } + ] + ], + "hosts": [ + { + "type": "string", + "value": "alpha" + }, + { + "type": "string", + "value": "omega" + } + ] + }, + "database": { + "connection_max": { + "type": "integer", + "value": "5000" + }, + "enabled": { + "type": "bool", + "value": "true" + }, + "ports": [ + { + "type": "integer", + "value": "8001" + }, + { + "type": "integer", + "value": "8001" + }, + { + "type": "integer", + "value": "8002" + } + ], + "server": { + "type": "string", + "value": "192.168.1.1" + } + }, + "owner": { + "dob": { + "type": "datetime", + "value": "1979-05-27T07:32:00-08:00" + }, + "name": { + "type": "string", + "value": "Lance Uppercut" + } + }, + "servers": { + "alpha": { + "dc": { + "type": "string", + "value": "eqdc10" + }, + "ip": { + "type": "string", + "value": "10.0.0.1" + } + }, + "beta": { + "dc": { + "type": "string", + "value": "eqdc10" + }, + "ip": { + "type": "string", + "value": "10.0.0.2" + } + } + }, + "title": { + "type": "string", + "value": "TOML Example" + } +} diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/spec-example-1-compact.toml b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/spec-example-1-compact.toml new file mode 100644 index 0000000000000000000000000000000000000000..15e2b84b86494290c93822849937b63281a35743 --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/spec-example-1-compact.toml @@ -0,0 +1,23 @@ +#Useless spaces eliminated. +title="TOML Example" +[owner] +name="Lance Uppercut" +dob=1979-05-27T07:32:00-08:00#First class dates +[database] +server="192.168.1.1" +ports=[8001,8001,8002] +connection_max=5000 +enabled=true +[servers] +[servers.alpha] +ip="10.0.0.1" +dc="eqdc10" +[servers.beta] +ip="10.0.0.2" +dc="eqdc10" +[clients] +data=[["gamma","delta"],[1,2]] +hosts=[ +"alpha", +"omega" +] diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/spec-example-1.json b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/spec-example-1.json new file mode 100644 index 0000000000000000000000000000000000000000..9f4078aa787a5ed663a44a7ea970ebc4dbeb4008 --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/spec-example-1.json @@ -0,0 +1,100 @@ +{ + "clients": { + "data": [ + [ + { + "type": "string", + "value": "gamma" + }, + { + "type": "string", + "value": "delta" + } + ], + [ + { + "type": "integer", + "value": "1" + }, + { + "type": "integer", + "value": "2" + } + ] + ], + "hosts": [ + { + "type": "string", + "value": "alpha" + }, + { + "type": "string", + "value": "omega" + } + ] + }, + "database": { + "connection_max": { + "type": "integer", + "value": "5000" + }, + "enabled": { + "type": "bool", + "value": "true" + }, + "ports": [ + { + "type": "integer", + "value": "8001" + }, + { + "type": "integer", + "value": "8001" + }, + { + "type": "integer", + "value": "8002" + } + ], + "server": { + "type": "string", + "value": "192.168.1.1" + } + }, + "owner": { + "dob": { + "type": "datetime", + "value": "1979-05-27T07:32:00-08:00" + }, + "name": { + "type": "string", + "value": "Lance Uppercut" + } + }, + "servers": { + "alpha": { + "dc": { + "type": "string", + "value": "eqdc10" + }, + "ip": { + "type": "string", + "value": "10.0.0.1" + } + }, + "beta": { + "dc": { + "type": "string", + "value": "eqdc10" + }, + "ip": { + "type": "string", + "value": "10.0.0.2" + } + } + }, + "title": { + "type": "string", + "value": "TOML Example" + } +} diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/spec-example-1.toml b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/spec-example-1.toml new file mode 100644 index 0000000000000000000000000000000000000000..52fd1e89c11e7264df2e0776c161add5f4ad7d63 --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/spec-example-1.toml @@ -0,0 +1,33 @@ +# This is a TOML document. Boom. + +title = "TOML Example" + +[owner] +name = "Lance Uppercut" +dob = 1979-05-27T07:32:00-08:00 # First class dates? Why not? + +[database] +server = "192.168.1.1" +ports = [ 8001, 8001, 8002 ] +connection_max = 5000 +enabled = true + +[servers] + + # You can indent as you please. Tabs or spaces. TOML don't care. + [servers.alpha] + ip = "10.0.0.1" + dc = "eqdc10" + + [servers.beta] + ip = "10.0.0.2" + dc = "eqdc10" + +[clients] +data = [ ["gamma", "delta"], [1, 2] ] + +# Line breaks are OK when inside arrays +hosts = [ + "alpha", + "omega" +] diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/string/double-quote-escape.json b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/string/double-quote-escape.json new file mode 100644 index 0000000000000000000000000000000000000000..0c4ac37e0a95e4dbaedf947d1508af8aaa9f1ffa --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/string/double-quote-escape.json @@ -0,0 +1,6 @@ +{ + "test": { + "type": "string", + "value": "\"one\"" + } +} diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/string/double-quote-escape.toml b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/string/double-quote-escape.toml new file mode 100644 index 0000000000000000000000000000000000000000..78e7e72927950582936638534f49a8c6da87b225 --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/string/double-quote-escape.toml @@ -0,0 +1 @@ +test = "\"one\"" diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/string/empty.json b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/string/empty.json new file mode 100644 index 0000000000000000000000000000000000000000..efe96c36335deb6d6224afb10b236de6ea65eb52 --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/string/empty.json @@ -0,0 +1,6 @@ +{ + "answer": { + "type": "string", + "value": "" + } +} diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/string/empty.toml b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/string/empty.toml new file mode 100644 index 0000000000000000000000000000000000000000..e37e6815bc73dd2bc5d0b7b9037b8c79d7125306 --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/string/empty.toml @@ -0,0 +1 @@ +answer = "" diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/string/escape-tricky.json b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/string/escape-tricky.json new file mode 100644 index 0000000000000000000000000000000000000000..572e0a569d75f014fdbfa3520aebc22467f4c6c8 --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/string/escape-tricky.json @@ -0,0 +1,30 @@ +{ + "end_esc": { + "type": "string", + "value": "String does not end here\" but ends here\\" + }, + "lit_end_esc": { + "type": "string", + "value": "String ends here\\" + }, + "lit_multiline_end": { + "type": "string", + "value": "There is no escape\\" + }, + "lit_multiline_not_unicode": { + "type": "string", + "value": "\\u007f" + }, + "multiline_end_esc": { + "type": "string", + "value": "When will it end? \"\"\"...\"\"\" should be here\"" + }, + "multiline_not_unicode": { + "type": "string", + "value": "\\u0041" + }, + "multiline_unicode": { + "type": "string", + "value": "Ā " + } +} diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/string/escape-tricky.toml b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/string/escape-tricky.toml new file mode 100644 index 0000000000000000000000000000000000000000..dc204cb3fabb79c67a18a6bbdbd7d8a1878fb199 --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/string/escape-tricky.toml @@ -0,0 +1,15 @@ +end_esc = "String does not end here\" but ends here\\" +lit_end_esc = 'String ends here\' + +multiline_unicode = """ +\u00a0""" + +multiline_not_unicode = """ +\\u0041""" + +multiline_end_esc = """When will it end? \"""...""\" should be here\"""" + +lit_multiline_not_unicode = ''' +\u007f''' + +lit_multiline_end = '''There is no escape\''' diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/string/escaped-escape.json b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/string/escaped-escape.json new file mode 100644 index 0000000000000000000000000000000000000000..112c0c9772aca100ad1dbd708262babd9959acd1 --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/string/escaped-escape.json @@ -0,0 +1,6 @@ +{ + "answer": { + "type": "string", + "value": "\\x64" + } +} diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/string/escaped-escape.toml b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/string/escaped-escape.toml new file mode 100644 index 0000000000000000000000000000000000000000..d5758761457f1c1919f6330f9e4736e296bbd684 --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/string/escaped-escape.toml @@ -0,0 +1 @@ +answer = "\\x64" diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/string/escapes.json b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/string/escapes.json new file mode 100644 index 0000000000000000000000000000000000000000..d849574ac3b72a84095f8ef7a8bf6831dafd3ce4 --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/string/escapes.json @@ -0,0 +1,54 @@ +{ + "backslash": { + "type": "string", + "value": "This string has a \\ backslash character." + }, + "backspace": { + "type": "string", + "value": "This string has a \u0008 backspace character." + }, + "carriage": { + "type": "string", + "value": "This string has a \r carriage return character." + }, + "delete": { + "type": "string", + "value": "This string has a  delete control code." + }, + "formfeed": { + "type": "string", + "value": "This string has a \u000c form feed character." + }, + "newline": { + "type": "string", + "value": "This string has a \n new line character." + }, + "notunicode1": { + "type": "string", + "value": "This string does not have a unicode \\u escape." + }, + "notunicode2": { + "type": "string", + "value": "This string does not have a unicode \\u escape." + }, + "notunicode3": { + "type": "string", + "value": "This string does not have a unicode \\u0075 escape." + }, + "notunicode4": { + "type": "string", + "value": "This string does not have a unicode \\u escape." + }, + "quote": { + "type": "string", + "value": "This string has a \" quote character." + }, + "tab": { + "type": "string", + "value": "This string has a \t tab character." + }, + "unitseparator": { + "type": "string", + "value": "This string has a \u001f unit separator control code." + } +} diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/string/escapes.toml b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/string/escapes.toml new file mode 100644 index 0000000000000000000000000000000000000000..78f7ebdf432417e9c7e65c5704cc2d95bf5a2257 --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/string/escapes.toml @@ -0,0 +1,13 @@ +backspace = "This string has a \b backspace character." +tab = "This string has a \t tab character." +newline = "This string has a \n new line character." +formfeed = "This string has a \f form feed character." +carriage = "This string has a \r carriage return character." +quote = "This string has a \" quote character." +backslash = "This string has a \\ backslash character." +notunicode1 = "This string does not have a unicode \\u escape." +notunicode2 = "This string does not have a unicode \u005Cu escape." +notunicode3 = "This string does not have a unicode \\u0075 escape." +notunicode4 = "This string does not have a unicode \\\u0075 escape." +delete = "This string has a \u007F delete control code." +unitseparator = "This string has a \u001F unit separator control code." diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/string/multiline-json b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/string/multiline-json new file mode 100644 index 0000000000000000000000000000000000000000..66e572bd46512684d44b3ea3f17cf3ebc9fe5bd7 --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/string/multiline-json @@ -0,0 +1,54 @@ +{ + "equivalent_one": { + "type": "string", + "value": "The quick brown fox jumps over the lazy dog." + }, + "equivalent_three": { + "type": "string", + "value": "The quick brown fox jumps over the lazy dog." + }, + "equivalent_two": { + "type": "string", + "value": "The quick brown fox jumps over the lazy dog." + }, + "escape-bs-1": { + "type": "string", + "value": "a \\\nb" + }, + "escape-bs-2": { + "type": "string", + "value": "a \\b" + }, + "escape-bs-3": { + "type": "string", + "value": "a \\\\\n b" + }, + "keep-ws-before": { + "type": "string", + "value": "a \tb" + }, + "multiline_empty_four": { + "type": "string", + "value": "" + }, + "multiline_empty_one": { + "type": "string", + "value": "" + }, + "multiline_empty_three": { + "type": "string", + "value": "" + }, + "multiline_empty_two": { + "type": "string", + "value": "" + }, + "no-space": { + "type": "string", + "value": "ab" + }, + "whitespace-after-bs": { + "type": "string", + "value": "The quick brown fox jumps over the lazy dog." + } +} diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/string/multiline-quotes.json b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/string/multiline-quotes.json new file mode 100644 index 0000000000000000000000000000000000000000..c134f67148405f9669d63ce8d58b6641fe73f3f6 --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/string/multiline-quotes.json @@ -0,0 +1,42 @@ +{ + "lit_one": { + "type": "string", + "value": "'one quote'" + }, + "lit_one_space": { + "type": "string", + "value": " 'one quote' " + }, + "lit_two": { + "type": "string", + "value": "''two quotes''" + }, + "lit_two_space": { + "type": "string", + "value": " ''two quotes'' " + }, + "mismatch1": { + "type": "string", + "value": "aaa'''bbb" + }, + "mismatch2": { + "type": "string", + "value": "aaa\"\"\"bbb" + }, + "one": { + "type": "string", + "value": "\"one quote\"" + }, + "one_space": { + "type": "string", + "value": " \"one quote\" " + }, + "two": { + "type": "string", + "value": "\"\"two quotes\"\"" + }, + "two_space": { + "type": "string", + "value": " \"\"two quotes\"\" " + } +} diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/string/multiline-quotes.toml b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/string/multiline-quotes.toml new file mode 100644 index 0000000000000000000000000000000000000000..e138e2fa04cfba40b21e50979a347f10272a005e --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/string/multiline-quotes.toml @@ -0,0 +1,15 @@ +# Make sure that quotes inside multiline strings are allowed, including right +# after the opening '''/""" and before the closing '''/""" + +lit_one = ''''one quote'''' +lit_two = '''''two quotes''''' +lit_one_space = ''' 'one quote' ''' +lit_two_space = ''' ''two quotes'' ''' + +one = """"one quote"""" +two = """""two quotes""""" +one_space = """ "one quote" """ +two_space = """ ""two quotes"" """ + +mismatch1 = """aaa'''bbb""" +mismatch2 = '''aaa"""bbb''' diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/string/multiline-toml b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/string/multiline-toml new file mode 100644 index 0000000000000000000000000000000000000000..070484833043ea0ee43438a7b334234904b05d94 --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/string/multiline-toml @@ -0,0 +1,46 @@ +# NOTE: this file includes some literal tab characters. + +multiline_empty_one = """""" +multiline_empty_two = """ +""" +multiline_empty_three = """\ + """ +multiline_empty_four = """\ + \ + \ + """ + +equivalent_one = "The quick brown fox jumps over the lazy dog." +equivalent_two = """ +The quick brown \ + + + fox jumps over \ + the lazy dog.""" + +equivalent_three = """\ + The quick brown \ + fox jumps over \ + the lazy dog.\ + """ + +whitespace-after-bs = """\ + The quick brown \ + fox jumps over \ + the lazy dog.\ + """ + +no-space = """a\ + b""" + +keep-ws-before = """a \ + b""" + +escape-bs-1 = """a \\ +b""" + +escape-bs-2 = """a \\\ +b""" + +escape-bs-3 = """a \\\\ + b""" diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/string/nl.json b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/string/nl.json new file mode 100644 index 0000000000000000000000000000000000000000..8eae09a02a0623b3d59c9f3807d6fe1a38e27ca0 --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/string/nl.json @@ -0,0 +1,22 @@ +{ + "lit_nl_end": { + "type": "string", + "value": "value\\n" + }, + "lit_nl_mid": { + "type": "string", + "value": "val\\nue" + }, + "lit_nl_uni": { + "type": "string", + "value": "val\\ue" + }, + "nl_end": { + "type": "string", + "value": "value\n" + }, + "nl_mid": { + "type": "string", + "value": "val\nue" + } +} diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/string/nl.toml b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/string/nl.toml new file mode 100644 index 0000000000000000000000000000000000000000..1e09a8bf78d684892e3c056cb584722c66c12807 --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/string/nl.toml @@ -0,0 +1,6 @@ +nl_mid = "val\nue" +nl_end = """value\n""" + +lit_nl_end = '''value\n''' +lit_nl_mid = 'val\nue' +lit_nl_uni = 'val\ue' diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/string/raw-multiline.json b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/string/raw-multiline.json new file mode 100644 index 0000000000000000000000000000000000000000..4d195ec503d308705d3cf492c891690717677596 --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/string/raw-multiline.json @@ -0,0 +1,14 @@ +{ + "firstnl": { + "type": "string", + "value": "This string has a ' quote character." + }, + "multiline": { + "type": "string", + "value": "This string\nhas ' a quote character\nand more than\none newline\nin it." + }, + "oneline": { + "type": "string", + "value": "This string has a ' quote character." + } +} diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/string/raw-multiline.toml b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/string/raw-multiline.toml new file mode 100644 index 0000000000000000000000000000000000000000..8094c03e31a404e91b1b6c054817c1b7a6b4ddbb --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/string/raw-multiline.toml @@ -0,0 +1,9 @@ +oneline = '''This string has a ' quote character.''' +firstnl = ''' +This string has a ' quote character.''' +multiline = ''' +This string +has ' a quote character +and more than +one newline +in it.''' diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/string/raw.json b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/string/raw.json new file mode 100644 index 0000000000000000000000000000000000000000..6b753a35b88791d1665f48612f75453fecbec812 --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/string/raw.json @@ -0,0 +1,30 @@ +{ + "backslash": { + "type": "string", + "value": "This string has a \\\\ backslash character." + }, + "backspace": { + "type": "string", + "value": "This string has a \\b backspace character." + }, + "carriage": { + "type": "string", + "value": "This string has a \\r carriage return character." + }, + "formfeed": { + "type": "string", + "value": "This string has a \\f form feed character." + }, + "newline": { + "type": "string", + "value": "This string has a \\n new line character." + }, + "slash": { + "type": "string", + "value": "This string has a \\/ slash character." + }, + "tab": { + "type": "string", + "value": "This string has a \\t tab character." + } +} diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/string/raw.toml b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/string/raw.toml new file mode 100644 index 0000000000000000000000000000000000000000..92acd2557c4c2a5fd102d8af064d1b7e851e04c3 --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/string/raw.toml @@ -0,0 +1,7 @@ +backspace = 'This string has a \b backspace character.' +tab = 'This string has a \t tab character.' +newline = 'This string has a \n new line character.' +formfeed = 'This string has a \f form feed character.' +carriage = 'This string has a \r carriage return character.' +slash = 'This string has a \/ slash character.' +backslash = 'This string has a \\ backslash character.' diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/string/simple.json b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/string/simple.json new file mode 100644 index 0000000000000000000000000000000000000000..2561cda38bd149fbccf135932090b8e7036c91b8 --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/string/simple.json @@ -0,0 +1,6 @@ +{ + "answer": { + "type": "string", + "value": "You are not drinking enough whisky." + } +} diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/string/simple.toml b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/string/simple.toml new file mode 100644 index 0000000000000000000000000000000000000000..e17ade6237b7ba9900f1f90dc5969f83d454d897 --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/string/simple.toml @@ -0,0 +1 @@ +answer = "You are not drinking enough whisky." diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/string/unicode-escape.json b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/string/unicode-escape.json new file mode 100644 index 0000000000000000000000000000000000000000..9ae728bad6acd5beb20e0ebfc4c7453cbf24876f --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/string/unicode-escape.json @@ -0,0 +1,10 @@ +{ + "answer4": { + "type": "string", + "value": "Ī“" + }, + "answer8": { + "type": "string", + "value": "Ī“" + } +} diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/string/unicode-escape.toml b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/string/unicode-escape.toml new file mode 100644 index 0000000000000000000000000000000000000000..82faecbfa5997d5a9ade955c7d486547d9b09a74 --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/string/unicode-escape.toml @@ -0,0 +1,2 @@ +answer4 = "\u03B4" +answer8 = "\U000003B4" diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/string/unicode-literal.json b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/string/unicode-literal.json new file mode 100644 index 0000000000000000000000000000000000000000..7f15df4229cf9d2c02cebc27e5f5a676f3caa0cc --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/string/unicode-literal.json @@ -0,0 +1,6 @@ +{ + "answer": { + "type": "string", + "value": "Ī“" + } +} diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/string/unicode-literal.toml b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/string/unicode-literal.toml new file mode 100644 index 0000000000000000000000000000000000000000..c65723ca1d273aa9e003158e65450e8cecca266b --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/string/unicode-literal.toml @@ -0,0 +1 @@ +answer = "Ī“" diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/string/with-pound.json b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/string/with-pound.json new file mode 100644 index 0000000000000000000000000000000000000000..2cb8beb9068d8731a42a29767c8be3471c25f0ef --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/string/with-pound.json @@ -0,0 +1,10 @@ +{ + "pound": { + "type": "string", + "value": "We see no # comments here." + }, + "poundcomment": { + "type": "string", + "value": "But there are # some comments here." + } +} diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/string/with-pound.toml b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/string/with-pound.toml new file mode 100644 index 0000000000000000000000000000000000000000..5fd87466dff05ebe69f6488aeef45951678aabd2 --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/string/with-pound.toml @@ -0,0 +1,2 @@ +pound = "We see no # comments here." +poundcomment = "But there are # some comments here." # Did I # mess you up? diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/table/array-implicit.json b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/table/array-implicit.json new file mode 100644 index 0000000000000000000000000000000000000000..ee164c5f3b9256011005f35bb4cf405c649e8525 --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/table/array-implicit.json @@ -0,0 +1,12 @@ +{ + "albums": { + "songs": [ + { + "name": { + "type": "string", + "value": "Glory Days" + } + } + ] + } +} diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/table/array-implicit.toml b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/table/array-implicit.toml new file mode 100644 index 0000000000000000000000000000000000000000..3157ac981d37991ea98e6191aaac27b6983d2c60 --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/table/array-implicit.toml @@ -0,0 +1,2 @@ +[[albums.songs]] +name = "Glory Days" diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/table/array-many.json b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/table/array-many.json new file mode 100644 index 0000000000000000000000000000000000000000..fe78bf6b5bee1f42faa403ae5d8fc368bf8c285f --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/table/array-many.json @@ -0,0 +1,34 @@ +{ + "people": [ + { + "first_name": { + "type": "string", + "value": "Bruce" + }, + "last_name": { + "type": "string", + "value": "Springsteen" + } + }, + { + "first_name": { + "type": "string", + "value": "Eric" + }, + "last_name": { + "type": "string", + "value": "Clapton" + } + }, + { + "first_name": { + "type": "string", + "value": "Bob" + }, + "last_name": { + "type": "string", + "value": "Seger" + } + } + ] +} diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/table/array-many.toml b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/table/array-many.toml new file mode 100644 index 0000000000000000000000000000000000000000..46062beb8e747400602845f40ad477219286afa6 --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/table/array-many.toml @@ -0,0 +1,11 @@ +[[people]] +first_name = "Bruce" +last_name = "Springsteen" + +[[people]] +first_name = "Eric" +last_name = "Clapton" + +[[people]] +first_name = "Bob" +last_name = "Seger" diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/table/array-nest.json b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/table/array-nest.json new file mode 100644 index 0000000000000000000000000000000000000000..97f55c81ef8a75ef46c016b5b0c193d2c928c185 --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/table/array-nest.json @@ -0,0 +1,44 @@ +{ + "albums": [ + { + "name": { + "type": "string", + "value": "Born to Run" + }, + "songs": [ + { + "name": { + "type": "string", + "value": "Jungleland" + } + }, + { + "name": { + "type": "string", + "value": "Meeting Across the River" + } + } + ] + }, + { + "name": { + "type": "string", + "value": "Born in the USA" + }, + "songs": [ + { + "name": { + "type": "string", + "value": "Glory Days" + } + }, + { + "name": { + "type": "string", + "value": "Dancing in the Dark" + } + } + ] + } + ] +} diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/table/array-nest.toml b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/table/array-nest.toml new file mode 100644 index 0000000000000000000000000000000000000000..d659a3d9470c50ebd93b6617ca2f32bc0c5d95ce --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/table/array-nest.toml @@ -0,0 +1,17 @@ +[[albums]] +name = "Born to Run" + + [[albums.songs]] + name = "Jungleland" + + [[albums.songs]] + name = "Meeting Across the River" + +[[albums]] +name = "Born in the USA" + + [[albums.songs]] + name = "Glory Days" + + [[albums.songs]] + name = "Dancing in the Dark" diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/table/array-one.json b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/table/array-one.json new file mode 100644 index 0000000000000000000000000000000000000000..5cd67de1fbabd51a8003cfd23b424c0d3e29e0a0 --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/table/array-one.json @@ -0,0 +1,14 @@ +{ + "people": [ + { + "first_name": { + "type": "string", + "value": "Bruce" + }, + "last_name": { + "type": "string", + "value": "Springsteen" + } + } + ] +} diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/table/array-one.toml b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/table/array-one.toml new file mode 100644 index 0000000000000000000000000000000000000000..cd7e1b690711019d512be5d61db9341bca3c5e48 --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/table/array-one.toml @@ -0,0 +1,3 @@ +[[people]] +first_name = "Bruce" +last_name = "Springsteen" diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/table/array-table-array.json b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/table/array-table-array.json new file mode 100644 index 0000000000000000000000000000000000000000..5c3d6495d22457185da12893c81eeed4186e9092 --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/table/array-table-array.json @@ -0,0 +1,24 @@ +{ + "a": [ + { + "b": [ + { + "c": { + "d": { + "type": "string", + "value": "val0" + } + } + }, + { + "c": { + "d": { + "type": "string", + "value": "val1" + } + } + } + ] + } + ] +} diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/table/array-table-array.toml b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/table/array-table-array.toml new file mode 100644 index 0000000000000000000000000000000000000000..a07b0c7fe3fddf528926122e214144bbe82bae54 --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/table/array-table-array.toml @@ -0,0 +1,7 @@ +[[a]] + [[a.b]] + [a.b.c] + d = "val0" + [[a.b]] + [a.b.c] + d = "val1" diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/table/empty.json b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/table/empty.json new file mode 100644 index 0000000000000000000000000000000000000000..3e82cdad508832e7e8183be7f9eb9ba3a71d77b6 --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/table/empty.json @@ -0,0 +1,3 @@ +{ + "a": {} +} diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/table/empty.toml b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/table/empty.toml new file mode 100644 index 0000000000000000000000000000000000000000..8bb6a0aa07ea695561c000d4ea4950c7166b2d3e --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/table/empty.toml @@ -0,0 +1 @@ +[a] diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/table/keyword.json b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/table/keyword.json new file mode 100644 index 0000000000000000000000000000000000000000..a15dfae0a80c3dbfd43ede488a95405ff2057019 --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/table/keyword.json @@ -0,0 +1,6 @@ +{ + "true": {}, + "false": {}, + "inf": {}, + "nan": {} +} diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/table/keyword.toml b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/table/keyword.toml new file mode 100644 index 0000000000000000000000000000000000000000..bc3d52a7dd5b5165b0e67b502e8c0259c777a523 --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/table/keyword.toml @@ -0,0 +1,9 @@ +[true] + +[false] + +[inf] + +[nan] + + diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/table/names.json b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/table/names.json new file mode 100644 index 0000000000000000000000000000000000000000..66d8ea5b7ed3cbbb18f71cbdd8faf723689db4ce --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/table/names.json @@ -0,0 +1,30 @@ +{ + "a": { + " x ": {}, + "b": { + "c": {} + }, + "b.c": {}, + "d.e": {} + }, + "d": { + "e": { + "f": {} + } + }, + "g": { + "h": { + "i": {} + } + }, + "j": { + "Źž": { + "l": {} + } + }, + "x": { + "1": { + "2": {} + } + } +} diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/table/names.toml b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/table/names.toml new file mode 100644 index 0000000000000000000000000000000000000000..092da2ff9ea220cc52523d25fffbb57a226a426e --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/table/names.toml @@ -0,0 +1,9 @@ +[a.b.c] +[a."b.c"] +[a.'d.e'] +[a.' x '] +[ d.e.f ] +[ g . h . i ] +[ j . "Źž" . 'l' ] + +[x.1.2] diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/table/no-eol.json b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/table/no-eol.json new file mode 100644 index 0000000000000000000000000000000000000000..b6e7fb5020d20086d7ff7516053ba73a83a16326 --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/table/no-eol.json @@ -0,0 +1,3 @@ +{ + "table": {} +} diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/table/no-eol.toml b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/table/no-eol.toml new file mode 100644 index 0000000000000000000000000000000000000000..f1098fdacaa2716f357173a357f88e65e661436e --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/table/no-eol.toml @@ -0,0 +1 @@ +[table] diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/table/sub-empty.json b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/table/sub-empty.json new file mode 100644 index 0000000000000000000000000000000000000000..ed10cd236dd9e9aecb2b77d53110f2489a4f00e5 --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/table/sub-empty.json @@ -0,0 +1,5 @@ +{ + "a": { + "b": {} + } +} diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/table/sub-empty.toml b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/table/sub-empty.toml new file mode 100644 index 0000000000000000000000000000000000000000..70b7fe11c3d12f9342824e8b9e0c2c996123a26d --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/table/sub-empty.toml @@ -0,0 +1,2 @@ +[a] +[a.b] diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/table/whitespace.json b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/table/whitespace.json new file mode 100644 index 0000000000000000000000000000000000000000..c7704703021616cead7858f523ce98af118ccf31 --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/table/whitespace.json @@ -0,0 +1,3 @@ +{ + "valid key": {} +} diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/table/whitespace.toml b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/table/whitespace.toml new file mode 100644 index 0000000000000000000000000000000000000000..daf881d13a560c4b24fa231039ead3322d6bf42b --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/table/whitespace.toml @@ -0,0 +1 @@ +["valid key"] diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/table/with-literal-string.json b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/table/with-literal-string.json new file mode 100644 index 0000000000000000000000000000000000000000..7784695c99c70b2e31574f6b4b2b980302741e75 --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/table/with-literal-string.json @@ -0,0 +1,12 @@ +{ + "a": { + "\"b\"": { + "c": { + "answer": { + "type": "integer", + "value": "42" + } + } + } + } +} diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/table/with-literal-string.toml b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/table/with-literal-string.toml new file mode 100644 index 0000000000000000000000000000000000000000..b81643daa0f2dce97e5339cbf902aae842832eda --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/table/with-literal-string.toml @@ -0,0 +1,4 @@ +['a'] +[a.'"b"'] +[a.'"b"'.c] +answer = 42 diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/table/with-pound.json b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/table/with-pound.json new file mode 100644 index 0000000000000000000000000000000000000000..f32d2f2ebdd571ff08e2588bcb0421d89f833398 --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/table/with-pound.json @@ -0,0 +1,8 @@ +{ + "key#group": { + "answer": { + "type": "integer", + "value": "42" + } + } +} diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/table/with-pound.toml b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/table/with-pound.toml new file mode 100644 index 0000000000000000000000000000000000000000..33f2c4fd6cf02ef95585356cd18cff60d7f6d362 --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/table/with-pound.toml @@ -0,0 +1,2 @@ +["key#group"] +answer = 42 diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/table/with-single-quotes.json b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/table/with-single-quotes.json new file mode 100644 index 0000000000000000000000000000000000000000..347c693cf63c29ba90fcbd0b2fc7b79b5c0bc89b --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/table/with-single-quotes.json @@ -0,0 +1,12 @@ +{ + "a": { + "b": { + "c": { + "answer": { + "type": "integer", + "value": "42" + } + } + } + } +} diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/table/with-single-quotes.toml b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/table/with-single-quotes.toml new file mode 100644 index 0000000000000000000000000000000000000000..56e52cc990a13c0f101ea9840ed723b324683268 --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/table/with-single-quotes.toml @@ -0,0 +1,4 @@ +['a'] +[a.'b'] +[a.'b'.c] +answer = 42 diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/table/without-super.json b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/table/without-super.json new file mode 100644 index 0000000000000000000000000000000000000000..3c390c682ccfcba62fcb027455f48e867af1ce55 --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/table/without-super.json @@ -0,0 +1,9 @@ +{ + "x": { + "y": { + "z": { + "w": {} + } + } + } +} diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/table/without-super.toml b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/table/without-super.toml new file mode 100644 index 0000000000000000000000000000000000000000..73ed68b2c145b5069bdacd6d9499231399f210d1 --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/info/test/tests/toml-test/tests/valid/table/without-super.toml @@ -0,0 +1,5 @@ +# [x] you +# [x.y] don't +# [x.y.z] need these +[x.y.z.w] # for this to work +[x] # defining a super-table afterwards is ok diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/lib/python3.13/site-packages/tomlkit-0.13.3.dist-info/INSTALLER b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/lib/python3.13/site-packages/tomlkit-0.13.3.dist-info/INSTALLER new file mode 100644 index 0000000000000000000000000000000000000000..f79e4cb9aaf0b2d9e8ba78861e2071317b2384b3 --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/lib/python3.13/site-packages/tomlkit-0.13.3.dist-info/INSTALLER @@ -0,0 +1 @@ +conda \ No newline at end of file diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/lib/python3.13/site-packages/tomlkit-0.13.3.dist-info/METADATA b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/lib/python3.13/site-packages/tomlkit-0.13.3.dist-info/METADATA new file mode 100644 index 0000000000000000000000000000000000000000..f5c953eb42cc8e2ef98fca93369b8cfd17b5f194 --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/lib/python3.13/site-packages/tomlkit-0.13.3.dist-info/METADATA @@ -0,0 +1,78 @@ +Metadata-Version: 2.4 +Name: tomlkit +Version: 0.13.3 +Summary: Style preserving TOML library +License: MIT +License-File: LICENSE +Author: SĆ©bastien Eustace +Author-email: sebastien@eustace.io +Requires-Python: >=3.8 +Classifier: License :: OSI Approved :: MIT License +Classifier: Programming Language :: Python :: 3 +Classifier: Programming Language :: Python :: 3.8 +Classifier: Programming Language :: Python :: 3.9 +Classifier: Programming Language :: Python :: 3.10 +Classifier: Programming Language :: Python :: 3.11 +Classifier: Programming Language :: Python :: 3.12 +Classifier: Programming Language :: Python :: 3.13 +Classifier: Programming Language :: Python :: 3.14 +Project-URL: Homepage, https://github.com/sdispater/tomlkit +Project-URL: Repository, https://github.com/sdispater/tomlkit +Description-Content-Type: text/markdown + +[github_release]: https://img.shields.io/github/release/sdispater/tomlkit.svg?logo=github&logoColor=white +[pypi_version]: https://img.shields.io/pypi/v/tomlkit.svg?logo=python&logoColor=white +[python_versions]: https://img.shields.io/pypi/pyversions/tomlkit.svg?logo=python&logoColor=white +[github_license]: https://img.shields.io/github/license/sdispater/tomlkit.svg?logo=github&logoColor=white +[github_action]: https://github.com/sdispater/tomlkit/actions/workflows/tests.yml/badge.svg + +[![GitHub Release][github_release]](https://github.com/sdispater/tomlkit/releases/) +[![PyPI Version][pypi_version]](https://pypi.org/project/tomlkit/) +[![Python Versions][python_versions]](https://pypi.org/project/tomlkit/) +[![License][github_license]](https://github.com/sdispater/tomlkit/blob/master/LICENSE) +
+[![Tests][github_action]](https://github.com/sdispater/tomlkit/actions/workflows/tests.yml) + +# TOML Kit - Style-preserving TOML library for Python + +TOML Kit is a **1.0.0-compliant** [TOML](https://toml.io/) library. + +It includes a parser that preserves all comments, indentations, whitespace and internal element ordering, +and makes them accessible and editable via an intuitive API. + +You can also create new TOML documents from scratch using the provided helpers. + +Part of the implementation has been adapted, improved and fixed from [Molten](https://github.com/LeopoldArkham/Molten). + +## Usage + +See the [documentation](https://tomlkit.readthedocs.io/) for more information. + +## Installation + +If you are using [Poetry](https://poetry.eustace.io), +add `tomlkit` to your `pyproject.toml` file by using: + +```bash +poetry add tomlkit +``` + +If not, you can use `pip`: + +```bash +pip install tomlkit +``` + +## Running tests + +Please clone the repo with submodules with the following command: +```bash +git clone --recurse-submodules https://github.com/python-poetry/tomlkit.git +``` +The `toml-test` submodule is required for running the tests. + +You can then run the tests with +```bash +poetry run pytest -q tests +``` + diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/lib/python3.13/site-packages/tomlkit-0.13.3.dist-info/RECORD b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/lib/python3.13/site-packages/tomlkit-0.13.3.dist-info/RECORD new file mode 100644 index 0000000000000000000000000000000000000000..ce7c5fcd4e22c1373fe50f5d8f425b497bd78001 --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/lib/python3.13/site-packages/tomlkit-0.13.3.dist-info/RECORD @@ -0,0 +1,34 @@ +tomlkit-0.13.3.dist-info/INSTALLER,sha256=zuuue4knoyJ-UwPPXg8fezS7VCrXJQrAP7zeNuwvFQg,4 +tomlkit-0.13.3.dist-info/METADATA,sha256=WGB4KL1e47L4PjAccq_T6GvF8BdWrJh_YCViVGNwlSU,2835 +tomlkit-0.13.3.dist-info/RECORD,, +tomlkit-0.13.3.dist-info/REQUESTED,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0 +tomlkit-0.13.3.dist-info/WHEEL,sha256=M5asmiAlL6HEcOq52Yi5mmk9KmTVjY2RDPtO4p9DMrc,88 +tomlkit-0.13.3.dist-info/direct_url.json,sha256=yGFRIc96Pte9WxFw21srKfW_sY3oclqNgO5D_tqDll8,97 +tomlkit-0.13.3.dist-info/licenses/LICENSE,sha256=8vm0YLpxnaZiat0mTTeC8nWk_3qrZ3vtoIszCRHiOts,1062 +tomlkit/__init__.py,sha256=FI03MlAi7dh0MxLPrTcgYJgYlt_MN9-pW1X2wpf8W68,1282 +tomlkit/__pycache__/__init__.cpython-313.pyc,, +tomlkit/__pycache__/_compat.cpython-313.pyc,, +tomlkit/__pycache__/_types.cpython-313.pyc,, +tomlkit/__pycache__/_utils.cpython-313.pyc,, +tomlkit/__pycache__/api.cpython-313.pyc,, +tomlkit/__pycache__/container.cpython-313.pyc,, +tomlkit/__pycache__/exceptions.cpython-313.pyc,, +tomlkit/__pycache__/items.cpython-313.pyc,, +tomlkit/__pycache__/parser.cpython-313.pyc,, +tomlkit/__pycache__/source.cpython-313.pyc,, +tomlkit/__pycache__/toml_char.cpython-313.pyc,, +tomlkit/__pycache__/toml_document.cpython-313.pyc,, +tomlkit/__pycache__/toml_file.cpython-313.pyc,, +tomlkit/_compat.py,sha256=gp7P7qNh0yY1dg0wyjiCDbVwFTdUo7p0QwjV4T3Funs,513 +tomlkit/_types.py,sha256=42ht2m-_pJPvQ_uMKMIJf4KL6F9N0NoDa0fymfTeIC4,2619 +tomlkit/_utils.py,sha256=m4OyWq9nw5MGabHhQKTIu1YtUD8SVJyoTImHTN6L7Yc,4089 +tomlkit/api.py,sha256=q3ZmRM87tKChjsnuqaj6EgHtTxSfe-fPhAb5MbIg_3U,7811 +tomlkit/container.py,sha256=940ylh_8JfrTEZsCSY6q5PJJ8TvJvOhuVagoRB-hyog,31685 +tomlkit/exceptions.py,sha256=e-0iKjv-u2ngE6G6XMOxaoBNnKBfPNjDLmaw4YDHpoU,5703 +tomlkit/items.py,sha256=14Ks1XFzXsJVYaBsHaJC_Iz9EKodp0bROJzF3HXjBek,56286 +tomlkit/parser.py,sha256=GaTS0NQlEelkd1GTlnDFT3NtQdp5fC1j10_lnK3pOdI,38080 +tomlkit/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0 +tomlkit/source.py,sha256=Nith7mmPmhTf5dMSRc41bY9cuIRR_4CoqOjC-fxzfCo,4835 +tomlkit/toml_char.py,sha256=w3sQZ0dolZ1qjZ2Rxj_svvlpRNNGB_fjfBcYD0gFnDs,1291 +tomlkit/toml_document.py,sha256=OCTkWXd3P58EZT4SD8_ddc1YpkMaqtlS5_stHTBmMOI,110 +tomlkit/toml_file.py,sha256=8ZzSZv2C1R9Qce2WZ122ijnl9LUZJ_1nS1xLLQT7OX4,1659 diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/lib/python3.13/site-packages/tomlkit-0.13.3.dist-info/REQUESTED b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/lib/python3.13/site-packages/tomlkit-0.13.3.dist-info/REQUESTED new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/lib/python3.13/site-packages/tomlkit-0.13.3.dist-info/WHEEL b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/lib/python3.13/site-packages/tomlkit-0.13.3.dist-info/WHEEL new file mode 100644 index 0000000000000000000000000000000000000000..9f0d68ff7fc3c1ff6da960ed2ffd70dd8ea16896 --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/lib/python3.13/site-packages/tomlkit-0.13.3.dist-info/WHEEL @@ -0,0 +1,4 @@ +Wheel-Version: 1.0 +Generator: poetry-core 2.2.0 +Root-Is-Purelib: true +Tag: py3-none-any diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/lib/python3.13/site-packages/tomlkit-0.13.3.dist-info/direct_url.json b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/lib/python3.13/site-packages/tomlkit-0.13.3.dist-info/direct_url.json new file mode 100644 index 0000000000000000000000000000000000000000..e19e03016c817337f48671d1ff6b10075b76e3dc --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/lib/python3.13/site-packages/tomlkit-0.13.3.dist-info/direct_url.json @@ -0,0 +1 @@ +{"dir_info": {}, "url": "file:///home/task_176289666312502/conda-bld/tomlkit_1762896676945/work"} \ No newline at end of file diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/lib/python3.13/site-packages/tomlkit-0.13.3.dist-info/licenses/LICENSE b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/lib/python3.13/site-packages/tomlkit-0.13.3.dist-info/licenses/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..44cf2b30e6888272f6b278672d0077cd5948b1e7 --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/lib/python3.13/site-packages/tomlkit-0.13.3.dist-info/licenses/LICENSE @@ -0,0 +1,20 @@ +Copyright (c) 2018 SĆ©bastien Eustace + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/lib/python3.13/site-packages/tomlkit/__init__.py b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/lib/python3.13/site-packages/tomlkit/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..105ff686b038278d8bbbd339eb9878a8f2093f50 --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/lib/python3.13/site-packages/tomlkit/__init__.py @@ -0,0 +1,59 @@ +from tomlkit.api import TOMLDocument +from tomlkit.api import aot +from tomlkit.api import array +from tomlkit.api import boolean +from tomlkit.api import comment +from tomlkit.api import date +from tomlkit.api import datetime +from tomlkit.api import document +from tomlkit.api import dump +from tomlkit.api import dumps +from tomlkit.api import float_ +from tomlkit.api import inline_table +from tomlkit.api import integer +from tomlkit.api import item +from tomlkit.api import key +from tomlkit.api import key_value +from tomlkit.api import load +from tomlkit.api import loads +from tomlkit.api import nl +from tomlkit.api import parse +from tomlkit.api import register_encoder +from tomlkit.api import string +from tomlkit.api import table +from tomlkit.api import time +from tomlkit.api import unregister_encoder +from tomlkit.api import value +from tomlkit.api import ws + + +__version__ = "0.13.3" +__all__ = [ + "TOMLDocument", + "aot", + "array", + "boolean", + "comment", + "date", + "datetime", + "document", + "dump", + "dumps", + "float_", + "inline_table", + "integer", + "item", + "key", + "key_value", + "load", + "loads", + "nl", + "parse", + "register_encoder", + "string", + "table", + "time", + "unregister_encoder", + "value", + "ws", +] diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/lib/python3.13/site-packages/tomlkit/_compat.py b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/lib/python3.13/site-packages/tomlkit/_compat.py new file mode 100644 index 0000000000000000000000000000000000000000..8e76b7fde372220eb512e58c25369d3f4bfc11a9 --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/lib/python3.13/site-packages/tomlkit/_compat.py @@ -0,0 +1,22 @@ +from __future__ import annotations + +import contextlib +import sys + +from typing import Any + + +PY38 = sys.version_info >= (3, 8) + + +def decode(string: Any, encodings: list[str] | None = None): + if not isinstance(string, bytes): + return string + + encodings = encodings or ["utf-8", "latin1", "ascii"] + + for encoding in encodings: + with contextlib.suppress(UnicodeEncodeError, UnicodeDecodeError): + return string.decode(encoding) + + return string.decode(encodings[0], errors="ignore") diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/lib/python3.13/site-packages/tomlkit/_types.py b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/lib/python3.13/site-packages/tomlkit/_types.py new file mode 100644 index 0000000000000000000000000000000000000000..501bf4dcaa7ce0e7fd090df27d69bffc04ce21cf --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/lib/python3.13/site-packages/tomlkit/_types.py @@ -0,0 +1,82 @@ +from __future__ import annotations + +from typing import TYPE_CHECKING +from typing import Any +from typing import TypeVar + + +WT = TypeVar("WT", bound="WrapperType") + +if TYPE_CHECKING: # pragma: no cover + # Define _CustomList and _CustomDict as a workaround for: + # https://github.com/python/mypy/issues/11427 + # + # According to this issue, the typeshed contains a "lie" + # (it adds MutableSequence to the ancestry of list and MutableMapping to + # the ancestry of dict) which completely messes with the type inference for + # Table, InlineTable, Array and Container. + # + # Importing from builtins is preferred over simple assignment, see issues: + # https://github.com/python/mypy/issues/8715 + # https://github.com/python/mypy/issues/10068 + from builtins import dict as _CustomDict + from builtins import float as _CustomFloat + from builtins import int as _CustomInt + from builtins import list as _CustomList + from typing import Callable + from typing import Concatenate + from typing import ParamSpec + from typing import Protocol + + P = ParamSpec("P") + + class WrapperType(Protocol): + def _new(self: WT, value: Any) -> WT: ... + +else: + from collections.abc import MutableMapping + from collections.abc import MutableSequence + from numbers import Integral + from numbers import Real + + class _CustomList(MutableSequence, list): + """Adds MutableSequence mixin while pretending to be a builtin list""" + + def __add__(self, other): + new_list = self.copy() + new_list.extend(other) + return new_list + + def __iadd__(self, other): + self.extend(other) + return self + + class _CustomDict(MutableMapping, dict): + """Adds MutableMapping mixin while pretending to be a builtin dict""" + + def __or__(self, other): + new_dict = self.copy() + new_dict.update(other) + return new_dict + + def __ior__(self, other): + self.update(other) + return self + + class _CustomInt(Integral, int): + """Adds Integral mixin while pretending to be a builtin int""" + + class _CustomFloat(Real, float): + """Adds Real mixin while pretending to be a builtin float""" + + +def wrap_method( + original_method: Callable[Concatenate[WT, P], Any], +) -> Callable[Concatenate[WT, P], Any]: + def wrapper(self: WT, *args: P.args, **kwargs: P.kwargs) -> Any: + result = original_method(self, *args, **kwargs) + if result is NotImplemented: + return result + return self._new(result) + + return wrapper diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/lib/python3.13/site-packages/tomlkit/_utils.py b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/lib/python3.13/site-packages/tomlkit/_utils.py new file mode 100644 index 0000000000000000000000000000000000000000..f87fd7b5866b34a8e656429e28a7fbaa73f4aae0 --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/lib/python3.13/site-packages/tomlkit/_utils.py @@ -0,0 +1,158 @@ +from __future__ import annotations + +import re + +from collections.abc import Mapping +from datetime import date +from datetime import datetime +from datetime import time +from datetime import timedelta +from datetime import timezone +from typing import Collection + +from tomlkit._compat import decode + + +RFC_3339_LOOSE = re.compile( + "^" + r"(([0-9]+)-(\d{2})-(\d{2}))?" # Date + "(" + "([Tt ])?" # Separator + r"(\d{2}):(\d{2}):(\d{2})(\.([0-9]+))?" # Time + r"(([Zz])|([\+|\-]([01][0-9]|2[0-3]):([0-5][0-9])))?" # Timezone + ")?" + "$" +) + +RFC_3339_DATETIME = re.compile( + "^" + "([0-9]+)-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01])" # Date + "[Tt ]" # Separator + r"([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9]|60)(\.([0-9]+))?" # Time + r"(([Zz])|([\+|\-]([01][0-9]|2[0-3]):([0-5][0-9])))?" # Timezone + "$" +) + +RFC_3339_DATE = re.compile("^([0-9]+)-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01])$") + +RFC_3339_TIME = re.compile( + r"^([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9]|60)(\.([0-9]+))?$" +) + +_utc = timezone(timedelta(), "UTC") + + +def parse_rfc3339(string: str) -> datetime | date | time: + m = RFC_3339_DATETIME.match(string) + if m: + year = int(m.group(1)) + month = int(m.group(2)) + day = int(m.group(3)) + hour = int(m.group(4)) + minute = int(m.group(5)) + second = int(m.group(6)) + microsecond = 0 + + if m.group(7): + microsecond = int((f"{m.group(8):<06s}")[:6]) + + if m.group(9): + # Timezone + tz = m.group(9) + if tz.upper() == "Z": + tzinfo = _utc + else: + sign = m.group(11)[0] + hour_offset, minute_offset = int(m.group(12)), int(m.group(13)) + offset = timedelta(seconds=hour_offset * 3600 + minute_offset * 60) + if sign == "-": + offset = -offset + + tzinfo = timezone(offset, f"{sign}{m.group(12)}:{m.group(13)}") + + return datetime( + year, month, day, hour, minute, second, microsecond, tzinfo=tzinfo + ) + else: + return datetime(year, month, day, hour, minute, second, microsecond) + + m = RFC_3339_DATE.match(string) + if m: + year = int(m.group(1)) + month = int(m.group(2)) + day = int(m.group(3)) + + return date(year, month, day) + + m = RFC_3339_TIME.match(string) + if m: + hour = int(m.group(1)) + minute = int(m.group(2)) + second = int(m.group(3)) + microsecond = 0 + + if m.group(4): + microsecond = int((f"{m.group(5):<06s}")[:6]) + + return time(hour, minute, second, microsecond) + + raise ValueError("Invalid RFC 339 string") + + +# https://toml.io/en/v1.0.0#string +CONTROL_CHARS = frozenset(chr(c) for c in range(0x20)) | {chr(0x7F)} +_escaped = { + "b": "\b", + "t": "\t", + "n": "\n", + "f": "\f", + "r": "\r", + '"': '"', + "\\": "\\", +} +_compact_escapes = { + **{v: f"\\{k}" for k, v in _escaped.items()}, + '"""': '""\\"', +} +_basic_escapes = CONTROL_CHARS | {'"', "\\"} + + +def _unicode_escape(seq: str) -> str: + return "".join(f"\\u{ord(c):04x}" for c in seq) + + +def escape_string(s: str, escape_sequences: Collection[str] = _basic_escapes) -> str: + s = decode(s) + + res = [] + start = 0 + + def flush(inc=1): + if start != i: + res.append(s[start:i]) + + return i + inc + + found_sequences = {seq for seq in escape_sequences if seq in s} + + i = 0 + while i < len(s): + for seq in found_sequences: + seq_len = len(seq) + if s[i:].startswith(seq): + start = flush(seq_len) + res.append(_compact_escapes.get(seq) or _unicode_escape(seq)) + i += seq_len - 1 # fast-forward escape sequence + i += 1 + + flush() + + return "".join(res) + + +def merge_dicts(d1: dict, d2: dict) -> dict: + for k, v in d2.items(): + if k in d1 and isinstance(d1[k], dict) and isinstance(v, Mapping): + merge_dicts(d1[k], v) + else: + d1[k] = d2[k] diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/lib/python3.13/site-packages/tomlkit/api.py b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/lib/python3.13/site-packages/tomlkit/api.py new file mode 100644 index 0000000000000000000000000000000000000000..894c6ee46bc8875aa081bbe12be135b3240a9122 --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/lib/python3.13/site-packages/tomlkit/api.py @@ -0,0 +1,312 @@ +from __future__ import annotations + +import contextlib +import datetime as _datetime + +from collections.abc import Mapping +from typing import IO +from typing import Iterable +from typing import TypeVar + +from tomlkit._utils import parse_rfc3339 +from tomlkit.container import Container +from tomlkit.exceptions import UnexpectedCharError +from tomlkit.items import CUSTOM_ENCODERS +from tomlkit.items import AoT +from tomlkit.items import Array +from tomlkit.items import Bool +from tomlkit.items import Comment +from tomlkit.items import Date +from tomlkit.items import DateTime +from tomlkit.items import DottedKey +from tomlkit.items import Encoder +from tomlkit.items import Float +from tomlkit.items import InlineTable +from tomlkit.items import Integer +from tomlkit.items import Item as _Item +from tomlkit.items import Key +from tomlkit.items import SingleKey +from tomlkit.items import String +from tomlkit.items import StringType as _StringType +from tomlkit.items import Table +from tomlkit.items import Time +from tomlkit.items import Trivia +from tomlkit.items import Whitespace +from tomlkit.items import item +from tomlkit.parser import Parser +from tomlkit.toml_document import TOMLDocument + + +def loads(string: str | bytes) -> TOMLDocument: + """ + Parses a string into a TOMLDocument. + + Alias for parse(). + """ + return parse(string) + + +def dumps(data: Mapping, sort_keys: bool = False) -> str: + """ + Dumps a TOMLDocument into a string. + """ + if not isinstance(data, (Table, InlineTable, Container)) and isinstance( + data, Mapping + ): + data = item(dict(data), _sort_keys=sort_keys) + + try: + # data should be a `Container` (and therefore implement `as_string`) + # for all type safe invocations of this function + return data.as_string() # type: ignore[attr-defined] + except AttributeError as ex: + msg = f"Expecting Mapping or TOML Table or Container, {type(data)} given" + raise TypeError(msg) from ex + + +def load(fp: IO[str] | IO[bytes]) -> TOMLDocument: + """ + Load toml document from a file-like object. + """ + return parse(fp.read()) + + +def dump(data: Mapping, fp: IO[str], *, sort_keys: bool = False) -> None: + """ + Dump a TOMLDocument into a writable file stream. + + :param data: a dict-like object to dump + :param sort_keys: if true, sort the keys in alphabetic order + + :Example: + + >>> with open("output.toml", "w") as fp: + ... tomlkit.dump(data, fp) + """ + fp.write(dumps(data, sort_keys=sort_keys)) + + +def parse(string: str | bytes) -> TOMLDocument: + """ + Parses a string or bytes into a TOMLDocument. + """ + return Parser(string).parse() + + +def document() -> TOMLDocument: + """ + Returns a new TOMLDocument instance. + """ + return TOMLDocument() + + +# Items +def integer(raw: str | int) -> Integer: + """Create an integer item from a number or string.""" + return item(int(raw)) + + +def float_(raw: str | float) -> Float: + """Create an float item from a number or string.""" + return item(float(raw)) + + +def boolean(raw: str) -> Bool: + """Turn `true` or `false` into a boolean item.""" + return item(raw == "true") + + +def string( + raw: str, + *, + literal: bool = False, + multiline: bool = False, + escape: bool = True, +) -> String: + """Create a string item. + + By default, this function will create *single line basic* strings, but + boolean flags (e.g. ``literal=True`` and/or ``multiline=True``) + can be used for personalization. + + For more information, please check the spec: ``__. + + Common escaping rules will be applied for basic strings. + This can be controlled by explicitly setting ``escape=False``. + Please note that, if you disable escaping, you will have to make sure that + the given strings don't contain any forbidden character or sequence. + """ + type_ = _StringType.select(literal, multiline) + return String.from_raw(raw, type_, escape) + + +def date(raw: str) -> Date: + """Create a TOML date.""" + value = parse_rfc3339(raw) + if not isinstance(value, _datetime.date): + raise ValueError("date() only accepts date strings.") + + return item(value) + + +def time(raw: str) -> Time: + """Create a TOML time.""" + value = parse_rfc3339(raw) + if not isinstance(value, _datetime.time): + raise ValueError("time() only accepts time strings.") + + return item(value) + + +def datetime(raw: str) -> DateTime: + """Create a TOML datetime.""" + value = parse_rfc3339(raw) + if not isinstance(value, _datetime.datetime): + raise ValueError("datetime() only accepts datetime strings.") + + return item(value) + + +def array(raw: str = "[]") -> Array: + """Create an array item for its string representation. + + :Example: + + >>> array("[1, 2, 3]") # Create from a string + [1, 2, 3] + >>> a = array() + >>> a.extend([1, 2, 3]) # Create from a list + >>> a + [1, 2, 3] + """ + return value(raw) + + +def table(is_super_table: bool | None = None) -> Table: + """Create an empty table. + + :param is_super_table: if true, the table is a super table + + :Example: + + >>> doc = document() + >>> foo = table(True) + >>> bar = table() + >>> bar.update({'x': 1}) + >>> foo.append('bar', bar) + >>> doc.append('foo', foo) + >>> print(doc.as_string()) + [foo.bar] + x = 1 + """ + return Table(Container(), Trivia(), False, is_super_table) + + +def inline_table() -> InlineTable: + """Create an inline table. + + :Example: + + >>> table = inline_table() + >>> table.update({'x': 1, 'y': 2}) + >>> print(table.as_string()) + {x = 1, y = 2} + """ + return InlineTable(Container(), Trivia(), new=True) + + +def aot() -> AoT: + """Create an array of table. + + :Example: + + >>> doc = document() + >>> aot = aot() + >>> aot.append(item({'x': 1})) + >>> doc.append('foo', aot) + >>> print(doc.as_string()) + [[foo]] + x = 1 + """ + return AoT([]) + + +def key(k: str | Iterable[str]) -> Key: + """Create a key from a string. When a list of string is given, + it will create a dotted key. + + :Example: + + >>> doc = document() + >>> doc.append(key('foo'), 1) + >>> doc.append(key(['bar', 'baz']), 2) + >>> print(doc.as_string()) + foo = 1 + bar.baz = 2 + """ + if isinstance(k, str): + return SingleKey(k) + return DottedKey([key(_k) for _k in k]) + + +def value(raw: str) -> _Item: + """Parse a simple value from a string. + + :Example: + + >>> value("1") + 1 + >>> value("true") + True + >>> value("[1, 2, 3]") + [1, 2, 3] + """ + parser = Parser(raw) + v = parser._parse_value() + if not parser.end(): + raise parser.parse_error(UnexpectedCharError, char=parser._current) + return v + + +def key_value(src: str) -> tuple[Key, _Item]: + """Parse a key-value pair from a string. + + :Example: + + >>> key_value("foo = 1") + (Key('foo'), 1) + """ + return Parser(src)._parse_key_value() + + +def ws(src: str) -> Whitespace: + """Create a whitespace from a string.""" + return Whitespace(src, fixed=True) + + +def nl() -> Whitespace: + """Create a newline item.""" + return ws("\n") + + +def comment(string: str) -> Comment: + """Create a comment item.""" + return Comment(Trivia(comment_ws=" ", comment="# " + string)) + + +E = TypeVar("E", bound=Encoder) + + +def register_encoder(encoder: E) -> E: + """Add a custom encoder, which should be a function that will be called + if the value can't otherwise be converted. It should takes a single value + and return a TOMLKit item or raise a ``ConvertError``. + """ + CUSTOM_ENCODERS.append(encoder) + return encoder + + +def unregister_encoder(encoder: Encoder) -> None: + """Unregister a custom encoder.""" + with contextlib.suppress(ValueError): + CUSTOM_ENCODERS.remove(encoder) diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/lib/python3.13/site-packages/tomlkit/container.py b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/lib/python3.13/site-packages/tomlkit/container.py new file mode 100644 index 0000000000000000000000000000000000000000..35f8aec115938cd763c996727fc421df0d63618d --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/lib/python3.13/site-packages/tomlkit/container.py @@ -0,0 +1,946 @@ +from __future__ import annotations + +import copy + +from typing import Any +from typing import Iterator + +from tomlkit._compat import decode +from tomlkit._types import _CustomDict +from tomlkit._utils import merge_dicts +from tomlkit.exceptions import KeyAlreadyPresent +from tomlkit.exceptions import NonExistentKey +from tomlkit.exceptions import TOMLKitError +from tomlkit.items import AoT +from tomlkit.items import Comment +from tomlkit.items import Item +from tomlkit.items import Key +from tomlkit.items import Null +from tomlkit.items import SingleKey +from tomlkit.items import Table +from tomlkit.items import Trivia +from tomlkit.items import Whitespace +from tomlkit.items import item as _item + + +_NOT_SET = object() + + +class Container(_CustomDict): + """ + A container for items within a TOMLDocument. + + This class implements the `dict` interface with copy/deepcopy protocol. + """ + + def __init__(self, parsed: bool = False) -> None: + self._map: dict[SingleKey, int | tuple[int, ...]] = {} + self._body: list[tuple[Key | None, Item]] = [] + self._parsed = parsed + self._table_keys = [] + + @property + def body(self) -> list[tuple[Key | None, Item]]: + return self._body + + def unwrap(self) -> dict[str, Any]: + """Returns as pure python object (ppo)""" + unwrapped = {} + for k, v in self.items(): + if k is None: + continue + + if isinstance(k, Key): + k = k.key + + if hasattr(v, "unwrap"): + v = v.unwrap() + + if k in unwrapped: + merge_dicts(unwrapped[k], v) + else: + unwrapped[k] = v + + return unwrapped + + @property + def value(self) -> dict[str, Any]: + """The wrapped dict value""" + d = {} + for k, v in self._body: + if k is None: + continue + + k = k.key + v = v.value + + if isinstance(v, Container): + v = v.value + + if k in d: + merge_dicts(d[k], v) + else: + d[k] = v + + return d + + def parsing(self, parsing: bool) -> None: + self._parsed = parsing + + for _, v in self._body: + if isinstance(v, Table): + v.value.parsing(parsing) + elif isinstance(v, AoT): + for t in v.body: + t.value.parsing(parsing) + + def add(self, key: Key | Item | str, item: Item | None = None) -> Container: + """ + Adds an item to the current Container. + + :Example: + + >>> # add a key-value pair + >>> doc.add('key', 'value') + >>> # add a comment or whitespace or newline + >>> doc.add(comment('# comment')) + """ + if item is None: + if not isinstance(key, (Comment, Whitespace)): + raise ValueError( + "Non comment/whitespace items must have an associated key" + ) + + key, item = None, key + + return self.append(key, item) + + def _handle_dotted_key(self, key: Key, value: Item) -> None: + if isinstance(value, (Table, AoT)): + raise TOMLKitError("Can't add a table to a dotted key") + name, *mid, last = key + name._dotted = True + table = current = Table(Container(True), Trivia(), False, is_super_table=True) + for _name in mid: + _name._dotted = True + new_table = Table(Container(True), Trivia(), False, is_super_table=True) + current.append(_name, new_table) + current = new_table + + last.sep = key.sep + current.append(last, value) + + self.append(name, table) + return + + def _get_last_index_before_table(self) -> int: + last_index = -1 + for i, (k, v) in enumerate(self._body): + if isinstance(v, Null): + continue # Null elements are inserted after deletion + + if isinstance(v, Whitespace) and not v.is_fixed(): + continue + + if isinstance(v, (Table, AoT)) and not k.is_dotted(): + break + last_index = i + return last_index + 1 + + def _validate_out_of_order_table(self, key: SingleKey | None = None) -> None: + if key is None: + for k in self._map: + assert k is not None + self._validate_out_of_order_table(k) + return + if key not in self._map or not isinstance(self._map[key], tuple): + return + OutOfOrderTableProxy.validate(self, self._map[key]) + + def append( + self, key: Key | str | None, item: Item, validate: bool = True + ) -> Container: + """Similar to :meth:`add` but both key and value must be given.""" + if not isinstance(key, Key) and key is not None: + key = SingleKey(key) + + if not isinstance(item, Item): + item = _item(item) + + if key is not None and key.is_multi(): + self._handle_dotted_key(key, item) + return self + + if isinstance(item, (AoT, Table)) and item.name is None: + item.name = key.key + + prev = self._previous_item() + prev_ws = isinstance(prev, Whitespace) or ends_with_whitespace(prev) + if isinstance(item, Table): + if not self._parsed: + item.invalidate_display_name() + if ( + self._body + and not (self._parsed or item.trivia.indent or prev_ws) + and not key.is_dotted() + ): + item.trivia.indent = "\n" + + if isinstance(item, AoT) and self._body and not self._parsed: + item.invalidate_display_name() + if item and not ("\n" in item[0].trivia.indent or prev_ws): + item[0].trivia.indent = "\n" + item[0].trivia.indent + + if key is not None and key in self: + current_idx = self._map[key] + if isinstance(current_idx, tuple): + current_body_element = self._body[current_idx[-1]] + else: + current_body_element = self._body[current_idx] + + current = current_body_element[1] + + if isinstance(item, Table): + if not isinstance(current, (Table, AoT)): + raise KeyAlreadyPresent(key) + + if item.is_aot_element(): + # New AoT element found later on + # Adding it to the current AoT + if not isinstance(current, AoT): + current = AoT([current, item], parsed=self._parsed) + + self._replace(key, key, current) + else: + current.append(item) + + return self + elif current.is_aot(): + if not item.is_aot_element(): + # Tried to define a table after an AoT with the same name. + raise KeyAlreadyPresent(key) + + current.append(item) + + return self + elif current.is_super_table(): + if item.is_super_table(): + # We need to merge both super tables + if ( + key.is_dotted() + or current_body_element[0].is_dotted() + or self._table_keys[-1] != current_body_element[0] + ): + if key.is_dotted() and not self._parsed: + idx = self._get_last_index_before_table() + else: + idx = len(self._body) + + if idx < len(self._body): + self._insert_at(idx, key, item) + else: + self._raw_append(key, item) + + if validate: + self._validate_out_of_order_table(key) + + return self + + # Create a new element to replace the old one + current = copy.deepcopy(current) + for k, v in item.value.body: + current.append(k, v) + self._body[ + ( + current_idx[-1] + if isinstance(current_idx, tuple) + else current_idx + ) + ] = (current_body_element[0], current) + + return self + elif current_body_element[0].is_dotted(): + raise TOMLKitError("Redefinition of an existing table") + elif not item.is_super_table(): + raise KeyAlreadyPresent(key) + elif isinstance(item, AoT): + if not isinstance(current, AoT): + # Tried to define an AoT after a table with the same name. + raise KeyAlreadyPresent(key) + + for table in item.body: + current.append(table) + + return self + else: + raise KeyAlreadyPresent(key) + + is_table = isinstance(item, (Table, AoT)) + if ( + key is not None + and self._body + and not self._parsed + and (not is_table or key.is_dotted()) + ): + # If there is already at least one table in the current container + # and the given item is not a table, we need to find the last + # item that is not a table and insert after it + # If no such item exists, insert at the top of the table + last_index = self._get_last_index_before_table() + + if last_index < len(self._body): + after_item = self._body[last_index][1] + if not ( + isinstance(after_item, Whitespace) + or "\n" in after_item.trivia.indent + ): + after_item.trivia.indent = "\n" + after_item.trivia.indent + return self._insert_at(last_index, key, item) + else: + previous_item = self._body[-1][1] + if not ( + isinstance(previous_item, Whitespace) + or ends_with_whitespace(previous_item) + or "\n" in previous_item.trivia.trail + ): + previous_item.trivia.trail += "\n" + + self._raw_append(key, item) + return self + + def _raw_append(self, key: Key | None, item: Item) -> None: + if key in self._map: + current_idx = self._map[key] + if not isinstance(current_idx, tuple): + current_idx = (current_idx,) + + current = self._body[current_idx[-1]][1] + if key is not None and not isinstance(current, Table): + raise KeyAlreadyPresent(key) + + self._map[key] = (*current_idx, len(self._body)) + elif key is not None: + self._map[key] = len(self._body) + + self._body.append((key, item)) + if item.is_table(): + self._table_keys.append(key) + + if key is not None: + dict.__setitem__(self, key.key, item.value) + + def _remove_at(self, idx: int) -> None: + key = self._body[idx][0] + index = self._map.get(key) + if index is None: + raise NonExistentKey(key) + self._body[idx] = (None, Null()) + + if isinstance(index, tuple): + index = list(index) + index.remove(idx) + if len(index) == 1: + index = index.pop() + else: + index = tuple(index) + self._map[key] = index + else: + dict.__delitem__(self, key.key) + self._map.pop(key) + + def remove(self, key: Key | str) -> Container: + """Remove a key from the container.""" + if not isinstance(key, Key): + key = SingleKey(key) + + idx = self._map.pop(key, None) + if idx is None: + raise NonExistentKey(key) + + if isinstance(idx, tuple): + for i in idx: + self._body[i] = (None, Null()) + else: + self._body[idx] = (None, Null()) + + dict.__delitem__(self, key.key) + + return self + + def _insert_after( + self, key: Key | str, other_key: Key | str, item: Any + ) -> Container: + if key is None: + raise ValueError("Key cannot be null in insert_after()") + + if key not in self: + raise NonExistentKey(key) + + if not isinstance(key, Key): + key = SingleKey(key) + + if not isinstance(other_key, Key): + other_key = SingleKey(other_key) + + item = _item(item) + + idx = self._map[key] + # Insert after the max index if there are many. + if isinstance(idx, tuple): + idx = max(idx) + current_item = self._body[idx][1] + if "\n" not in current_item.trivia.trail: + current_item.trivia.trail += "\n" + + # Increment indices after the current index + for k, v in self._map.items(): + if isinstance(v, tuple): + new_indices = [] + for v_ in v: + if v_ > idx: + v_ = v_ + 1 + + new_indices.append(v_) + + self._map[k] = tuple(new_indices) + elif v > idx: + self._map[k] = v + 1 + + self._map[other_key] = idx + 1 + self._body.insert(idx + 1, (other_key, item)) + + if key is not None: + dict.__setitem__(self, other_key.key, item.value) + + return self + + def _insert_at(self, idx: int, key: Key | str, item: Any) -> Container: + if idx > len(self._body) - 1: + raise ValueError(f"Unable to insert at position {idx}") + + if not isinstance(key, Key): + key = SingleKey(key) + + item = _item(item) + + if idx > 0: + previous_item = self._body[idx - 1][1] + if not ( + isinstance(previous_item, Whitespace) + or ends_with_whitespace(previous_item) + or isinstance(item, (AoT, Table)) + or "\n" in previous_item.trivia.trail + ): + previous_item.trivia.trail += "\n" + + # Increment indices after the current index + for k, v in self._map.items(): + if isinstance(v, tuple): + new_indices = [] + for v_ in v: + if v_ >= idx: + v_ = v_ + 1 + + new_indices.append(v_) + + self._map[k] = tuple(new_indices) + elif v >= idx: + self._map[k] = v + 1 + + if key in self._map: + current_idx = self._map[key] + if not isinstance(current_idx, tuple): + current_idx = (current_idx,) + self._map[key] = (*current_idx, idx) + else: + self._map[key] = idx + self._body.insert(idx, (key, item)) + + dict.__setitem__(self, key.key, item.value) + + return self + + def item(self, key: Key | str) -> Item: + """Get an item for the given key.""" + if not isinstance(key, Key): + key = SingleKey(key) + + idx = self._map.get(key) + if idx is None: + raise NonExistentKey(key) + + if isinstance(idx, tuple): + # The item we are getting is an out of order table + # so we need a proxy to retrieve the proper objects + # from the parent container + return OutOfOrderTableProxy(self, idx) + + return self._body[idx][1] + + def last_item(self) -> Item | None: + """Get the last item.""" + if self._body: + return self._body[-1][1] + + def as_string(self) -> str: + """Render as TOML string.""" + s = "" + for k, v in self._body: + if k is not None: + if isinstance(v, Table): + if ( + s.strip(" ") + and not s.strip(" ").endswith("\n") + and "\n" not in v.trivia.indent + ): + s += "\n" + s += self._render_table(k, v) + elif isinstance(v, AoT): + if ( + s.strip(" ") + and not s.strip(" ").endswith("\n") + and "\n" not in v.trivia.indent + ): + s += "\n" + s += self._render_aot(k, v) + else: + s += self._render_simple_item(k, v) + else: + s += self._render_simple_item(k, v) + + return s + + def _render_table(self, key: Key, table: Table, prefix: str | None = None) -> str: + cur = "" + + if table.display_name is not None: + _key = table.display_name + else: + _key = key.as_string() + + if prefix is not None: + _key = prefix + "." + _key + + if not table.is_super_table() or ( + any( + not isinstance(v, (Table, AoT, Whitespace, Null)) + for _, v in table.value.body + ) + and not key.is_dotted() + ): + open_, close = "[", "]" + if table.is_aot_element(): + open_, close = "[[", "]]" + + newline_in_table_trivia = ( + "\n" if "\n" not in table.trivia.trail and len(table.value) > 0 else "" + ) + cur += ( + f"{table.trivia.indent}" + f"{open_}" + f"{decode(_key)}" + f"{close}" + f"{table.trivia.comment_ws}" + f"{decode(table.trivia.comment)}" + f"{table.trivia.trail}" + f"{newline_in_table_trivia}" + ) + elif table.trivia.indent == "\n": + cur += table.trivia.indent + + for k, v in table.value.body: + if isinstance(v, Table): + if ( + cur.strip(" ") + and not cur.strip(" ").endswith("\n") + and "\n" not in v.trivia.indent + ): + cur += "\n" + if v.is_super_table(): + if k.is_dotted() and not key.is_dotted(): + # Dotted key inside table + cur += self._render_table(k, v) + else: + cur += self._render_table(k, v, prefix=_key) + else: + cur += self._render_table(k, v, prefix=_key) + elif isinstance(v, AoT): + if ( + cur.strip(" ") + and not cur.strip(" ").endswith("\n") + and "\n" not in v.trivia.indent + ): + cur += "\n" + cur += self._render_aot(k, v, prefix=_key) + else: + cur += self._render_simple_item( + k, v, prefix=_key if key.is_dotted() else None + ) + + return cur + + def _render_aot(self, key, aot, prefix=None): + _key = key.as_string() + if prefix is not None: + _key = prefix + "." + _key + + cur = "" + _key = decode(_key) + for table in aot.body: + cur += self._render_aot_table(table, prefix=_key) + + return cur + + def _render_aot_table(self, table: Table, prefix: str | None = None) -> str: + cur = "" + _key = prefix or "" + open_, close = "[[", "]]" + + cur += ( + f"{table.trivia.indent}" + f"{open_}" + f"{decode(_key)}" + f"{close}" + f"{table.trivia.comment_ws}" + f"{decode(table.trivia.comment)}" + f"{table.trivia.trail}" + ) + + for k, v in table.value.body: + if isinstance(v, Table): + if v.is_super_table(): + if k.is_dotted(): + # Dotted key inside table + cur += self._render_table(k, v) + else: + cur += self._render_table(k, v, prefix=_key) + else: + cur += self._render_table(k, v, prefix=_key) + elif isinstance(v, AoT): + cur += self._render_aot(k, v, prefix=_key) + else: + cur += self._render_simple_item(k, v) + + return cur + + def _render_simple_item(self, key, item, prefix=None): + if key is None: + return item.as_string() + + _key = key.as_string() + if prefix is not None: + _key = prefix + "." + _key + + return ( + f"{item.trivia.indent}" + f"{decode(_key)}" + f"{key.sep}" + f"{decode(item.as_string())}" + f"{item.trivia.comment_ws}" + f"{decode(item.trivia.comment)}" + f"{item.trivia.trail}" + ) + + def __len__(self) -> int: + return dict.__len__(self) + + def __iter__(self) -> Iterator[str]: + return iter(dict.keys(self)) + + # Dictionary methods + def __getitem__(self, key: Key | str) -> Item | Container: + item = self.item(key) + if isinstance(item, Item) and item.is_boolean(): + return item.value + + return item + + def __setitem__(self, key: Key | str, value: Any) -> None: + if key is not None and key in self: + old_key = next(filter(lambda k: k == key, self._map)) + self._replace(old_key, key, value) + else: + self.append(key, value) + + def __delitem__(self, key: Key | str) -> None: + self.remove(key) + + def setdefault(self, key: Key | str, default: Any) -> Any: + super().setdefault(key, default=default) + return self[key] + + def _replace(self, key: Key | str, new_key: Key | str, value: Item) -> None: + if not isinstance(key, Key): + key = SingleKey(key) + + idx = self._map.get(key) + if idx is None: + raise NonExistentKey(key) + + self._replace_at(idx, new_key, value) + + def _replace_at( + self, idx: int | tuple[int], new_key: Key | str, value: Item + ) -> None: + value = _item(value) + + if isinstance(idx, tuple): + for i in idx[1:]: + self._body[i] = (None, Null()) + + idx = idx[0] + + k, v = self._body[idx] + if not isinstance(new_key, Key): + if ( + isinstance(value, (AoT, Table)) != isinstance(v, (AoT, Table)) + or new_key != k.key + ): + new_key = SingleKey(new_key) + else: # Inherit the sep of the old key + new_key = k + + del self._map[k] + self._map[new_key] = idx + if new_key != k: + dict.__delitem__(self, k) + + if isinstance(value, (AoT, Table)) != isinstance(v, (AoT, Table)): + # new tables should appear after all non-table values + self.remove(k) + for i in range(idx, len(self._body)): + if isinstance(self._body[i][1], (AoT, Table)): + self._insert_at(i, new_key, value) + idx = i + break + else: + idx = -1 + self.append(new_key, value) + else: + # Copying trivia + if not isinstance(value, (Whitespace, AoT)): + value.trivia.indent = v.trivia.indent + value.trivia.comment_ws = value.trivia.comment_ws or v.trivia.comment_ws + value.trivia.comment = value.trivia.comment or v.trivia.comment + value.trivia.trail = v.trivia.trail + self._body[idx] = (new_key, value) + + if hasattr(value, "invalidate_display_name"): + value.invalidate_display_name() # type: ignore[attr-defined] + + if isinstance(value, Table): + # Insert a cosmetic new line for tables if: + # - it does not have it yet OR is not followed by one + # - it is not the last item, or + # - The table being replaced has a newline + last, _ = self._previous_item_with_index() + idx = last if idx < 0 else idx + has_ws = ends_with_whitespace(value) + replace_has_ws = ( + isinstance(v, Table) + and v.value.body + and isinstance(v.value.body[-1][1], Whitespace) + ) + next_ws = idx < last and isinstance(self._body[idx + 1][1], Whitespace) + if (idx < last or replace_has_ws) and not (next_ws or has_ws): + value.append(None, Whitespace("\n")) + + dict.__setitem__(self, new_key.key, value.value) + + def __str__(self) -> str: + return str(self.value) + + def __repr__(self) -> str: + return repr(self.value) + + def __eq__(self, other: dict) -> bool: + if not isinstance(other, dict): + return NotImplemented + + return self.value == other + + def _getstate(self, protocol): + return (self._parsed,) + + def __reduce__(self): + return self.__reduce_ex__(2) + + def __reduce_ex__(self, protocol): + return ( + self.__class__, + self._getstate(protocol), + (self._map, self._body, self._parsed, self._table_keys), + ) + + def __setstate__(self, state): + self._map = state[0] + self._body = state[1] + self._parsed = state[2] + self._table_keys = state[3] + + for key, item in self._body: + if key is not None: + dict.__setitem__(self, key.key, item.value) + + def copy(self) -> Container: + return copy.copy(self) + + def __copy__(self) -> Container: + c = self.__class__(self._parsed) + for k, v in dict.items(self): + dict.__setitem__(c, k, v) + + c._body += self.body + c._map.update(self._map) + + return c + + def _previous_item_with_index( + self, idx: int | None = None, ignore=(Null,) + ) -> tuple[int, Item] | None: + """Find the immediate previous item before index ``idx``""" + if idx is None or idx > len(self._body): + idx = len(self._body) + for i in range(idx - 1, -1, -1): + v = self._body[i][-1] + if not isinstance(v, ignore): + return i, v + return None + + def _previous_item(self, idx: int | None = None, ignore=(Null,)) -> Item | None: + """Find the immediate previous item before index ``idx``. + If ``idx`` is not given, the last item is returned. + """ + prev = self._previous_item_with_index(idx, ignore) + return prev[-1] if prev else None + + +class OutOfOrderTableProxy(_CustomDict): + @staticmethod + def validate(container: Container, indices: tuple[int, ...]) -> None: + """Validate out of order tables in the given container""" + # Append all items to a temp container to see if there is any error + temp_container = Container(True) + for i in indices: + _, item = container._body[i] + + if isinstance(item, Table): + for k, v in item.value.body: + temp_container.append(k, v, validate=False) + + temp_container._validate_out_of_order_table() + + def __init__(self, container: Container, indices: tuple[int, ...]) -> None: + self._container = container + self._internal_container = Container(True) + self._tables: list[Table] = [] + self._tables_map: dict[Key, list[int]] = {} + + for i in indices: + _, item = self._container._body[i] + + if isinstance(item, Table): + self._tables.append(item) + table_idx = len(self._tables) - 1 + for k, v in item.value.body: + self._internal_container._raw_append(k, v) + indices = self._tables_map.setdefault(k, []) + if table_idx not in indices: + indices.append(table_idx) + if k is not None: + dict.__setitem__(self, k.key, v) + + self._internal_container._validate_out_of_order_table() + + def unwrap(self) -> str: + return self._internal_container.unwrap() + + @property + def value(self): + return self._internal_container.value + + def __getitem__(self, key: Key | str) -> Any: + if key not in self._internal_container: + raise NonExistentKey(key) + + return self._internal_container[key] + + def __setitem__(self, key: Key | str, value: Any) -> None: + from .items import item + + def _is_table_or_aot(it: Any) -> bool: + return isinstance(item(it), (Table, AoT)) + + if key in self._tables_map: + # Overwrite the first table and remove others + indices = self._tables_map[key] + while len(indices) > 1: + table = self._tables[indices.pop()] + self._remove_table(table) + old_value = self._tables[indices[0]][key] + if _is_table_or_aot(old_value) and not _is_table_or_aot(value): + # Remove the entry from the map and set value again. + del self._tables[indices[0]][key] + del self._tables_map[key] + self[key] = value + return + self._tables[indices[0]][key] = value + elif self._tables: + if not _is_table_or_aot(value): # if the value is a plain value + for table in self._tables: + # find the first table that allows plain values + if any(not _is_table_or_aot(v) for _, v in table.items()): + table[key] = value + break + else: + self._tables[0][key] = value + else: + self._tables[0][key] = value + else: + self._container[key] = value + + self._internal_container[key] = value + if key is not None: + dict.__setitem__(self, key, value) + + def _remove_table(self, table: Table) -> None: + """Remove table from the parent container""" + self._tables.remove(table) + for idx, item in enumerate(self._container._body): + if item[1] is table: + self._container._remove_at(idx) + break + + def __delitem__(self, key: Key | str) -> None: + if key not in self._tables_map: + raise NonExistentKey(key) + + for i in reversed(self._tables_map[key]): + table = self._tables[i] + del table[key] + if not table and len(self._tables) > 1: + self._remove_table(table) + + del self._tables_map[key] + del self._internal_container[key] + if key is not None: + dict.__delitem__(self, key) + + def __iter__(self) -> Iterator[str]: + return iter(dict.keys(self)) + + def __len__(self) -> int: + return dict.__len__(self) + + def setdefault(self, key: Key | str, default: Any) -> Any: + super().setdefault(key, default=default) + return self[key] + + +def ends_with_whitespace(it: Any) -> bool: + """Returns ``True`` if the given item ``it`` is a ``Table`` or ``AoT`` object + ending with a ``Whitespace``. + """ + return ( + isinstance(it, Table) and isinstance(it.value._previous_item(), Whitespace) + ) or (isinstance(it, AoT) and len(it) > 0 and isinstance(it[-1], Whitespace)) diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/lib/python3.13/site-packages/tomlkit/exceptions.py b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/lib/python3.13/site-packages/tomlkit/exceptions.py new file mode 100644 index 0000000000000000000000000000000000000000..8c7e6e749076ef0e0f17e89d4cf0dde1046ef72e --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/lib/python3.13/site-packages/tomlkit/exceptions.py @@ -0,0 +1,234 @@ +from __future__ import annotations + +from typing import Collection + + +class TOMLKitError(Exception): + pass + + +class ParseError(ValueError, TOMLKitError): + """ + This error occurs when the parser encounters a syntax error + in the TOML being parsed. The error references the line and + location within the line where the error was encountered. + """ + + def __init__(self, line: int, col: int, message: str | None = None) -> None: + self._line = line + self._col = col + + if message is None: + message = "TOML parse error" + + super().__init__(f"{message} at line {self._line} col {self._col}") + + @property + def line(self): + return self._line + + @property + def col(self): + return self._col + + +class MixedArrayTypesError(ParseError): + """ + An array was found that had two or more element types. + """ + + def __init__(self, line: int, col: int) -> None: + message = "Mixed types found in array" + + super().__init__(line, col, message=message) + + +class InvalidNumberError(ParseError): + """ + A numeric field was improperly specified. + """ + + def __init__(self, line: int, col: int) -> None: + message = "Invalid number" + + super().__init__(line, col, message=message) + + +class InvalidDateTimeError(ParseError): + """ + A datetime field was improperly specified. + """ + + def __init__(self, line: int, col: int) -> None: + message = "Invalid datetime" + + super().__init__(line, col, message=message) + + +class InvalidDateError(ParseError): + """ + A date field was improperly specified. + """ + + def __init__(self, line: int, col: int) -> None: + message = "Invalid date" + + super().__init__(line, col, message=message) + + +class InvalidTimeError(ParseError): + """ + A date field was improperly specified. + """ + + def __init__(self, line: int, col: int) -> None: + message = "Invalid time" + + super().__init__(line, col, message=message) + + +class InvalidNumberOrDateError(ParseError): + """ + A numeric or date field was improperly specified. + """ + + def __init__(self, line: int, col: int) -> None: + message = "Invalid number or date format" + + super().__init__(line, col, message=message) + + +class InvalidUnicodeValueError(ParseError): + """ + A unicode code was improperly specified. + """ + + def __init__(self, line: int, col: int) -> None: + message = "Invalid unicode value" + + super().__init__(line, col, message=message) + + +class UnexpectedCharError(ParseError): + """ + An unexpected character was found during parsing. + """ + + def __init__(self, line: int, col: int, char: str) -> None: + message = f"Unexpected character: {char!r}" + + super().__init__(line, col, message=message) + + +class EmptyKeyError(ParseError): + """ + An empty key was found during parsing. + """ + + def __init__(self, line: int, col: int) -> None: + message = "Empty key" + + super().__init__(line, col, message=message) + + +class EmptyTableNameError(ParseError): + """ + An empty table name was found during parsing. + """ + + def __init__(self, line: int, col: int) -> None: + message = "Empty table name" + + super().__init__(line, col, message=message) + + +class InvalidCharInStringError(ParseError): + """ + The string being parsed contains an invalid character. + """ + + def __init__(self, line: int, col: int, char: str) -> None: + message = f"Invalid character {char!r} in string" + + super().__init__(line, col, message=message) + + +class UnexpectedEofError(ParseError): + """ + The TOML being parsed ended before the end of a statement. + """ + + def __init__(self, line: int, col: int) -> None: + message = "Unexpected end of file" + + super().__init__(line, col, message=message) + + +class InternalParserError(ParseError): + """ + An error that indicates a bug in the parser. + """ + + def __init__(self, line: int, col: int, message: str | None = None) -> None: + msg = "Internal parser error" + if message: + msg += f" ({message})" + + super().__init__(line, col, message=msg) + + +class NonExistentKey(KeyError, TOMLKitError): + """ + A non-existent key was used. + """ + + def __init__(self, key): + message = f'Key "{key}" does not exist.' + + super().__init__(message) + + +class KeyAlreadyPresent(TOMLKitError): + """ + An already present key was used. + """ + + def __init__(self, key): + key = getattr(key, "key", key) + message = f'Key "{key}" already exists.' + + super().__init__(message) + + +class InvalidControlChar(ParseError): + def __init__(self, line: int, col: int, char: int, type: str) -> None: + display_code = "\\u00" + + if char < 16: + display_code += "0" + + display_code += hex(char)[2:] + + message = ( + "Control characters (codes less than 0x1f and 0x7f)" + f" are not allowed in {type}, " + f"use {display_code} instead" + ) + + super().__init__(line, col, message=message) + + +class InvalidStringError(ValueError, TOMLKitError): + def __init__(self, value: str, invalid_sequences: Collection[str], delimiter: str): + repr_ = repr(value)[1:-1] + super().__init__( + f"Invalid string: {delimiter}{repr_}{delimiter}. " + f"The character sequences {invalid_sequences} are invalid." + ) + + +class ConvertError(TypeError, ValueError, TOMLKitError): + """Raised when item() fails to convert a value. + It should be a TypeError, but due to historical reasons + it needs to subclass ValueError as well. + """ diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/lib/python3.13/site-packages/tomlkit/items.py b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/lib/python3.13/site-packages/tomlkit/items.py new file mode 100644 index 0000000000000000000000000000000000000000..456dc83102fef330cecf67166de413901d4ebb3d --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/lib/python3.13/site-packages/tomlkit/items.py @@ -0,0 +1,2013 @@ +from __future__ import annotations + +import abc +import copy +import dataclasses +import math +import re +import string +import sys + +from datetime import date +from datetime import datetime +from datetime import time +from datetime import tzinfo +from enum import Enum +from typing import TYPE_CHECKING +from typing import Any +from typing import Callable +from typing import Collection +from typing import Iterable +from typing import Iterator +from typing import Sequence +from typing import TypeVar +from typing import cast +from typing import overload + +from tomlkit._compat import PY38 +from tomlkit._compat import decode +from tomlkit._types import _CustomDict +from tomlkit._types import _CustomFloat +from tomlkit._types import _CustomInt +from tomlkit._types import _CustomList +from tomlkit._types import wrap_method +from tomlkit._utils import CONTROL_CHARS +from tomlkit._utils import escape_string +from tomlkit.exceptions import ConvertError +from tomlkit.exceptions import InvalidStringError + + +if TYPE_CHECKING: + from tomlkit import container + + +ItemT = TypeVar("ItemT", bound="Item") +Encoder = Callable[[Any], "Item"] +CUSTOM_ENCODERS: list[Encoder] = [] +AT = TypeVar("AT", bound="AbstractTable") + + +@overload +def item(value: bool, _parent: Item | None = ..., _sort_keys: bool = ...) -> Bool: ... + + +@overload +def item(value: int, _parent: Item | None = ..., _sort_keys: bool = ...) -> Integer: ... + + +@overload +def item(value: float, _parent: Item | None = ..., _sort_keys: bool = ...) -> Float: ... + + +@overload +def item(value: str, _parent: Item | None = ..., _sort_keys: bool = ...) -> String: ... + + +@overload +def item( + value: datetime, _parent: Item | None = ..., _sort_keys: bool = ... +) -> DateTime: ... + + +@overload +def item(value: date, _parent: Item | None = ..., _sort_keys: bool = ...) -> Date: ... + + +@overload +def item(value: time, _parent: Item | None = ..., _sort_keys: bool = ...) -> Time: ... + + +@overload +def item( + value: Sequence[dict], _parent: Item | None = ..., _sort_keys: bool = ... +) -> AoT: ... + + +@overload +def item( + value: Sequence, _parent: Item | None = ..., _sort_keys: bool = ... +) -> Array: ... + + +@overload +def item(value: dict, _parent: Array = ..., _sort_keys: bool = ...) -> InlineTable: ... + + +@overload +def item(value: dict, _parent: Item | None = ..., _sort_keys: bool = ...) -> Table: ... + + +@overload +def item(value: ItemT, _parent: Item | None = ..., _sort_keys: bool = ...) -> ItemT: ... + + +def item(value: Any, _parent: Item | None = None, _sort_keys: bool = False) -> Item: + """Create a TOML item from a Python object. + + :Example: + + >>> item(42) + 42 + >>> item([1, 2, 3]) + [1, 2, 3] + >>> item({'a': 1, 'b': 2}) + a = 1 + b = 2 + """ + + from tomlkit.container import Container + + if isinstance(value, Item): + return value + + if isinstance(value, bool): + return Bool(value, Trivia()) + elif isinstance(value, int): + return Integer(value, Trivia(), str(value)) + elif isinstance(value, float): + return Float(value, Trivia(), str(value)) + elif isinstance(value, dict): + table_constructor = ( + InlineTable if isinstance(_parent, (Array, InlineTable)) else Table + ) + val = table_constructor(Container(), Trivia(), False) + for k, v in sorted( + value.items(), + key=lambda i: (isinstance(i[1], dict), i[0]) if _sort_keys else 1, + ): + val[k] = item(v, _parent=val, _sort_keys=_sort_keys) + + return val + elif isinstance(value, (list, tuple)): + if ( + value + and all(isinstance(v, dict) for v in value) + and (_parent is None or isinstance(_parent, Table)) + ): + a = AoT([]) + table_constructor = Table + else: + a = Array([], Trivia()) + table_constructor = InlineTable + + for v in value: + if isinstance(v, dict): + table = table_constructor(Container(), Trivia(), True) + + for k, _v in sorted( + v.items(), + key=lambda i: (isinstance(i[1], dict), i[0] if _sort_keys else 1), + ): + i = item(_v, _parent=table, _sort_keys=_sort_keys) + if isinstance(table, InlineTable): + i.trivia.trail = "" + + table[k] = i + + v = table + + a.append(v) + + return a + elif isinstance(value, str): + return String.from_raw(value) + elif isinstance(value, datetime): + return DateTime( + value.year, + value.month, + value.day, + value.hour, + value.minute, + value.second, + value.microsecond, + value.tzinfo, + Trivia(), + value.isoformat().replace("+00:00", "Z"), + ) + elif isinstance(value, date): + return Date(value.year, value.month, value.day, Trivia(), value.isoformat()) + elif isinstance(value, time): + return Time( + value.hour, + value.minute, + value.second, + value.microsecond, + value.tzinfo, + Trivia(), + value.isoformat(), + ) + else: + for encoder in CUSTOM_ENCODERS: + try: + rv = encoder(value) + except ConvertError: + pass + else: + if not isinstance(rv, Item): + raise ConvertError( + f"Custom encoder is expected to return an instance of Item, got {type(rv)}" + ) + return rv + + raise ConvertError(f"Unable to convert an object of {type(value)} to a TOML item") + + +class StringType(Enum): + # Single Line Basic + SLB = '"' + # Multi Line Basic + MLB = '"""' + # Single Line Literal + SLL = "'" + # Multi Line Literal + MLL = "'''" + + @classmethod + def select(cls, literal=False, multiline=False) -> StringType: + return { + (False, False): cls.SLB, + (False, True): cls.MLB, + (True, False): cls.SLL, + (True, True): cls.MLL, + }[(literal, multiline)] + + @property + def escaped_sequences(self) -> Collection[str]: + # https://toml.io/en/v1.0.0#string + escaped_in_basic = CONTROL_CHARS | {"\\"} + allowed_in_multiline = {"\n", "\r"} + return { + StringType.SLB: escaped_in_basic | {'"'}, + StringType.MLB: (escaped_in_basic | {'"""'}) - allowed_in_multiline, + StringType.SLL: (), + StringType.MLL: (), + }[self] + + @property + def invalid_sequences(self) -> Collection[str]: + # https://toml.io/en/v1.0.0#string + forbidden_in_literal = CONTROL_CHARS - {"\t"} + allowed_in_multiline = {"\n", "\r"} + return { + StringType.SLB: (), + StringType.MLB: (), + StringType.SLL: forbidden_in_literal | {"'"}, + StringType.MLL: (forbidden_in_literal | {"'''"}) - allowed_in_multiline, + }[self] + + @property + def unit(self) -> str: + return self.value[0] + + def is_basic(self) -> bool: + return self in {StringType.SLB, StringType.MLB} + + def is_literal(self) -> bool: + return self in {StringType.SLL, StringType.MLL} + + def is_singleline(self) -> bool: + return self in {StringType.SLB, StringType.SLL} + + def is_multiline(self) -> bool: + return self in {StringType.MLB, StringType.MLL} + + def toggle(self) -> StringType: + return { + StringType.SLB: StringType.MLB, + StringType.MLB: StringType.SLB, + StringType.SLL: StringType.MLL, + StringType.MLL: StringType.SLL, + }[self] + + +class BoolType(Enum): + TRUE = "true" + FALSE = "false" + + def __bool__(self): + return {BoolType.TRUE: True, BoolType.FALSE: False}[self] + + def __iter__(self): + return iter(self.value) + + def __len__(self): + return len(self.value) + + +@dataclasses.dataclass +class Trivia: + """ + Trivia information (aka metadata). + """ + + # Whitespace before a value. + indent: str = "" + # Whitespace after a value, but before a comment. + comment_ws: str = "" + # Comment, starting with # character, or empty string if no comment. + comment: str = "" + # Trailing newline. + trail: str = "\n" + + def copy(self) -> Trivia: + return dataclasses.replace(self) + + +class KeyType(Enum): + """ + The type of a Key. + + Keys can be bare (unquoted), or quoted using basic ("), or literal (') + quotes following the same escaping rules as single-line StringType. + """ + + Bare = "" + Basic = '"' + Literal = "'" + + +class Key(abc.ABC): + """Base class for a key""" + + sep: str + _original: str + _keys: list[SingleKey] + _dotted: bool + key: str + + @abc.abstractmethod + def __hash__(self) -> int: + pass + + @abc.abstractmethod + def __eq__(self, __o: object) -> bool: + pass + + def is_dotted(self) -> bool: + """If the key is followed by other keys""" + return self._dotted + + def __iter__(self) -> Iterator[SingleKey]: + return iter(self._keys) + + def concat(self, other: Key) -> DottedKey: + """Concatenate keys into a dotted key""" + keys = self._keys + other._keys + return DottedKey(keys, sep=self.sep) + + def is_multi(self) -> bool: + """Check if the key contains multiple keys""" + return len(self._keys) > 1 + + def as_string(self) -> str: + """The TOML representation""" + return self._original + + def __str__(self) -> str: + return self.as_string() + + def __repr__(self) -> str: + return f"" + + +class SingleKey(Key): + """A single key""" + + def __init__( + self, + k: str, + t: KeyType | None = None, + sep: str | None = None, + original: str | None = None, + ) -> None: + if not isinstance(k, str): + raise TypeError("Keys must be strings") + + if t is None: + if not k or any( + c not in string.ascii_letters + string.digits + "-" + "_" for c in k + ): + t = KeyType.Basic + else: + t = KeyType.Bare + + self.t = t + if sep is None: + sep = " = " + + self.sep = sep + self.key = k + if original is None: + key_str = escape_string(k) if t == KeyType.Basic else k + original = f"{t.value}{key_str}{t.value}" + + self._original = original + self._keys = [self] + self._dotted = False + + @property + def delimiter(self) -> str: + """The delimiter: double quote/single quote/none""" + return self.t.value + + def is_bare(self) -> bool: + """Check if the key is bare""" + return self.t == KeyType.Bare + + def __hash__(self) -> int: + return hash(self.key) + + def __eq__(self, other: Any) -> bool: + if isinstance(other, Key): + return isinstance(other, SingleKey) and self.key == other.key + + return self.key == other + + +class DottedKey(Key): + def __init__( + self, + keys: Iterable[SingleKey], + sep: str | None = None, + original: str | None = None, + ) -> None: + self._keys = list(keys) + if original is None: + original = ".".join(k.as_string() for k in self._keys) + + self.sep = " = " if sep is None else sep + self._original = original + self._dotted = False + self.key = ".".join(k.key for k in self._keys) + + def __hash__(self) -> int: + return hash(tuple(self._keys)) + + def __eq__(self, __o: object) -> bool: + return isinstance(__o, DottedKey) and self._keys == __o._keys + + +class Item: + """ + An item within a TOML document. + """ + + def __init__(self, trivia: Trivia) -> None: + self._trivia = trivia + + @property + def trivia(self) -> Trivia: + """The trivia element associated with this item""" + return self._trivia + + @property + def discriminant(self) -> int: + raise NotImplementedError() + + def as_string(self) -> str: + """The TOML representation""" + raise NotImplementedError() + + @property + def value(self) -> Any: + return self + + def unwrap(self) -> Any: + """Returns as pure python object (ppo)""" + raise NotImplementedError() + + # Helpers + + def comment(self, comment: str) -> Item: + """Attach a comment to this item""" + if not comment.strip().startswith("#"): + comment = "# " + comment + + self._trivia.comment_ws = " " + self._trivia.comment = comment + + return self + + def indent(self, indent: int) -> Item: + """Indent this item with given number of spaces""" + if self._trivia.indent.startswith("\n"): + self._trivia.indent = "\n" + " " * indent + else: + self._trivia.indent = " " * indent + + return self + + def is_boolean(self) -> bool: + return isinstance(self, Bool) + + def is_table(self) -> bool: + return isinstance(self, Table) + + def is_inline_table(self) -> bool: + return isinstance(self, InlineTable) + + def is_aot(self) -> bool: + return isinstance(self, AoT) + + def _getstate(self, protocol=3): + return (self._trivia,) + + def __reduce__(self): + return self.__reduce_ex__(2) + + def __reduce_ex__(self, protocol): + return self.__class__, self._getstate(protocol) + + +class Whitespace(Item): + """ + A whitespace literal. + """ + + def __init__(self, s: str, fixed: bool = False) -> None: + self._s = s + self._fixed = fixed + + @property + def s(self) -> str: + return self._s + + @property + def value(self) -> str: + """The wrapped string of the whitespace""" + return self._s + + @property + def trivia(self) -> Trivia: + raise RuntimeError("Called trivia on a Whitespace variant.") + + @property + def discriminant(self) -> int: + return 0 + + def is_fixed(self) -> bool: + """If the whitespace is fixed, it can't be merged or discarded from the output.""" + return self._fixed + + def as_string(self) -> str: + return self._s + + def __repr__(self) -> str: + return f"<{self.__class__.__name__} {self._s!r}>" + + def _getstate(self, protocol=3): + return self._s, self._fixed + + +class Comment(Item): + """ + A comment literal. + """ + + @property + def discriminant(self) -> int: + return 1 + + def as_string(self) -> str: + return ( + f"{self._trivia.indent}{decode(self._trivia.comment)}{self._trivia.trail}" + ) + + def __str__(self) -> str: + return f"{self._trivia.indent}{decode(self._trivia.comment)}" + + +class Integer(Item, _CustomInt): + """ + An integer literal. + """ + + def __new__(cls, value: int, trivia: Trivia, raw: str) -> Integer: + return int.__new__(cls, value) + + def __init__(self, value: int, trivia: Trivia, raw: str) -> None: + super().__init__(trivia) + self._original = value + self._raw = raw + self._sign = False + + if re.match(r"^[+\-]\d+$", raw): + self._sign = True + + def unwrap(self) -> int: + return self._original + + __int__ = unwrap + + def __hash__(self) -> int: + return hash(self.unwrap()) + + @property + def discriminant(self) -> int: + return 2 + + @property + def value(self) -> int: + """The wrapped integer value""" + return self + + def as_string(self) -> str: + return self._raw + + def _new(self, result): + raw = str(result) + if self._sign and result >= 0: + raw = f"+{raw}" + + return Integer(result, self._trivia, raw) + + def _getstate(self, protocol=3): + return int(self), self._trivia, self._raw + + # int methods + __abs__ = wrap_method(int.__abs__) + __add__ = wrap_method(int.__add__) + __and__ = wrap_method(int.__and__) + __ceil__ = wrap_method(int.__ceil__) + __eq__ = int.__eq__ + __floor__ = wrap_method(int.__floor__) + __floordiv__ = wrap_method(int.__floordiv__) + __invert__ = wrap_method(int.__invert__) + __le__ = int.__le__ + __lshift__ = wrap_method(int.__lshift__) + __lt__ = int.__lt__ + __mod__ = wrap_method(int.__mod__) + __mul__ = wrap_method(int.__mul__) + __neg__ = wrap_method(int.__neg__) + __or__ = wrap_method(int.__or__) + __pos__ = wrap_method(int.__pos__) + __pow__ = wrap_method(int.__pow__) + __radd__ = wrap_method(int.__radd__) + __rand__ = wrap_method(int.__rand__) + __rfloordiv__ = wrap_method(int.__rfloordiv__) + __rlshift__ = wrap_method(int.__rlshift__) + __rmod__ = wrap_method(int.__rmod__) + __rmul__ = wrap_method(int.__rmul__) + __ror__ = wrap_method(int.__ror__) + __round__ = wrap_method(int.__round__) + __rpow__ = wrap_method(int.__rpow__) + __rrshift__ = wrap_method(int.__rrshift__) + __rshift__ = wrap_method(int.__rshift__) + __rxor__ = wrap_method(int.__rxor__) + __trunc__ = wrap_method(int.__trunc__) + __xor__ = wrap_method(int.__xor__) + + def __rtruediv__(self, other): + result = int.__rtruediv__(self, other) + if result is NotImplemented: + return result + return Float._new(self, result) + + def __truediv__(self, other): + result = int.__truediv__(self, other) + if result is NotImplemented: + return result + return Float._new(self, result) + + +class Float(Item, _CustomFloat): + """ + A float literal. + """ + + def __new__(cls, value: float, trivia: Trivia, raw: str) -> Float: + return float.__new__(cls, value) + + def __init__(self, value: float, trivia: Trivia, raw: str) -> None: + super().__init__(trivia) + self._original = value + self._raw = raw + self._sign = False + + if re.match(r"^[+\-].+$", raw): + self._sign = True + + def unwrap(self) -> float: + return self._original + + __float__ = unwrap + + def __hash__(self) -> int: + return hash(self.unwrap()) + + @property + def discriminant(self) -> int: + return 3 + + @property + def value(self) -> float: + """The wrapped float value""" + return self + + def as_string(self) -> str: + return self._raw + + def _new(self, result): + raw = str(result) + + if self._sign and result >= 0: + raw = f"+{raw}" + + return Float(result, self._trivia, raw) + + def _getstate(self, protocol=3): + return float(self), self._trivia, self._raw + + # float methods + __abs__ = wrap_method(float.__abs__) + __add__ = wrap_method(float.__add__) + __eq__ = float.__eq__ + __floordiv__ = wrap_method(float.__floordiv__) + __le__ = float.__le__ + __lt__ = float.__lt__ + __mod__ = wrap_method(float.__mod__) + __mul__ = wrap_method(float.__mul__) + __neg__ = wrap_method(float.__neg__) + __pos__ = wrap_method(float.__pos__) + __pow__ = wrap_method(float.__pow__) + __radd__ = wrap_method(float.__radd__) + __rfloordiv__ = wrap_method(float.__rfloordiv__) + __rmod__ = wrap_method(float.__rmod__) + __rmul__ = wrap_method(float.__rmul__) + __round__ = wrap_method(float.__round__) + __rpow__ = wrap_method(float.__rpow__) + __rtruediv__ = wrap_method(float.__rtruediv__) + __truediv__ = wrap_method(float.__truediv__) + __trunc__ = float.__trunc__ + + if sys.version_info >= (3, 9): + __ceil__ = float.__ceil__ + __floor__ = float.__floor__ + else: + __ceil__ = math.ceil + __floor__ = math.floor + + +class Bool(Item): + """ + A boolean literal. + """ + + def __init__(self, t: int, trivia: Trivia) -> None: + super().__init__(trivia) + + self._value = bool(t) + + def unwrap(self) -> bool: + return bool(self) + + @property + def discriminant(self) -> int: + return 4 + + @property + def value(self) -> bool: + """The wrapped boolean value""" + return self._value + + def as_string(self) -> str: + return str(self._value).lower() + + def _getstate(self, protocol=3): + return self._value, self._trivia + + def __bool__(self): + return self._value + + __nonzero__ = __bool__ + + def __eq__(self, other): + if not isinstance(other, bool): + return NotImplemented + + return other == self._value + + def __hash__(self): + return hash(self._value) + + def __repr__(self): + return repr(self._value) + + +class DateTime(Item, datetime): + """ + A datetime literal. + """ + + def __new__( + cls, + year: int, + month: int, + day: int, + hour: int, + minute: int, + second: int, + microsecond: int, + tzinfo: tzinfo | None, + *_: Any, + **kwargs: Any, + ) -> datetime: + return datetime.__new__( + cls, + year, + month, + day, + hour, + minute, + second, + microsecond, + tzinfo=tzinfo, + **kwargs, + ) + + def __init__( + self, + year: int, + month: int, + day: int, + hour: int, + minute: int, + second: int, + microsecond: int, + tzinfo: tzinfo | None, + trivia: Trivia | None = None, + raw: str | None = None, + **kwargs: Any, + ) -> None: + super().__init__(trivia or Trivia()) + + self._raw = raw or self.isoformat() + + def unwrap(self) -> datetime: + ( + year, + month, + day, + hour, + minute, + second, + microsecond, + tzinfo, + _, + _, + ) = self._getstate() + return datetime(year, month, day, hour, minute, second, microsecond, tzinfo) + + @property + def discriminant(self) -> int: + return 5 + + @property + def value(self) -> datetime: + return self + + def as_string(self) -> str: + return self._raw + + def __add__(self, other): + if PY38: + result = datetime( + self.year, + self.month, + self.day, + self.hour, + self.minute, + self.second, + self.microsecond, + self.tzinfo, + ).__add__(other) + else: + result = super().__add__(other) + + return self._new(result) + + def __sub__(self, other): + if PY38: + result = datetime( + self.year, + self.month, + self.day, + self.hour, + self.minute, + self.second, + self.microsecond, + self.tzinfo, + ).__sub__(other) + else: + result = super().__sub__(other) + + if isinstance(result, datetime): + result = self._new(result) + + return result + + def replace(self, *args: Any, **kwargs: Any) -> datetime: + return self._new(super().replace(*args, **kwargs)) + + def astimezone(self, tz: tzinfo) -> datetime: + result = super().astimezone(tz) + if PY38: + return result + return self._new(result) + + def _new(self, result) -> DateTime: + raw = result.isoformat() + + return DateTime( + result.year, + result.month, + result.day, + result.hour, + result.minute, + result.second, + result.microsecond, + result.tzinfo, + self._trivia, + raw, + ) + + def _getstate(self, protocol=3): + return ( + self.year, + self.month, + self.day, + self.hour, + self.minute, + self.second, + self.microsecond, + self.tzinfo, + self._trivia, + self._raw, + ) + + +class Date(Item, date): + """ + A date literal. + """ + + def __new__(cls, year: int, month: int, day: int, *_: Any) -> date: + return date.__new__(cls, year, month, day) + + def __init__( + self, + year: int, + month: int, + day: int, + trivia: Trivia | None = None, + raw: str = "", + ) -> None: + super().__init__(trivia or Trivia()) + + self._raw = raw + + def unwrap(self) -> date: + (year, month, day, _, _) = self._getstate() + return date(year, month, day) + + @property + def discriminant(self) -> int: + return 6 + + @property + def value(self) -> date: + return self + + def as_string(self) -> str: + return self._raw + + def __add__(self, other): + if PY38: + result = date(self.year, self.month, self.day).__add__(other) + else: + result = super().__add__(other) + + return self._new(result) + + def __sub__(self, other): + if PY38: + result = date(self.year, self.month, self.day).__sub__(other) + else: + result = super().__sub__(other) + + if isinstance(result, date): + result = self._new(result) + + return result + + def replace(self, *args: Any, **kwargs: Any) -> date: + return self._new(super().replace(*args, **kwargs)) + + def _new(self, result): + raw = result.isoformat() + + return Date(result.year, result.month, result.day, self._trivia, raw) + + def _getstate(self, protocol=3): + return (self.year, self.month, self.day, self._trivia, self._raw) + + +class Time(Item, time): + """ + A time literal. + """ + + def __new__( + cls, + hour: int, + minute: int, + second: int, + microsecond: int, + tzinfo: tzinfo | None, + *_: Any, + ) -> time: + return time.__new__(cls, hour, minute, second, microsecond, tzinfo) + + def __init__( + self, + hour: int, + minute: int, + second: int, + microsecond: int, + tzinfo: tzinfo | None, + trivia: Trivia | None = None, + raw: str = "", + ) -> None: + super().__init__(trivia or Trivia()) + + self._raw = raw + + def unwrap(self) -> time: + (hour, minute, second, microsecond, tzinfo, _, _) = self._getstate() + return time(hour, minute, second, microsecond, tzinfo) + + @property + def discriminant(self) -> int: + return 7 + + @property + def value(self) -> time: + return self + + def as_string(self) -> str: + return self._raw + + def replace(self, *args: Any, **kwargs: Any) -> time: + return self._new(super().replace(*args, **kwargs)) + + def _new(self, result): + raw = result.isoformat() + + return Time( + result.hour, + result.minute, + result.second, + result.microsecond, + result.tzinfo, + self._trivia, + raw, + ) + + def _getstate(self, protocol: int = 3) -> tuple: + return ( + self.hour, + self.minute, + self.second, + self.microsecond, + self.tzinfo, + self._trivia, + self._raw, + ) + + +class _ArrayItemGroup: + __slots__ = ("comma", "comment", "indent", "value") + + def __init__( + self, + value: Item | None = None, + indent: Whitespace | None = None, + comma: Whitespace | None = None, + comment: Comment | None = None, + ) -> None: + self.value = value + self.indent = indent + self.comma = comma + self.comment = comment + + def __iter__(self) -> Iterator[Item]: + return filter( + lambda x: x is not None, (self.indent, self.value, self.comma, self.comment) + ) + + def __repr__(self) -> str: + return repr(tuple(self)) + + def is_whitespace(self) -> bool: + return self.value is None and self.comment is None + + def __bool__(self) -> bool: + try: + next(iter(self)) + except StopIteration: + return False + return True + + +class Array(Item, _CustomList): + """ + An array literal + """ + + def __init__( + self, value: list[Item], trivia: Trivia, multiline: bool = False + ) -> None: + super().__init__(trivia) + list.__init__( + self, + [v for v in value if not isinstance(v, (Whitespace, Comment, Null))], + ) + self._index_map: dict[int, int] = {} + self._value = self._group_values(value) + self._multiline = multiline + self._reindex() + + def _group_values(self, value: list[Item]) -> list[_ArrayItemGroup]: + """Group the values into (indent, value, comma, comment) tuples""" + groups = [] + this_group = _ArrayItemGroup() + start_new_group = False + for item in value: + if isinstance(item, Whitespace): + if "," not in item.s or start_new_group: + groups.append(this_group) + this_group = _ArrayItemGroup(indent=item) + start_new_group = False + else: + if this_group.value is None: + # when comma is met and no value is provided, add a dummy Null + this_group.value = Null() + this_group.comma = item + elif isinstance(item, Comment): + if this_group.value is None: + this_group.value = Null() + this_group.comment = item + # Comments are the last item in a group. + start_new_group = True + elif this_group.value is None: + this_group.value = item + else: + groups.append(this_group) + this_group = _ArrayItemGroup(value=item) + groups.append(this_group) + return [group for group in groups if group] + + def unwrap(self) -> list[Any]: + unwrapped = [] + for v in self: + if hasattr(v, "unwrap"): + unwrapped.append(v.unwrap()) + else: + unwrapped.append(v) + return unwrapped + + @property + def discriminant(self) -> int: + return 8 + + @property + def value(self) -> list: + return self + + def _iter_items(self) -> Iterator[Item]: + for v in self._value: + yield from v + + def multiline(self, multiline: bool) -> Array: + """Change the array to display in multiline or not. + + :Example: + + >>> a = item([1, 2, 3]) + >>> print(a.as_string()) + [1, 2, 3] + >>> print(a.multiline(True).as_string()) + [ + 1, + 2, + 3, + ] + """ + self._multiline = multiline + + return self + + def as_string(self) -> str: + if not self._multiline or not self._value: + return f"[{''.join(v.as_string() for v in self._iter_items())}]" + + s = "[\n" + s += "".join( + self.trivia.indent + + " " * 4 + + v.value.as_string() + + ("," if not isinstance(v.value, Null) else "") + + (v.comment.as_string() if v.comment is not None else "") + + "\n" + for v in self._value + if v.value is not None + ) + s += self.trivia.indent + "]" + + return s + + def _reindex(self) -> None: + self._index_map.clear() + index = 0 + for i, v in enumerate(self._value): + if v.value is None or isinstance(v.value, Null): + continue + self._index_map[index] = i + index += 1 + + def add_line( + self, + *items: Any, + indent: str = " ", + comment: str | None = None, + add_comma: bool = True, + newline: bool = True, + ) -> None: + """Add multiple items in a line to control the format precisely. + When add_comma is True, only accept actual values and + ", " will be added between values automatically. + + :Example: + + >>> a = array() + >>> a.add_line(1, 2, 3) + >>> a.add_line(4, 5, 6) + >>> a.add_line(indent="") + >>> print(a.as_string()) + [ + 1, 2, 3, + 4, 5, 6, + ] + """ + new_values: list[Item] = [] + first_indent = f"\n{indent}" if newline else indent + if first_indent: + new_values.append(Whitespace(first_indent)) + whitespace = "" + data_values = [] + for i, el in enumerate(items): + it = item(el, _parent=self) + if isinstance(it, Comment) or (add_comma and isinstance(el, Whitespace)): + raise ValueError(f"item type {type(it)} is not allowed in add_line") + if not isinstance(it, Whitespace): + if whitespace: + new_values.append(Whitespace(whitespace)) + whitespace = "" + new_values.append(it) + data_values.append(it.value) + if add_comma: + new_values.append(Whitespace(",")) + if i != len(items) - 1: + new_values.append(Whitespace(" ")) + elif "," not in it.s: + whitespace += it.s + else: + new_values.append(it) + if whitespace: + new_values.append(Whitespace(whitespace)) + if comment: + indent = " " if items else "" + new_values.append( + Comment(Trivia(indent=indent, comment=f"# {comment}", trail="")) + ) + list.extend(self, data_values) + if len(self._value) > 0: + last_item = self._value[-1] + last_value_item = next( + ( + v + for v in self._value[::-1] + if v.value is not None and not isinstance(v.value, Null) + ), + None, + ) + if last_value_item is not None: + last_value_item.comma = Whitespace(",") + if last_item.is_whitespace(): + self._value[-1:-1] = self._group_values(new_values) + else: + self._value.extend(self._group_values(new_values)) + else: + self._value.extend(self._group_values(new_values)) + self._reindex() + + def clear(self) -> None: + """Clear the array.""" + list.clear(self) + self._index_map.clear() + self._value.clear() + + def __len__(self) -> int: + return list.__len__(self) + + def item(self, index: int) -> Item: + rv = list.__getitem__(self, index) + return cast(Item, rv) + + def __getitem__(self, key: int | slice) -> Any: + rv = list.__getitem__(self, key) + if isinstance(rv, Bool): + return rv.value + return rv + + def __setitem__(self, key: int | slice, value: Any) -> Any: + it = item(value, _parent=self) + list.__setitem__(self, key, it) + if isinstance(key, slice): + raise ValueError("slice assignment is not supported") + if key < 0: + key += len(self) + self._value[self._index_map[key]].value = it + + def insert(self, pos: int, value: Any) -> None: + it = item(value, _parent=self) + length = len(self) + if not isinstance(it, (Comment, Whitespace)): + list.insert(self, pos, it) + if pos < 0: + pos += length + if pos < 0: + pos = 0 + + idx = 0 # insert position of the self._value list + default_indent = " " + if pos < length: + try: + idx = self._index_map[pos] + except KeyError as e: + raise IndexError("list index out of range") from e + else: + idx = len(self._value) + if idx >= 1 and self._value[idx - 1].is_whitespace(): + # The last item is a pure whitespace(\n ), insert before it + idx -= 1 + if ( + self._value[idx].indent is not None + and "\n" in self._value[idx].indent.s + ): + default_indent = "\n " + indent: Item | None = None + comma: Item | None = Whitespace(",") if pos < length else None + if idx < len(self._value) and not self._value[idx].is_whitespace(): + # Prefer to copy the indentation from the item after + indent = self._value[idx].indent + if idx > 0: + last_item = self._value[idx - 1] + if indent is None: + indent = last_item.indent + if not isinstance(last_item.value, Null) and "\n" in default_indent: + # Copy the comma from the last item if 1) it contains a value and + # 2) the array is multiline + comma = last_item.comma + if last_item.comma is None and not isinstance(last_item.value, Null): + # Add comma to the last item to separate it from the following items. + last_item.comma = Whitespace(",") + if indent is None and (idx > 0 or "\n" in default_indent): + # apply default indent if it isn't the first item or the array is multiline. + indent = Whitespace(default_indent) + new_item = _ArrayItemGroup(value=it, indent=indent, comma=comma) + self._value.insert(idx, new_item) + self._reindex() + + def __delitem__(self, key: int | slice): + length = len(self) + list.__delitem__(self, key) + + if isinstance(key, slice): + indices_to_remove = list( + range(key.start or 0, key.stop or length, key.step or 1) + ) + else: + indices_to_remove = [length + key if key < 0 else key] + for i in sorted(indices_to_remove, reverse=True): + try: + idx = self._index_map[i] + except KeyError as e: + if not isinstance(key, slice): + raise IndexError("list index out of range") from e + else: + group_rm = self._value[idx] + del self._value[idx] + if ( + idx == 0 + and len(self._value) > 0 + and self._value[idx].indent + and "\n" not in self._value[idx].indent.s + ): + # Remove the indentation of the first item if not newline + self._value[idx].indent = None + comma_in_indent = ( + group_rm.indent is not None and "," in group_rm.indent.s + ) + comma_in_comma = group_rm.comma is not None and "," in group_rm.comma.s + if comma_in_indent and comma_in_comma: + # Removed group had both commas. Add one to the next group. + group = self._value[idx] if len(self._value) > idx else None + if group is not None: + if group.indent is None: + group.indent = Whitespace(",") + elif "," not in group.indent.s: + # Insert the comma after the newline + try: + newline_index = group.indent.s.index("\n") + group.indent._s = ( + group.indent.s[: newline_index + 1] + + "," + + group.indent.s[newline_index + 1 :] + ) + except ValueError: + group.indent._s = "," + group.indent.s + elif not comma_in_indent and not comma_in_comma: + # Removed group had no commas. Remove the next comma found. + for j in range(idx, len(self._value)): + group = self._value[j] + if group.indent is not None and "," in group.indent.s: + group.indent._s = group.indent.s.replace(",", "", 1) + break + if group_rm.indent is not None and "\n" in group_rm.indent.s: + # Restore the removed group's newline onto the next group + # if the next group does not have a newline. + # i.e. the two were on the same line + group = self._value[idx] if len(self._value) > idx else None + if group is not None and ( + group.indent is None or "\n" not in group.indent.s + ): + group.indent = group_rm.indent + + if len(self._value) > 0: + v = self._value[-1] + if not v.is_whitespace(): + # remove the comma of the last item + v.comma = None + + self._reindex() + + def _getstate(self, protocol=3): + return list(self._iter_items()), self._trivia, self._multiline + + +class AbstractTable(Item, _CustomDict): + """Common behaviour of both :class:`Table` and :class:`InlineTable`""" + + def __init__(self, value: container.Container, trivia: Trivia): + Item.__init__(self, trivia) + + self._value = value + + for k, v in self._value.body: + if k is not None: + dict.__setitem__(self, k.key, v) + + def unwrap(self) -> dict[str, Any]: + unwrapped = {} + for k, v in self.items(): + if isinstance(k, Key): + k = k.key + if hasattr(v, "unwrap"): + v = v.unwrap() + unwrapped[k] = v + + return unwrapped + + @property + def value(self) -> container.Container: + return self._value + + @overload + def append(self: AT, key: None, value: Comment | Whitespace) -> AT: ... + + @overload + def append(self: AT, key: Key | str, value: Any) -> AT: ... + + def append(self, key, value): + raise NotImplementedError + + @overload + def add(self: AT, key: Comment | Whitespace) -> AT: ... + + @overload + def add(self: AT, key: Key | str, value: Any = ...) -> AT: ... + + def add(self, key, value=None): + if value is None: + if not isinstance(key, (Comment, Whitespace)): + msg = "Non comment/whitespace items must have an associated key" + raise ValueError(msg) + + key, value = None, key + + return self.append(key, value) + + def remove(self: AT, key: Key | str) -> AT: + self._value.remove(key) + + if isinstance(key, Key): + key = key.key + + if key is not None: + dict.__delitem__(self, key) + + return self + + def item(self, key: Key | str) -> Item: + return self._value.item(key) + + def setdefault(self, key: Key | str, default: Any) -> Any: + super().setdefault(key, default) + return self[key] + + def __str__(self): + return str(self.value) + + def copy(self: AT) -> AT: + return copy.copy(self) + + def __repr__(self) -> str: + return repr(self.value) + + def __iter__(self) -> Iterator[str]: + return iter(self._value) + + def __len__(self) -> int: + return len(self._value) + + def __delitem__(self, key: Key | str) -> None: + self.remove(key) + + def __getitem__(self, key: Key | str) -> Item: + return cast(Item, self._value[key]) + + def __setitem__(self, key: Key | str, value: Any) -> None: + if not isinstance(value, Item): + value = item(value, _parent=self) + + is_replace = key in self + self._value[key] = value + + if key is not None: + dict.__setitem__(self, key, value) + + if is_replace: + return + m = re.match("(?s)^[^ ]*([ ]+).*$", self._trivia.indent) + if not m: + return + + indent = m.group(1) + + if not isinstance(value, Whitespace): + m = re.match("(?s)^([^ ]*)(.*)$", value.trivia.indent) + if not m: + value.trivia.indent = indent + else: + value.trivia.indent = m.group(1) + indent + m.group(2) + + +class Table(AbstractTable): + """ + A table literal. + """ + + def __init__( + self, + value: container.Container, + trivia: Trivia, + is_aot_element: bool, + is_super_table: bool | None = None, + name: str | None = None, + display_name: str | None = None, + ) -> None: + super().__init__(value, trivia) + + self.name = name + self.display_name = display_name + self._is_aot_element = is_aot_element + self._is_super_table = is_super_table + + @property + def discriminant(self) -> int: + return 9 + + def __copy__(self) -> Table: + return type(self)( + self._value.copy(), + self._trivia.copy(), + self._is_aot_element, + self._is_super_table, + self.name, + self.display_name, + ) + + def append(self, key: Key | str | None, _item: Any) -> Table: + """ + Appends a (key, item) to the table. + """ + if not isinstance(_item, Item): + _item = item(_item, _parent=self) + + self._value.append(key, _item) + + if isinstance(key, Key): + key = next(iter(key)).key + _item = self._value[key] + + if key is not None: + dict.__setitem__(self, key, _item) + + m = re.match(r"(?s)^[^ ]*([ ]+).*$", self._trivia.indent) + if not m: + return self + + indent = m.group(1) + + if not isinstance(_item, Whitespace): + m = re.match("(?s)^([^ ]*)(.*)$", _item.trivia.indent) + if not m: + _item.trivia.indent = indent + else: + _item.trivia.indent = m.group(1) + indent + m.group(2) + + return self + + def raw_append(self, key: Key | str | None, _item: Any) -> Table: + """Similar to :meth:`append` but does not copy indentation.""" + if not isinstance(_item, Item): + _item = item(_item) + + self._value.append(key, _item, validate=False) + + if isinstance(key, Key): + key = next(iter(key)).key + _item = self._value[key] + + if key is not None: + dict.__setitem__(self, key, _item) + + return self + + def is_aot_element(self) -> bool: + """True if the table is the direct child of an AOT element.""" + return self._is_aot_element + + def is_super_table(self) -> bool: + """A super table is the intermediate parent of a nested table as in [a.b.c]. + If true, it won't appear in the TOML representation.""" + if self._is_super_table is not None: + return self._is_super_table + if not self: + return False + # If the table has children and all children are tables, then it is a super table. + for k, child in self.items(): + if not isinstance(k, Key): + k = SingleKey(k) + index = self.value._map[k] + if isinstance(index, tuple): + return False + real_key = self.value.body[index][0] + if ( + not isinstance(child, (Table, AoT)) + or real_key is None + or real_key.is_dotted() + ): + return False + return True + + def as_string(self) -> str: + return self._value.as_string() + + # Helpers + + def indent(self, indent: int) -> Table: + """Indent the table with given number of spaces.""" + super().indent(indent) + + m = re.match("(?s)^[^ ]*([ ]+).*$", self._trivia.indent) + if not m: + indent_str = "" + else: + indent_str = m.group(1) + + for _, item in self._value.body: + if not isinstance(item, Whitespace): + item.trivia.indent = indent_str + item.trivia.indent + + return self + + def invalidate_display_name(self): + """Call ``invalidate_display_name`` on the contained tables""" + self.display_name = None + + for child in self.values(): + if hasattr(child, "invalidate_display_name"): + child.invalidate_display_name() + + def _getstate(self, protocol: int = 3) -> tuple: + return ( + self._value, + self._trivia, + self._is_aot_element, + self._is_super_table, + self.name, + self.display_name, + ) + + +class InlineTable(AbstractTable): + """ + An inline table literal. + """ + + def __init__( + self, value: container.Container, trivia: Trivia, new: bool = False + ) -> None: + super().__init__(value, trivia) + + self._new = new + + @property + def discriminant(self) -> int: + return 10 + + def append(self, key: Key | str | None, _item: Any) -> InlineTable: + """ + Appends a (key, item) to the table. + """ + if not isinstance(_item, Item): + _item = item(_item, _parent=self) + + if not isinstance(_item, (Whitespace, Comment)): + if not _item.trivia.indent and len(self._value) > 0 and not self._new: + _item.trivia.indent = " " + if _item.trivia.comment: + _item.trivia.comment = "" + + self._value.append(key, _item) + + if isinstance(key, Key): + key = key.key + + if key is not None: + dict.__setitem__(self, key, _item) + + return self + + def as_string(self) -> str: + buf = "{" + last_item_idx = next( + ( + i + for i in range(len(self._value.body) - 1, -1, -1) + if self._value.body[i][0] is not None + ), + None, + ) + for i, (k, v) in enumerate(self._value.body): + if k is None: + if i == len(self._value.body) - 1: + if self._new: + buf = buf.rstrip(", ") + else: + buf = buf.rstrip(",") + + buf += v.as_string() + + continue + + v_trivia_trail = v.trivia.trail.replace("\n", "") + buf += ( + f"{v.trivia.indent}" + f"{k.as_string() + ('.' if k.is_dotted() else '')}" + f"{k.sep}" + f"{v.as_string()}" + f"{v.trivia.comment}" + f"{v_trivia_trail}" + ) + + if last_item_idx is not None and i < last_item_idx: + buf += "," + if self._new: + buf += " " + + buf += "}" + + return buf + + def __setitem__(self, key: Key | str, value: Any) -> None: + if hasattr(value, "trivia") and value.trivia.comment: + value.trivia.comment = "" + super().__setitem__(key, value) + + def __copy__(self) -> InlineTable: + return type(self)(self._value.copy(), self._trivia.copy(), self._new) + + def _getstate(self, protocol: int = 3) -> tuple: + return (self._value, self._trivia) + + +class String(str, Item): + """ + A string literal. + """ + + def __new__(cls, t, value, original, trivia): + return super().__new__(cls, value) + + def __init__(self, t: StringType, _: str, original: str, trivia: Trivia) -> None: + super().__init__(trivia) + + self._t = t + self._original = original + + def unwrap(self) -> str: + return str(self) + + @property + def discriminant(self) -> int: + return 11 + + @property + def value(self) -> str: + return self + + def as_string(self) -> str: + return f"{self._t.value}{decode(self._original)}{self._t.value}" + + def __add__(self: ItemT, other: str) -> ItemT: + if not isinstance(other, str): + return NotImplemented + result = super().__add__(other) + original = self._original + getattr(other, "_original", other) + + return self._new(result, original) + + def _new(self, result: str, original: str) -> String: + return String(self._t, result, original, self._trivia) + + def _getstate(self, protocol=3): + return self._t, str(self), self._original, self._trivia + + @classmethod + def from_raw(cls, value: str, type_=StringType.SLB, escape=True) -> String: + value = decode(value) + + invalid = type_.invalid_sequences + if any(c in value for c in invalid): + raise InvalidStringError(value, invalid, type_.value) + + escaped = type_.escaped_sequences + string_value = escape_string(value, escaped) if escape and escaped else value + + return cls(type_, decode(value), string_value, Trivia()) + + +class AoT(Item, _CustomList): + """ + An array of table literal + """ + + def __init__( + self, body: list[Table], name: str | None = None, parsed: bool = False + ) -> None: + self.name = name + self._body: list[Table] = [] + self._parsed = parsed + + super().__init__(Trivia(trail="")) + + for table in body: + self.append(table) + + def unwrap(self) -> list[dict[str, Any]]: + unwrapped = [] + for t in self._body: + if hasattr(t, "unwrap"): + unwrapped.append(t.unwrap()) + else: + unwrapped.append(t) + return unwrapped + + @property + def body(self) -> list[Table]: + return self._body + + @property + def discriminant(self) -> int: + return 12 + + @property + def value(self) -> list[dict[Any, Any]]: + return [v.value for v in self._body] + + def __len__(self) -> int: + return len(self._body) + + @overload + def __getitem__(self, key: slice) -> list[Table]: ... + + @overload + def __getitem__(self, key: int) -> Table: ... + + def __getitem__(self, key): + return self._body[key] + + def __setitem__(self, key: slice | int, value: Any) -> None: + self._body[key] = item(value, _parent=self) + + def __delitem__(self, key: slice | int) -> None: + del self._body[key] + list.__delitem__(self, key) + + def insert(self, index: int, value: dict) -> None: + value = item(value, _parent=self) + if not isinstance(value, Table): + raise ValueError(f"Unsupported insert value type: {type(value)}") + length = len(self) + if index < 0: + index += length + if index < 0: + index = 0 + elif index >= length: + index = length + m = re.match("(?s)^[^ ]*([ ]+).*$", self._trivia.indent) + if m: + indent = m.group(1) + + m = re.match("(?s)^([^ ]*)(.*)$", value.trivia.indent) + if not m: + value.trivia.indent = indent + else: + value.trivia.indent = m.group(1) + indent + m.group(2) + prev_table = self._body[index - 1] if 0 < index and length else None + next_table = self._body[index + 1] if index < length - 1 else None + if not self._parsed: + if prev_table and "\n" not in value.trivia.indent: + value.trivia.indent = "\n" + value.trivia.indent + if next_table and "\n" not in next_table.trivia.indent: + next_table.trivia.indent = "\n" + next_table.trivia.indent + self._body.insert(index, value) + list.insert(self, index, value) + + def invalidate_display_name(self): + """Call ``invalidate_display_name`` on the contained tables""" + for child in self: + if hasattr(child, "invalidate_display_name"): + child.invalidate_display_name() + + def as_string(self) -> str: + b = "" + for table in self._body: + b += table.as_string() + + return b + + def __repr__(self) -> str: + return f"" + + def _getstate(self, protocol=3): + return self._body, self.name, self._parsed + + +class Null(Item): + """ + A null item. + """ + + def __init__(self) -> None: + super().__init__(Trivia(trail="")) + + def unwrap(self) -> None: + return None + + @property + def discriminant(self) -> int: + return -1 + + @property + def value(self) -> None: + return None + + def as_string(self) -> str: + return "" + + def _getstate(self, protocol=3) -> tuple: + return () diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/lib/python3.13/site-packages/tomlkit/parser.py b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/lib/python3.13/site-packages/tomlkit/parser.py new file mode 100644 index 0000000000000000000000000000000000000000..b73a4829c0e8754775e82c145f5aec510cdd77b7 --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/lib/python3.13/site-packages/tomlkit/parser.py @@ -0,0 +1,1140 @@ +from __future__ import annotations + +import datetime +import re +import string + +from tomlkit._compat import decode +from tomlkit._utils import RFC_3339_LOOSE +from tomlkit._utils import _escaped +from tomlkit._utils import parse_rfc3339 +from tomlkit.container import Container +from tomlkit.exceptions import EmptyKeyError +from tomlkit.exceptions import EmptyTableNameError +from tomlkit.exceptions import InternalParserError +from tomlkit.exceptions import InvalidCharInStringError +from tomlkit.exceptions import InvalidControlChar +from tomlkit.exceptions import InvalidDateError +from tomlkit.exceptions import InvalidDateTimeError +from tomlkit.exceptions import InvalidNumberError +from tomlkit.exceptions import InvalidTimeError +from tomlkit.exceptions import InvalidUnicodeValueError +from tomlkit.exceptions import ParseError +from tomlkit.exceptions import UnexpectedCharError +from tomlkit.exceptions import UnexpectedEofError +from tomlkit.items import AoT +from tomlkit.items import Array +from tomlkit.items import Bool +from tomlkit.items import BoolType +from tomlkit.items import Comment +from tomlkit.items import Date +from tomlkit.items import DateTime +from tomlkit.items import Float +from tomlkit.items import InlineTable +from tomlkit.items import Integer +from tomlkit.items import Item +from tomlkit.items import Key +from tomlkit.items import KeyType +from tomlkit.items import Null +from tomlkit.items import SingleKey +from tomlkit.items import String +from tomlkit.items import StringType +from tomlkit.items import Table +from tomlkit.items import Time +from tomlkit.items import Trivia +from tomlkit.items import Whitespace +from tomlkit.source import Source +from tomlkit.toml_char import TOMLChar +from tomlkit.toml_document import TOMLDocument + + +CTRL_I = 0x09 # Tab +CTRL_J = 0x0A # Line feed +CTRL_M = 0x0D # Carriage return +CTRL_CHAR_LIMIT = 0x1F +CHR_DEL = 0x7F + + +class Parser: + """ + Parser for TOML documents. + """ + + def __init__(self, string: str | bytes) -> None: + # Input to parse + self._src = Source(decode(string)) + + self._aot_stack: list[Key] = [] + + @property + def _state(self): + return self._src.state + + @property + def _idx(self): + return self._src.idx + + @property + def _current(self): + return self._src.current + + @property + def _marker(self): + return self._src.marker + + def extract(self) -> str: + """ + Extracts the value between marker and index + """ + return self._src.extract() + + def inc(self, exception: type[ParseError] | None = None) -> bool: + """ + Increments the parser if the end of the input has not been reached. + Returns whether or not it was able to advance. + """ + return self._src.inc(exception=exception) + + def inc_n(self, n: int, exception: type[ParseError] | None = None) -> bool: + """ + Increments the parser by n characters + if the end of the input has not been reached. + """ + return self._src.inc_n(n=n, exception=exception) + + def consume(self, chars, min=0, max=-1): + """ + Consume chars until min/max is satisfied is valid. + """ + return self._src.consume(chars=chars, min=min, max=max) + + def end(self) -> bool: + """ + Returns True if the parser has reached the end of the input. + """ + return self._src.end() + + def mark(self) -> None: + """ + Sets the marker to the index's current position + """ + self._src.mark() + + def parse_error(self, exception=ParseError, *args, **kwargs): + """ + Creates a generic "parse error" at the current position. + """ + return self._src.parse_error(exception, *args, **kwargs) + + def parse(self) -> TOMLDocument: + body = TOMLDocument(True) + + # Take all keyvals outside of tables/AoT's. + while not self.end(): + # Break out if a table is found + if self._current == "[": + break + + # Otherwise, take and append one KV + item = self._parse_item() + if not item: + break + + key, value = item + if (key is not None and key.is_multi()) or not self._merge_ws(value, body): + # We actually have a table + try: + body.append(key, value) + except Exception as e: + raise self.parse_error(ParseError, str(e)) from e + + self.mark() + + while not self.end(): + key, value = self._parse_table() + if isinstance(value, Table) and value.is_aot_element(): + # This is just the first table in an AoT. Parse the rest of the array + # along with it. + value = self._parse_aot(value, key) + + try: + body.append(key, value) + except Exception as e: + raise self.parse_error(ParseError, str(e)) from e + + body.parsing(False) + + return body + + def _merge_ws(self, item: Item, container: Container) -> bool: + """ + Merges the given Item with the last one currently in the given Container if + both are whitespace items. + + Returns True if the items were merged. + """ + last = container.last_item() + if not last: + return False + + if not isinstance(item, Whitespace) or not isinstance(last, Whitespace): + return False + + start = self._idx - (len(last.s) + len(item.s)) + container.body[-1] = ( + container.body[-1][0], + Whitespace(self._src[start : self._idx]), + ) + + return True + + def _is_child(self, parent: Key, child: Key) -> bool: + """ + Returns whether a key is strictly a child of another key. + AoT siblings are not considered children of one another. + """ + parent_parts = tuple(parent) + child_parts = tuple(child) + + if parent_parts == child_parts: + return False + + return parent_parts == child_parts[: len(parent_parts)] + + def _parse_item(self) -> tuple[Key | None, Item] | None: + """ + Attempts to parse the next item and returns it, along with its key + if the item is value-like. + """ + self.mark() + with self._state as state: + while True: + c = self._current + if c == "\n": + # Found a newline; Return all whitespace found up to this point. + self.inc() + + return None, Whitespace(self.extract()) + elif c in " \t\r": + # Skip whitespace. + if not self.inc(): + return None, Whitespace(self.extract()) + elif c == "#": + # Found a comment, parse it + indent = self.extract() + cws, comment, trail = self._parse_comment_trail() + + return None, Comment(Trivia(indent, cws, comment, trail)) + elif c == "[": + # Found a table, delegate to the calling function. + return + else: + # Beginning of a KV pair. + # Return to beginning of whitespace so it gets included + # as indentation for the KV about to be parsed. + state.restore = True + break + + return self._parse_key_value(True) + + def _parse_comment_trail(self, parse_trail: bool = True) -> tuple[str, str, str]: + """ + Returns (comment_ws, comment, trail) + If there is no comment, comment_ws and comment will + simply be empty. + """ + if self.end(): + return "", "", "" + + comment = "" + comment_ws = "" + self.mark() + + while True: + c = self._current + + if c == "\n": + break + elif c == "#": + comment_ws = self.extract() + + self.mark() + self.inc() # Skip # + + # The comment itself + while not self.end() and not self._current.is_nl(): + code = ord(self._current) + if code == CHR_DEL or (code <= CTRL_CHAR_LIMIT and code != CTRL_I): + raise self.parse_error(InvalidControlChar, code, "comments") + + if not self.inc(): + break + + comment = self.extract() + self.mark() + + break + elif c in " \t\r": + self.inc() + else: + raise self.parse_error(UnexpectedCharError, c) + + if self.end(): + break + + trail = "" + if parse_trail: + while self._current.is_spaces() and self.inc(): + pass + + if self._current == "\r": + self.inc() + + if self._current == "\n": + self.inc() + + if self._idx != self._marker or self._current.is_ws(): + trail = self.extract() + + return comment_ws, comment, trail + + def _parse_key_value(self, parse_comment: bool = False) -> tuple[Key, Item]: + # Leading indent + self.mark() + + while self._current.is_spaces() and self.inc(): + pass + + indent = self.extract() + + # Key + key = self._parse_key() + + self.mark() + + found_equals = self._current == "=" + while self._current.is_kv_sep() and self.inc(): + if self._current == "=": + if found_equals: + raise self.parse_error(UnexpectedCharError, "=") + else: + found_equals = True + if not found_equals: + raise self.parse_error(UnexpectedCharError, self._current) + + if not key.sep: + key.sep = self.extract() + else: + key.sep += self.extract() + + # Value + val = self._parse_value() + # Comment + if parse_comment: + cws, comment, trail = self._parse_comment_trail() + meta = val.trivia + if not meta.comment_ws: + meta.comment_ws = cws + + meta.comment = comment + meta.trail = trail + else: + val.trivia.trail = "" + + val.trivia.indent = indent + + return key, val + + def _parse_key(self) -> Key: + """ + Parses a Key at the current position; + WS before the key must be exhausted first at the callsite. + """ + self.mark() + while self._current.is_spaces() and self.inc(): + # Skip any leading whitespace + pass + if self._current in "\"'": + return self._parse_quoted_key() + else: + return self._parse_bare_key() + + def _parse_quoted_key(self) -> Key: + """ + Parses a key enclosed in either single or double quotes. + """ + # Extract the leading whitespace + original = self.extract() + quote_style = self._current + key_type = next((t for t in KeyType if t.value == quote_style), None) + + if key_type is None: + raise RuntimeError("Should not have entered _parse_quoted_key()") + + key_str = self._parse_string( + StringType.SLB if key_type == KeyType.Basic else StringType.SLL + ) + if key_str._t.is_multiline(): + raise self.parse_error(UnexpectedCharError, key_str._t.value) + original += key_str.as_string() + self.mark() + while self._current.is_spaces() and self.inc(): + pass + original += self.extract() + key = SingleKey(str(key_str), t=key_type, sep="", original=original) + if self._current == ".": + self.inc() + key = key.concat(self._parse_key()) + + return key + + def _parse_bare_key(self) -> Key: + """ + Parses a bare key. + """ + while ( + self._current.is_bare_key_char() or self._current.is_spaces() + ) and self.inc(): + pass + + original = self.extract() + key = original.strip() + if not key: + # Empty key + raise self.parse_error(EmptyKeyError) + + if " " in key: + # Bare key with spaces in it + raise self.parse_error(ParseError, f'Invalid key "{key}"') + + key = SingleKey(key, KeyType.Bare, "", original) + + if self._current == ".": + self.inc() + key = key.concat(self._parse_key()) + + return key + + def _parse_value(self) -> Item: + """ + Attempts to parse a value at the current position. + """ + self.mark() + c = self._current + trivia = Trivia() + + if c == StringType.SLB.value: + return self._parse_basic_string() + elif c == StringType.SLL.value: + return self._parse_literal_string() + elif c == BoolType.TRUE.value[0]: + return self._parse_true() + elif c == BoolType.FALSE.value[0]: + return self._parse_false() + elif c == "[": + return self._parse_array() + elif c == "{": + return self._parse_inline_table() + elif c in "+-" or self._peek(4) in { + "+inf", + "-inf", + "inf", + "+nan", + "-nan", + "nan", + }: + # Number + while self._current not in " \t\n\r#,]}" and self.inc(): + pass + + raw = self.extract() + + item = self._parse_number(raw, trivia) + if item is not None: + return item + + raise self.parse_error(InvalidNumberError) + elif c in string.digits: + # Integer, Float, Date, Time or DateTime + while self._current not in " \t\n\r#,]}" and self.inc(): + pass + + raw = self.extract() + + m = RFC_3339_LOOSE.match(raw) + if m: + if m.group(1) and m.group(5): + # datetime + try: + dt = parse_rfc3339(raw) + assert isinstance(dt, datetime.datetime) + return DateTime( + dt.year, + dt.month, + dt.day, + dt.hour, + dt.minute, + dt.second, + dt.microsecond, + dt.tzinfo, + trivia, + raw, + ) + except ValueError: + raise self.parse_error(InvalidDateTimeError) from None + + if m.group(1): + try: + dt = parse_rfc3339(raw) + assert isinstance(dt, datetime.date) + date = Date(dt.year, dt.month, dt.day, trivia, raw) + self.mark() + while self._current not in "\t\n\r#,]}" and self.inc(): + pass + + time_raw = self.extract() + time_part = time_raw.rstrip() + trivia.comment_ws = time_raw[len(time_part) :] + if not time_part: + return date + + dt = parse_rfc3339(raw + time_part) + assert isinstance(dt, datetime.datetime) + return DateTime( + dt.year, + dt.month, + dt.day, + dt.hour, + dt.minute, + dt.second, + dt.microsecond, + dt.tzinfo, + trivia, + raw + time_part, + ) + except ValueError: + raise self.parse_error(InvalidDateError) from None + + if m.group(5): + try: + t = parse_rfc3339(raw) + assert isinstance(t, datetime.time) + return Time( + t.hour, + t.minute, + t.second, + t.microsecond, + t.tzinfo, + trivia, + raw, + ) + except ValueError: + raise self.parse_error(InvalidTimeError) from None + + item = self._parse_number(raw, trivia) + if item is not None: + return item + + raise self.parse_error(InvalidNumberError) + else: + raise self.parse_error(UnexpectedCharError, c) + + def _parse_true(self): + return self._parse_bool(BoolType.TRUE) + + def _parse_false(self): + return self._parse_bool(BoolType.FALSE) + + def _parse_bool(self, style: BoolType) -> Bool: + with self._state: + style = BoolType(style) + + # only keep parsing for bool if the characters match the style + # try consuming rest of chars in style + for c in style: + self.consume(c, min=1, max=1) + + return Bool(style, Trivia()) + + def _parse_array(self) -> Array: + # Consume opening bracket, EOF here is an issue (middle of array) + self.inc(exception=UnexpectedEofError) + + elems: list[Item] = [] + prev_value = None + while True: + # consume whitespace + mark = self._idx + self.consume(TOMLChar.SPACES + TOMLChar.NL) + indent = self._src[mark : self._idx] + newline = set(TOMLChar.NL) & set(indent) + if newline: + elems.append(Whitespace(indent)) + continue + + # consume comment + if self._current == "#": + cws, comment, trail = self._parse_comment_trail(parse_trail=False) + elems.append(Comment(Trivia(indent, cws, comment, trail))) + continue + + # consume indent + if indent: + elems.append(Whitespace(indent)) + continue + + # consume value + if not prev_value: + try: + elems.append(self._parse_value()) + prev_value = True + continue + except UnexpectedCharError: + pass + + # consume comma + if prev_value and self._current == ",": + self.inc(exception=UnexpectedEofError) + # If the previous item is Whitespace, add to it + if isinstance(elems[-1], Whitespace): + elems[-1]._s = elems[-1].s + "," + else: + elems.append(Whitespace(",")) + prev_value = False + continue + + # consume closing bracket + if self._current == "]": + # consume closing bracket, EOF here doesn't matter + self.inc() + break + + raise self.parse_error(UnexpectedCharError, self._current) + + try: + res = Array(elems, Trivia()) + except ValueError: + pass + else: + return res + + def _parse_inline_table(self) -> InlineTable: + # consume opening bracket, EOF here is an issue (middle of array) + self.inc(exception=UnexpectedEofError) + + elems = Container(True) + trailing_comma = None + while True: + # consume leading whitespace + mark = self._idx + self.consume(TOMLChar.SPACES) + raw = self._src[mark : self._idx] + if raw: + elems.add(Whitespace(raw)) + + if not trailing_comma: + # None: empty inline table + # False: previous key-value pair was not followed by a comma + if self._current == "}": + # consume closing bracket, EOF here doesn't matter + self.inc() + break + + if trailing_comma is False or ( + trailing_comma is None and self._current == "," + ): + # Either the previous key-value pair was not followed by a comma + # or the table has an unexpected leading comma. + raise self.parse_error(UnexpectedCharError, self._current) + else: + # True: previous key-value pair was followed by a comma + if self._current == "}" or self._current == ",": + raise self.parse_error(UnexpectedCharError, self._current) + + key, val = self._parse_key_value(False) + elems.add(key, val) + + # consume trailing whitespace + mark = self._idx + self.consume(TOMLChar.SPACES) + raw = self._src[mark : self._idx] + if raw: + elems.add(Whitespace(raw)) + + # consume trailing comma + trailing_comma = self._current == "," + if trailing_comma: + # consume closing bracket, EOF here is an issue (middle of inline table) + self.inc(exception=UnexpectedEofError) + + return InlineTable(elems, Trivia()) + + def _parse_number(self, raw: str, trivia: Trivia) -> Item | None: + # Leading zeros are not allowed + sign = "" + if raw.startswith(("+", "-")): + sign = raw[0] + raw = raw[1:] + + if len(raw) > 1 and ( + (raw.startswith("0") and not raw.startswith(("0.", "0o", "0x", "0b", "0e"))) + or (sign and raw.startswith(".")) + ): + return None + + if raw.startswith(("0o", "0x", "0b")) and sign: + return None + + digits = "[0-9]" + base = 10 + if raw.startswith("0b"): + digits = "[01]" + base = 2 + elif raw.startswith("0o"): + digits = "[0-7]" + base = 8 + elif raw.startswith("0x"): + digits = "[0-9a-f]" + base = 16 + + # Underscores should be surrounded by digits + clean = re.sub(f"(?i)(?<={digits})_(?={digits})", "", raw).lower() + + if "_" in clean: + return None + + if clean.endswith(".") or ( + not clean.startswith("0x") and clean.split("e", 1)[0].endswith(".") + ): + return None + + try: + return Integer(int(sign + clean, base), trivia, sign + raw) + except ValueError: + try: + return Float(float(sign + clean), trivia, sign + raw) + except ValueError: + return None + + def _parse_literal_string(self) -> String: + with self._state: + return self._parse_string(StringType.SLL) + + def _parse_basic_string(self) -> String: + with self._state: + return self._parse_string(StringType.SLB) + + def _parse_escaped_char(self, multiline): + if multiline and self._current.is_ws(): + # When the last non-whitespace character on a line is + # a \, it will be trimmed along with all whitespace + # (including newlines) up to the next non-whitespace + # character or closing delimiter. + # """\ + # hello \ + # world""" + tmp = "" + while self._current.is_ws(): + tmp += self._current + # consume the whitespace, EOF here is an issue + # (middle of string) + self.inc(exception=UnexpectedEofError) + continue + + # the escape followed by whitespace must have a newline + # before any other chars + if "\n" not in tmp: + raise self.parse_error(InvalidCharInStringError, self._current) + + return "" + + if self._current in _escaped: + c = _escaped[self._current] + + # consume this char, EOF here is an issue (middle of string) + self.inc(exception=UnexpectedEofError) + + return c + + if self._current in {"u", "U"}: + # this needs to be a unicode + u, ue = self._peek_unicode(self._current == "U") + if u is not None: + # consume the U char and the unicode value + self.inc_n(len(ue) + 1) + + return u + + raise self.parse_error(InvalidUnicodeValueError) + + raise self.parse_error(InvalidCharInStringError, self._current) + + def _parse_string(self, delim: StringType) -> String: + # only keep parsing for string if the current character matches the delim + if self._current != delim.unit: + raise self.parse_error( + InternalParserError, + f"Invalid character for string type {delim}", + ) + + # consume the opening/first delim, EOF here is an issue + # (middle of string or middle of delim) + self.inc(exception=UnexpectedEofError) + + if self._current == delim.unit: + # consume the closing/second delim, we do not care if EOF occurs as + # that would simply imply an empty single line string + if not self.inc() or self._current != delim.unit: + # Empty string + return String(delim, "", "", Trivia()) + + # consume the third delim, EOF here is an issue (middle of string) + self.inc(exception=UnexpectedEofError) + + delim = delim.toggle() # convert delim to multi delim + + self.mark() # to extract the original string with whitespace and all + value = "" + + # A newline immediately following the opening delimiter will be trimmed. + if delim.is_multiline(): + if self._current == "\n": + # consume the newline, EOF here is an issue (middle of string) + self.inc(exception=UnexpectedEofError) + else: + cur = self._current + with self._state(restore=True): + if self.inc(): + cur += self._current + if cur == "\r\n": + self.inc_n(2, exception=UnexpectedEofError) + + escaped = False # whether the previous key was ESCAPE + while True: + code = ord(self._current) + if ( + delim.is_singleline() + and not escaped + and (code == CHR_DEL or (code <= CTRL_CHAR_LIMIT and code != CTRL_I)) + ) or ( + delim.is_multiline() + and not escaped + and ( + code == CHR_DEL + or ( + code <= CTRL_CHAR_LIMIT and code not in [CTRL_I, CTRL_J, CTRL_M] + ) + ) + ): + raise self.parse_error(InvalidControlChar, code, "strings") + elif not escaped and self._current == delim.unit: + # try to process current as a closing delim + original = self.extract() + + close = "" + if delim.is_multiline(): + # Consume the delimiters to see if we are at the end of the string + close = "" + while self._current == delim.unit: + close += self._current + self.inc() + + if len(close) < 3: + # Not a triple quote, leave in result as-is. + # Adding back the characters we already consumed + value += close + continue + + if len(close) == 3: + # We are at the end of the string + return String(delim, value, original, Trivia()) + + if len(close) >= 6: + raise self.parse_error(InvalidCharInStringError, self._current) + + value += close[:-3] + original += close[:-3] + + return String(delim, value, original, Trivia()) + else: + # consume the closing delim, we do not care if EOF occurs as + # that would simply imply the end of self._src + self.inc() + + return String(delim, value, original, Trivia()) + elif delim.is_basic() and escaped: + # attempt to parse the current char as an escaped value, an exception + # is raised if this fails + value += self._parse_escaped_char(delim.is_multiline()) + + # no longer escaped + escaped = False + elif delim.is_basic() and self._current == "\\": + # the next char is being escaped + escaped = True + + # consume this char, EOF here is an issue (middle of string) + self.inc(exception=UnexpectedEofError) + else: + # this is either a literal string where we keep everything as is, + # or this is not a special escaped char in a basic string + value += self._current + + # consume this char, EOF here is an issue (middle of string) + self.inc(exception=UnexpectedEofError) + + def _parse_table( + self, parent_name: Key | None = None, parent: Table | None = None + ) -> tuple[Key, Table | AoT]: + """ + Parses a table element. + """ + if self._current != "[": + raise self.parse_error( + InternalParserError, "_parse_table() called on non-bracket character." + ) + + indent = self.extract() + self.inc() # Skip opening bracket + + if self.end(): + raise self.parse_error(UnexpectedEofError) + + is_aot = False + if self._current == "[": + if not self.inc(): + raise self.parse_error(UnexpectedEofError) + + is_aot = True + try: + key = self._parse_key() + except EmptyKeyError: + raise self.parse_error(EmptyTableNameError) from None + if self.end(): + raise self.parse_error(UnexpectedEofError) + elif self._current != "]": + raise self.parse_error(UnexpectedCharError, self._current) + + key.sep = "" + full_key = key + name_parts = tuple(key) + if any(" " in part.key.strip() and part.is_bare() for part in name_parts): + raise self.parse_error( + ParseError, f'Invalid table name "{full_key.as_string()}"' + ) + + missing_table = False + if parent_name: + parent_name_parts = tuple(parent_name) + else: + parent_name_parts = () + + if len(name_parts) > len(parent_name_parts) + 1: + missing_table = True + + name_parts = name_parts[len(parent_name_parts) :] + + values = Container(True) + + self.inc() # Skip closing bracket + if is_aot: + # TODO: Verify close bracket + self.inc() + + cws, comment, trail = self._parse_comment_trail() + + result = Null() + table = Table( + values, + Trivia(indent, cws, comment, trail), + is_aot, + name=name_parts[0].key if name_parts else key.key, + display_name=full_key.as_string(), + is_super_table=False, + ) + + if len(name_parts) > 1: + if missing_table: + # Missing super table + # i.e. a table initialized like this: [foo.bar] + # without initializing [foo] + # + # So we have to create the parent tables + table = Table( + Container(True), + Trivia("", cws, comment, trail), + is_aot and name_parts[0] in self._aot_stack, + is_super_table=True, + name=name_parts[0].key, + ) + + result = table + key = name_parts[0] + + for i, _name in enumerate(name_parts[1:]): + child = table.get( + _name, + Table( + Container(True), + Trivia(indent, cws, comment, trail), + is_aot and i == len(name_parts) - 2, + is_super_table=i < len(name_parts) - 2, + name=_name.key, + display_name=( + full_key.as_string() if i == len(name_parts) - 2 else None + ), + ), + ) + + if is_aot and i == len(name_parts) - 2: + table.raw_append(_name, AoT([child], name=table.name, parsed=True)) + else: + table.raw_append(_name, child) + + table = child + values = table.value + else: + if name_parts: + key = name_parts[0] + + while not self.end(): + item = self._parse_item() + if item: + _key, item = item + if not self._merge_ws(item, values): + table.raw_append(_key, item) + else: + if self._current == "[": + _, key_next = self._peek_table() + + if self._is_child(full_key, key_next): + key_next, table_next = self._parse_table(full_key, table) + + table.raw_append(key_next, table_next) + + # Picking up any sibling + while not self.end(): + _, key_next = self._peek_table() + + if not self._is_child(full_key, key_next): + break + + key_next, table_next = self._parse_table(full_key, table) + + table.raw_append(key_next, table_next) + + break + else: + raise self.parse_error( + InternalParserError, + "_parse_item() returned None on a non-bracket character.", + ) + table.value._validate_out_of_order_table() + if isinstance(result, Null): + result = table + + if is_aot and (not self._aot_stack or full_key != self._aot_stack[-1]): + result = self._parse_aot(result, full_key) + + return key, result + + def _peek_table(self) -> tuple[bool, Key]: + """ + Peeks ahead non-intrusively by cloning then restoring the + initial state of the parser. + + Returns the name of the table about to be parsed, + as well as whether it is part of an AoT. + """ + # we always want to restore after exiting this scope + with self._state(save_marker=True, restore=True): + if self._current != "[": + raise self.parse_error( + InternalParserError, + "_peek_table() entered on non-bracket character", + ) + + # AoT + self.inc() + is_aot = False + if self._current == "[": + self.inc() + is_aot = True + try: + return is_aot, self._parse_key() + except EmptyKeyError: + raise self.parse_error(EmptyTableNameError) from None + + def _parse_aot(self, first: Table, name_first: Key) -> AoT: + """ + Parses all siblings of the provided table first and bundles them into + an AoT. + """ + payload = [first] + self._aot_stack.append(name_first) + while not self.end(): + is_aot_next, name_next = self._peek_table() + if is_aot_next and name_next == name_first: + _, table = self._parse_table(name_first) + payload.append(table) + else: + break + + self._aot_stack.pop() + + return AoT(payload, parsed=True) + + def _peek(self, n: int) -> str: + """ + Peeks ahead n characters. + + n is the max number of characters that will be peeked. + """ + # we always want to restore after exiting this scope + with self._state(restore=True): + buf = "" + for _ in range(n): + if self._current not in " \t\n\r#,]}" + self._src.EOF: + buf += self._current + self.inc() + continue + + break + return buf + + def _peek_unicode(self, is_long: bool) -> tuple[str | None, str | None]: + """ + Peeks ahead non-intrusively by cloning then restoring the + initial state of the parser. + + Returns the unicode value is it's a valid one else None. + """ + # we always want to restore after exiting this scope + with self._state(save_marker=True, restore=True): + if self._current not in {"u", "U"}: + raise self.parse_error( + InternalParserError, "_peek_unicode() entered on non-unicode value" + ) + + self.inc() # Dropping prefix + self.mark() + + if is_long: + chars = 8 + else: + chars = 4 + + if not self.inc_n(chars): + value, extracted = None, None + else: + extracted = self.extract() + + if extracted[0].lower() == "d" and extracted[1].strip("01234567"): + return None, None + + try: + value = chr(int(extracted, 16)) + except (ValueError, OverflowError): + value = None + + return value, extracted diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/lib/python3.13/site-packages/tomlkit/py.typed b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/lib/python3.13/site-packages/tomlkit/py.typed new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/lib/python3.13/site-packages/tomlkit/source.py b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/lib/python3.13/site-packages/tomlkit/source.py new file mode 100644 index 0000000000000000000000000000000000000000..8a8b2c3d931b2743697dfc3cdfc0dfc22fca4cec --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/lib/python3.13/site-packages/tomlkit/source.py @@ -0,0 +1,180 @@ +from __future__ import annotations + +from copy import copy +from typing import Any + +from tomlkit.exceptions import ParseError +from tomlkit.exceptions import UnexpectedCharError +from tomlkit.toml_char import TOMLChar + + +class _State: + def __init__( + self, + source: Source, + save_marker: bool | None = False, + restore: bool | None = False, + ) -> None: + self._source = source + self._save_marker = save_marker + self.restore = restore + + def __enter__(self) -> _State: + # Entering this context manager - save the state + self._chars = copy(self._source._chars) + self._idx = self._source._idx + self._current = self._source._current + self._marker = self._source._marker + + return self + + def __exit__(self, exception_type, exception_val, trace): + # Exiting this context manager - restore the prior state + if self.restore or exception_type: + self._source._chars = self._chars + self._source._idx = self._idx + self._source._current = self._current + if self._save_marker: + self._source._marker = self._marker + + +class _StateHandler: + """ + State preserver for the Parser. + """ + + def __init__(self, source: Source) -> None: + self._source = source + self._states = [] + + def __call__(self, *args, **kwargs): + return _State(self._source, *args, **kwargs) + + def __enter__(self) -> _State: + state = self() + self._states.append(state) + return state.__enter__() + + def __exit__(self, exception_type, exception_val, trace): + state = self._states.pop() + return state.__exit__(exception_type, exception_val, trace) + + +class Source(str): + EOF = TOMLChar("\0") + + def __init__(self, _: str) -> None: + super().__init__() + + # Collection of TOMLChars + self._chars = iter([(i, TOMLChar(c)) for i, c in enumerate(self)]) + + self._idx = 0 + self._marker = 0 + self._current = TOMLChar("") + + self._state = _StateHandler(self) + + self.inc() + + def reset(self): + # initialize both idx and current + self.inc() + + # reset marker + self.mark() + + @property + def state(self) -> _StateHandler: + return self._state + + @property + def idx(self) -> int: + return self._idx + + @property + def current(self) -> TOMLChar: + return self._current + + @property + def marker(self) -> int: + return self._marker + + def extract(self) -> str: + """ + Extracts the value between marker and index + """ + return self[self._marker : self._idx] + + def inc(self, exception: type[ParseError] | None = None) -> bool: + """ + Increments the parser if the end of the input has not been reached. + Returns whether or not it was able to advance. + """ + try: + self._idx, self._current = next(self._chars) + + return True + except StopIteration: + self._idx = len(self) + self._current = self.EOF + if exception: + raise self.parse_error(exception) from None + + return False + + def inc_n(self, n: int, exception: type[ParseError] | None = None) -> bool: + """ + Increments the parser by n characters + if the end of the input has not been reached. + """ + return all(self.inc(exception=exception) for _ in range(n)) + + def consume(self, chars, min=0, max=-1): + """ + Consume chars until min/max is satisfied is valid. + """ + while self.current in chars and max != 0: + min -= 1 + max -= 1 + if not self.inc(): + break + + # failed to consume minimum number of characters + if min > 0: + raise self.parse_error(UnexpectedCharError, self.current) + + def end(self) -> bool: + """ + Returns True if the parser has reached the end of the input. + """ + return self._current is self.EOF + + def mark(self) -> None: + """ + Sets the marker to the index's current position + """ + self._marker = self._idx + + def parse_error( + self, + exception: type[ParseError] = ParseError, + *args: Any, + **kwargs: Any, + ) -> ParseError: + """ + Creates a generic "parse error" at the current position. + """ + line, col = self._to_linecol() + + return exception(line, col, *args, **kwargs) + + def _to_linecol(self) -> tuple[int, int]: + cur = 0 + for i, line in enumerate(self.splitlines()): + if cur + len(line) + 1 > self.idx: + return (i + 1, self.idx - cur) + + cur += len(line) + 1 + + return len(self.splitlines()), 0 diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/lib/python3.13/site-packages/tomlkit/toml_char.py b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/lib/python3.13/site-packages/tomlkit/toml_char.py new file mode 100644 index 0000000000000000000000000000000000000000..b4bb4110c557de854a815c677a4f968be550c21d --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/lib/python3.13/site-packages/tomlkit/toml_char.py @@ -0,0 +1,52 @@ +import string + + +class TOMLChar(str): + def __init__(self, c): + super().__init__() + + if len(self) > 1: + raise ValueError("A TOML character must be of length 1") + + BARE = string.ascii_letters + string.digits + "-_" + KV = "= \t" + NUMBER = string.digits + "+-_.e" + SPACES = " \t" + NL = "\n\r" + WS = SPACES + NL + + def is_bare_key_char(self) -> bool: + """ + Whether the character is a valid bare key name or not. + """ + return self in self.BARE + + def is_kv_sep(self) -> bool: + """ + Whether the character is a valid key/value separator or not. + """ + return self in self.KV + + def is_int_float_char(self) -> bool: + """ + Whether the character if a valid integer or float value character or not. + """ + return self in self.NUMBER + + def is_ws(self) -> bool: + """ + Whether the character is a whitespace character or not. + """ + return self in self.WS + + def is_nl(self) -> bool: + """ + Whether the character is a new line character or not. + """ + return self in self.NL + + def is_spaces(self) -> bool: + """ + Whether the character is a space or not + """ + return self in self.SPACES diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/lib/python3.13/site-packages/tomlkit/toml_document.py b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/lib/python3.13/site-packages/tomlkit/toml_document.py new file mode 100644 index 0000000000000000000000000000000000000000..71fac2e101150b35482b02c1e040789fe29bf835 --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/lib/python3.13/site-packages/tomlkit/toml_document.py @@ -0,0 +1,7 @@ +from tomlkit.container import Container + + +class TOMLDocument(Container): + """ + A TOML document. + """ diff --git a/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/lib/python3.13/site-packages/tomlkit/toml_file.py b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/lib/python3.13/site-packages/tomlkit/toml_file.py new file mode 100644 index 0000000000000000000000000000000000000000..b8ffcbd85dff291b58b8220c1ca88fea4a887f70 --- /dev/null +++ b/miniconda3/pkgs/tomlkit-0.13.3-py313h06a4308_0/lib/python3.13/site-packages/tomlkit/toml_file.py @@ -0,0 +1,59 @@ +import os +import re + +from typing import TYPE_CHECKING + +from tomlkit.api import loads +from tomlkit.toml_document import TOMLDocument + + +if TYPE_CHECKING: + from _typeshed import StrPath as _StrPath +else: + from typing import Union + + _StrPath = Union[str, os.PathLike] + + +class TOMLFile: + """ + Represents a TOML file. + + :param path: path to the TOML file + """ + + def __init__(self, path: _StrPath) -> None: + self._path = path + self._linesep = os.linesep + + def read(self) -> TOMLDocument: + """Read the file content as a :class:`tomlkit.toml_document.TOMLDocument`.""" + with open(self._path, encoding="utf-8", newline="") as f: + content = f.read() + + # check if consistent line endings + num_newline = content.count("\n") + if num_newline > 0: + num_win_eol = content.count("\r\n") + if num_win_eol == num_newline: + self._linesep = "\r\n" + content = content.replace("\r\n", "\n") + elif num_win_eol == 0: + self._linesep = "\n" + else: + self._linesep = "mixed" + + return loads(content) + + def write(self, data: TOMLDocument) -> None: + """Write the TOMLDocument to the file.""" + content = data.as_string() + + # apply linesep + if self._linesep == "\n": + content = content.replace("\r\n", "\n") + elif self._linesep == "\r\n": + content = re.sub(r"(?" + }, + "extra": { + "copy_test_source_files": true, + "final": true, + "pbp_graph_uuid": "6a08bd9f-8cb8-48ae-aba9-77f75a5e5a1a", + "recipe-maintainers": [ + "casperdcl", + "pmlandwehr" + ], + "remote_url": "https://github.com/AnacondaRecipes/tqdm-feedstock", + "sha": "a613e99b814652e0ad950865f5a5652931c33446", + "task_id": "TQ--YoKyRRKs5-y4aFJpTw", + "task_run_id": "0" + }, + "home": "https://tqdm.github.io", + "identifiers": [], + "keywords": [], + "license": "MPL-2.0 AND MIT", + "license_family": "MOZILLA", + "license_file": "LICENCE", + "root_pkgs": [ + "_libgcc_mutex 0.1 main", + "ca-certificates 2025.12.2 h06a4308_0", + "ld_impl_linux-64 2.40 h12ee557_0", + "libstdcxx-ng 11.2.0 h1234567_1", + "nlohmann_json 3.11.2 h6a678d5_0", + "pybind11-abi 5 hd3eb1b0_0", + "tzdata 2025a h04d1e81_0", + "libgomp 11.2.0 h1234567_1", + "_openmp_mutex 5.1 1_gnu", + "libgcc-ng 11.2.0 h1234567_1", + "bzip2 1.0.8 h5eee18b_6", + "c-ares 1.19.1 h5eee18b_0", + "cpp-expected 1.1.0 hdb19cb5_0", + "expat 2.7.3 h3385a95_0", + "fmt 9.1.0 hdb19cb5_1", + "icu 73.1 h6a678d5_0", + "libev 4.33 h7f8727e_1", + "libffi 3.4.4 h6a678d5_1", + "libuuid 1.41.5 h5eee18b_0", + "lz4-c 1.9.4 h6a678d5_1", + "ncurses 6.4 h6a678d5_0", + "reproc 14.2.4 h6a678d5_2", + "simdjson 3.10.1 hdb19cb5_0", + "xz 5.4.6 h5eee18b_1", + "yaml-cpp 0.8.0 h6a678d5_1", + "zlib 1.2.13 h5eee18b_1", + "libedit 3.1.20230828 h5eee18b_0", + "libnghttp2 1.57.0 h2d74bed_0", + "libssh2 1.11.1 h251f7ec_0", + "libxml2 2.13.5 hfdd30dd_0", + "pcre2 10.42 hebb0a14_1", + "readline 8.2 h5eee18b_0", + "reproc-cpp 14.2.4 h6a678d5_2", + "spdlog 1.11.0 hdb19cb5_0", + "patch 2.8 hb25bd0a_0", + "zstd 1.5.6 hc292b87_0", + "krb5 1.20.1 h143b758_1", + "libarchive 3.7.7 hfab0078_0", + "libsolv 0.7.30 he621ea3_1", + "sqlite 3.45.3 h5eee18b_0", + "python 3.12.9 h5148396_0", + "libmamba 2.0.5 haf1ee3a_1", + "menuinst 2.2.0 py312h06a4308_1", + "anaconda-anon-usage 0.5.0 py312hfc0e8ea_100", + "annotated-types 0.6.0 py312h06a4308_0", + "archspec 0.2.3 pyhd3eb1b0_0", + "boltons 24.1.0 py312h06a4308_0", + "brotli-python 1.0.9 py312h6a678d5_9", + "charset-normalizer 3.3.2 pyhd3eb1b0_0", + "distro 1.9.0 py312h06a4308_0", + "frozendict 2.4.2 py312h06a4308_0", + "idna 3.7 py312h06a4308_0", + "jsonpointer 2.1 pyhd3eb1b0_0", + "libmambapy 2.0.5 py312hdb19cb5_1", + "mdurl 0.1.0 py312h06a4308_0", + "packaging 24.2 py312h06a4308_0", + "platformdirs 3.10.0 py312h06a4308_0", + "pluggy 1.5.0 py312h06a4308_0", + "pycosat 0.6.6 py312h5eee18b_2", + "pycparser 2.21 pyhd3eb1b0_0", + "pygments 2.15.1 py312h06a4308_1", + "pysocks 1.7.1 py312h06a4308_0", + "ruamel.yaml.clib 0.2.8 py312h5eee18b_0", + "setuptools 75.8.0 py312h06a4308_0", + "tqdm 4.67.1 py312he106c6f_0", + "truststore 0.10.0 py312h06a4308_0", + "typing_extensions 4.12.2 py312h06a4308_0", + "wheel 0.45.1 py312h06a4308_0", + "cffi 1.17.1 py312h1fdaa30_1", + "jsonpatch 1.33 py312h06a4308_1", + "markdown-it-py 2.2.0 py312h06a4308_1", + "pip 25.0 py312h06a4308_0", + "ruamel.yaml 0.18.6 py312h5eee18b_0", + "typing-extensions 4.12.2 py312h06a4308_0", + "urllib3 2.3.0 py312h06a4308_0", + "cryptography 43.0.3 py312h7825ff9_1", + "pydantic-core 2.27.1 py312h4aa5aa6_0", + "requests 2.32.3 py312h06a4308_1", + "rich 13.9.4 py312h06a4308_0", + "zstandard 0.23.0 py312h2c38b39_1", + "conda-content-trust 0.2.0 py312h06a4308_1", + "conda-package-streaming 0.11.0 py312h06a4308_0", + "pydantic 2.10.3 py312h06a4308_0", + "conda-package-handling 2.4.0 py312h06a4308_0", + "conda 25.1.1 py312h06a4308_0", + "conda-anaconda-tos 0.1.2 py312h06a4308_0", + "conda-libmamba-solver 25.1.1 pyhd3eb1b0_0", + "libiconv 1.16 h5eee18b_3", + "libsodium 1.0.20 heac8642_0", + "libunistring 1.3 hb25bd0a_0", + "mbedtls 3.5.1 h6a678d5_1", + "openssl 3.0.18 hd6dcaed_0", + "patchelf 0.17.2 h6a678d5_0", + "perl 5.40.2 0_h5eee18b_perl5", + "pthread-stubs 0.3 h0ce48e5_1", + "xorg-libxau 1.0.12 h9b100fa_0", + "xorg-libxdmcp 1.1.5 h9b100fa_0", + "xorg-xorgproto 2024.1 h5eee18b_1", + "yaml 0.2.5 h7b6447c_0", + "liblief 0.16.4 h6a678d5_0", + "libxcb 1.17.0 h9b100fa_0", + "gettext 0.21.0 hedfda30_2", + "xorg-libx11 1.8.12 h9b100fa_1", + "libidn2 2.3.8 hf80d704_0", + "tk 8.6.15 h54e0aa7_0", + "libcurl 8.16.0 heebcbe5_0", + "git 2.51.0 pl5382h000ed5b_0", + "argcomplete 3.6.2 py312h06a4308_0", + "attrs 25.4.0 py312h06a4308_2", + "certifi 2026.01.04 py312h06a4308_0", + "chardet 5.2.0 py312h06a4308_0", + "click 8.2.1 py312h06a4308_1", + "evalidate 2.0.3 py312h06a4308_0", + "filelock 3.20.0 py312h06a4308_0", + "jmespath 1.0.1 py312h06a4308_0", + "markupsafe 3.0.2 py312h5eee18b_0", + "msgpack-python 1.1.1 py312h6a678d5_0", + "pkginfo 1.12.1.2 py312h06a4308_0", + "psutil 7.0.0 py312hee96239_1", + "py-lief 0.16.4 py312h6a678d5_0", + "python-libarchive-c 5.1 pyhd3eb1b0_0", + "pytz 2025.2 py312h06a4308_0", + "pyyaml 6.0.2 py312h5eee18b_0", + "rpds-py 0.28.0 py312h498d7c9_0", + "six 1.17.0 py312h06a4308_0", + "soupsieve 2.5 py312h06a4308_0", + "tomlkit 0.13.3 py312h06a4308_0", + "xmltodict 0.14.2 py312h06a4308_0", + "jinja2 3.1.6 py312h06a4308_0", + "python-dateutil 2.9.0post0 py312h06a4308_2", + "referencing 0.37.0 py312h06a4308_0", + "yq 3.4.3 py312h06a4308_0", + "beautifulsoup4 4.14.2 py312h06a4308_0", + "botocore 1.42.19 py312h06a4308_0", + "jsonschema-specifications 2025.9.1 py312h06a4308_0", + "pynacl 1.6.0 py312h2630517_0", + "jsonschema 4.25.1 py312h06a4308_0", + "s3transfer 0.16.0 py312h06a4308_0", + "boto3 1.42.19 py312h06a4308_0", + "conda-anaconda-telemetry 0.3.0 pyhd3eb1b0_1", + "conda-index 0.7.0 py312h06a4308_0", + "conda-build 25.11.1 py312h76456e7_0" + ], + "summary": "A Fast, Extensible Progress Meter", + "tags": [] +} \ No newline at end of file diff --git a/miniconda3/pkgs/tqdm-4.67.3-py313h7040dfc_1/info/files b/miniconda3/pkgs/tqdm-4.67.3-py313h7040dfc_1/info/files new file mode 100644 index 0000000000000000000000000000000000000000..32c4eef0bb72d245426b460a770ce74095f4c9f4 --- /dev/null +++ b/miniconda3/pkgs/tqdm-4.67.3-py313h7040dfc_1/info/files @@ -0,0 +1,74 @@ +bin/tqdm +lib/python3.13/site-packages/tqdm-4.67.3.dist-info/INSTALLER +lib/python3.13/site-packages/tqdm-4.67.3.dist-info/METADATA +lib/python3.13/site-packages/tqdm-4.67.3.dist-info/RECORD +lib/python3.13/site-packages/tqdm-4.67.3.dist-info/REQUESTED +lib/python3.13/site-packages/tqdm-4.67.3.dist-info/WHEEL +lib/python3.13/site-packages/tqdm-4.67.3.dist-info/direct_url.json +lib/python3.13/site-packages/tqdm-4.67.3.dist-info/entry_points.txt +lib/python3.13/site-packages/tqdm-4.67.3.dist-info/licenses/LICENCE +lib/python3.13/site-packages/tqdm-4.67.3.dist-info/top_level.txt +lib/python3.13/site-packages/tqdm/__init__.py +lib/python3.13/site-packages/tqdm/__main__.py +lib/python3.13/site-packages/tqdm/__pycache__/__init__.cpython-313.pyc +lib/python3.13/site-packages/tqdm/__pycache__/__main__.cpython-313.pyc +lib/python3.13/site-packages/tqdm/__pycache__/_main.cpython-313.pyc +lib/python3.13/site-packages/tqdm/__pycache__/_monitor.cpython-313.pyc +lib/python3.13/site-packages/tqdm/__pycache__/_tqdm.cpython-313.pyc +lib/python3.13/site-packages/tqdm/__pycache__/_tqdm_gui.cpython-313.pyc +lib/python3.13/site-packages/tqdm/__pycache__/_tqdm_notebook.cpython-313.pyc +lib/python3.13/site-packages/tqdm/__pycache__/_tqdm_pandas.cpython-313.pyc +lib/python3.13/site-packages/tqdm/__pycache__/_utils.cpython-313.pyc +lib/python3.13/site-packages/tqdm/__pycache__/asyncio.cpython-313.pyc +lib/python3.13/site-packages/tqdm/__pycache__/auto.cpython-313.pyc +lib/python3.13/site-packages/tqdm/__pycache__/autonotebook.cpython-313.pyc +lib/python3.13/site-packages/tqdm/__pycache__/cli.cpython-313.pyc +lib/python3.13/site-packages/tqdm/__pycache__/dask.cpython-313.pyc +lib/python3.13/site-packages/tqdm/__pycache__/gui.cpython-313.pyc +lib/python3.13/site-packages/tqdm/__pycache__/keras.cpython-313.pyc +lib/python3.13/site-packages/tqdm/__pycache__/notebook.cpython-313.pyc +lib/python3.13/site-packages/tqdm/__pycache__/rich.cpython-313.pyc +lib/python3.13/site-packages/tqdm/__pycache__/std.cpython-313.pyc +lib/python3.13/site-packages/tqdm/__pycache__/tk.cpython-313.pyc +lib/python3.13/site-packages/tqdm/__pycache__/utils.cpython-313.pyc +lib/python3.13/site-packages/tqdm/__pycache__/version.cpython-313.pyc +lib/python3.13/site-packages/tqdm/_main.py +lib/python3.13/site-packages/tqdm/_monitor.py +lib/python3.13/site-packages/tqdm/_tqdm.py +lib/python3.13/site-packages/tqdm/_tqdm_gui.py +lib/python3.13/site-packages/tqdm/_tqdm_notebook.py +lib/python3.13/site-packages/tqdm/_tqdm_pandas.py +lib/python3.13/site-packages/tqdm/_utils.py +lib/python3.13/site-packages/tqdm/asyncio.py +lib/python3.13/site-packages/tqdm/auto.py +lib/python3.13/site-packages/tqdm/autonotebook.py +lib/python3.13/site-packages/tqdm/cli.py +lib/python3.13/site-packages/tqdm/completion.sh +lib/python3.13/site-packages/tqdm/contrib/__init__.py +lib/python3.13/site-packages/tqdm/contrib/__pycache__/__init__.cpython-313.pyc +lib/python3.13/site-packages/tqdm/contrib/__pycache__/bells.cpython-313.pyc +lib/python3.13/site-packages/tqdm/contrib/__pycache__/concurrent.cpython-313.pyc +lib/python3.13/site-packages/tqdm/contrib/__pycache__/discord.cpython-313.pyc +lib/python3.13/site-packages/tqdm/contrib/__pycache__/itertools.cpython-313.pyc +lib/python3.13/site-packages/tqdm/contrib/__pycache__/logging.cpython-313.pyc +lib/python3.13/site-packages/tqdm/contrib/__pycache__/slack.cpython-313.pyc +lib/python3.13/site-packages/tqdm/contrib/__pycache__/telegram.cpython-313.pyc +lib/python3.13/site-packages/tqdm/contrib/__pycache__/utils_worker.cpython-313.pyc +lib/python3.13/site-packages/tqdm/contrib/bells.py +lib/python3.13/site-packages/tqdm/contrib/concurrent.py +lib/python3.13/site-packages/tqdm/contrib/discord.py +lib/python3.13/site-packages/tqdm/contrib/itertools.py +lib/python3.13/site-packages/tqdm/contrib/logging.py +lib/python3.13/site-packages/tqdm/contrib/slack.py +lib/python3.13/site-packages/tqdm/contrib/telegram.py +lib/python3.13/site-packages/tqdm/contrib/utils_worker.py +lib/python3.13/site-packages/tqdm/dask.py +lib/python3.13/site-packages/tqdm/gui.py +lib/python3.13/site-packages/tqdm/keras.py +lib/python3.13/site-packages/tqdm/notebook.py +lib/python3.13/site-packages/tqdm/rich.py +lib/python3.13/site-packages/tqdm/std.py +lib/python3.13/site-packages/tqdm/tk.py +lib/python3.13/site-packages/tqdm/tqdm.1 +lib/python3.13/site-packages/tqdm/utils.py +lib/python3.13/site-packages/tqdm/version.py diff --git a/miniconda3/pkgs/tqdm-4.67.3-py313h7040dfc_1/info/git b/miniconda3/pkgs/tqdm-4.67.3-py313h7040dfc_1/info/git new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/miniconda3/pkgs/tqdm-4.67.3-py313h7040dfc_1/info/has_prefix b/miniconda3/pkgs/tqdm-4.67.3-py313h7040dfc_1/info/has_prefix new file mode 100644 index 0000000000000000000000000000000000000000..1ba11f71fea5efe1ca7f373f9c55d5cb2485373b --- /dev/null +++ b/miniconda3/pkgs/tqdm-4.67.3-py313h7040dfc_1/info/has_prefix @@ -0,0 +1 @@ +/home/task_177139827237424/croot/tqdm_1771398701478/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placeh text bin/tqdm diff --git a/miniconda3/pkgs/tqdm-4.67.3-py313h7040dfc_1/info/hash_input.json b/miniconda3/pkgs/tqdm-4.67.3-py313h7040dfc_1/info/hash_input.json new file mode 100644 index 0000000000000000000000000000000000000000..dd28b5758980f000eda15e465ed631d4a7b8fafe --- /dev/null +++ b/miniconda3/pkgs/tqdm-4.67.3-py313h7040dfc_1/info/hash_input.json @@ -0,0 +1,5 @@ +{ + "numpy": "2.1", + "target_platform": "linux-64", + "channel_targets": "defaults" +} \ No newline at end of file diff --git a/miniconda3/pkgs/tqdm-4.67.3-py313h7040dfc_1/info/index.json b/miniconda3/pkgs/tqdm-4.67.3-py313h7040dfc_1/info/index.json new file mode 100644 index 0000000000000000000000000000000000000000..cf459ed99c507501e8943e79716f1b468d7e393b --- /dev/null +++ b/miniconda3/pkgs/tqdm-4.67.3-py313h7040dfc_1/info/index.json @@ -0,0 +1,19 @@ +{ + "arch": "x86_64", + "build": "py313h7040dfc_1", + "build_number": 1, + "constrains": [ + "ipywidgets >=6" + ], + "depends": [ + "python >=3.13,<3.14.0a0", + "python_abi 3.13.* *_cp313" + ], + "license": "MPL-2.0 AND MIT", + "license_family": "MOZILLA", + "name": "tqdm", + "platform": "linux", + "subdir": "linux-64", + "timestamp": 1771398721582, + "version": "4.67.3" +} \ No newline at end of file diff --git a/miniconda3/pkgs/tqdm-4.67.3-py313h7040dfc_1/info/licenses/LICENCE b/miniconda3/pkgs/tqdm-4.67.3-py313h7040dfc_1/info/licenses/LICENCE new file mode 100644 index 0000000000000000000000000000000000000000..194caf554f8f10ba4cac8a81b631a61d0d81f60d --- /dev/null +++ b/miniconda3/pkgs/tqdm-4.67.3-py313h7040dfc_1/info/licenses/LICENCE @@ -0,0 +1,49 @@ +`tqdm` is a product of collaborative work. +Unless otherwise stated, all authors (see commit logs) retain copyright +for their respective work, and release the work under the MIT licence +(text below). + +Exceptions or notable authors are listed below +in reverse chronological order: + +* files: * + MPL-2.0 2015-2026 (c) Casper da Costa-Luis + [casperdcl](https://github.com/casperdcl). +* files: tqdm/_tqdm.py + MIT 2016 (c) [PR #96] on behalf of Google Inc. +* files: tqdm/_tqdm.py README.rst .gitignore + MIT 2013 (c) Noam Yorav-Raphael, original author. + +[PR #96]: https://github.com/tqdm/tqdm/pull/96 + + +Mozilla Public Licence (MPL) v. 2.0 - Exhibit A +----------------------------------------------- + +This Source Code Form is subject to the terms of the +Mozilla Public License, v. 2.0. +If a copy of the MPL was not distributed with this project, +You can obtain one at https://mozilla.org/MPL/2.0/. + + +MIT License (MIT) +----------------- + +Copyright (c) 2013 noamraph + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/miniconda3/pkgs/tqdm-4.67.3-py313h7040dfc_1/info/paths.json b/miniconda3/pkgs/tqdm-4.67.3-py313h7040dfc_1/info/paths.json new file mode 100644 index 0000000000000000000000000000000000000000..997198366b2d6c25d3ca7aafe9c527fa26bb1220 --- /dev/null +++ b/miniconda3/pkgs/tqdm-4.67.3-py313h7040dfc_1/info/paths.json @@ -0,0 +1,451 @@ +{ + "paths": [ + { + "_path": "bin/tqdm", + "file_mode": "text", + "path_type": "hardlink", + "prefix_placeholder": "/home/task_177139827237424/croot/tqdm_1771398701478/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placeh", + "sha256": "236e1fdbbbd2bfc72d44b1b6e3a4c7263b2495d18f54b19d5436e8091cf627b3", + "size_in_bytes": 461 + }, + { + "_path": "lib/python3.13/site-packages/tqdm-4.67.3.dist-info/INSTALLER", + "path_type": "hardlink", + "sha256": "d0edee15f91b406f3f99726e44eb990be6e34fd0345b52b910c568e0eef6a2a8", + "size_in_bytes": 5 + }, + { + "_path": "lib/python3.13/site-packages/tqdm-4.67.3.dist-info/METADATA", + "path_type": "hardlink", + "sha256": "7c0e9a662c19095f339a4b761201eb06cff9c61fb9581535b2f96f44e718ed29", + "size_in_bytes": 57679 + }, + { + "_path": "lib/python3.13/site-packages/tqdm-4.67.3.dist-info/RECORD", + "path_type": "hardlink", + "sha256": "b2c352fab9cc0ad682d2fb77c4487231483ebd0ba465a8929bf0a903377b0239", + "size_in_bytes": 4721 + }, + { + "_path": "lib/python3.13/site-packages/tqdm-4.67.3.dist-info/REQUESTED", + "path_type": "hardlink", + "sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "size_in_bytes": 0 + }, + { + "_path": "lib/python3.13/site-packages/tqdm-4.67.3.dist-info/WHEEL", + "path_type": "hardlink", + "sha256": "c14c80f0e6ae95195b7f032d990b2f367806af140702f90a72f466762ce5262d", + "size_in_bytes": 92 + }, + { + "_path": "lib/python3.13/site-packages/tqdm-4.67.3.dist-info/direct_url.json", + "path_type": "hardlink", + "sha256": "9c2b83e8f39f9cbd6d685f689b40ae593fdedf36cd096f67a53f05679828bf00", + "size_in_bytes": 90 + }, + { + "_path": "lib/python3.13/site-packages/tqdm-4.67.3.dist-info/entry_points.txt", + "path_type": "hardlink", + "sha256": "45e2421fb522dd9ca1e8cd7a1383a1b19d6853b5ad31709f6eda3206118edbd6", + "size_in_bytes": 39 + }, + { + "_path": "lib/python3.13/site-packages/tqdm-4.67.3.dist-info/licenses/LICENCE", + "path_type": "hardlink", + "sha256": "fcff87c3a47ce8028a8512aa182d4fcf0ad1c90544ee75cf9b343684cac194de", + "size_in_bytes": 1985 + }, + { + "_path": "lib/python3.13/site-packages/tqdm-4.67.3.dist-info/top_level.txt", + "path_type": "hardlink", + "sha256": "34b89424d7e673d02dd79b3b254462c2fa8c123522f46e4f30646b98c6333523", + "size_in_bytes": 5 + }, + { + "_path": "lib/python3.13/site-packages/tqdm/__init__.py", + "path_type": "hardlink", + "sha256": "f6640d6124aa3fdf496acb9b102d4f3892cc9a1924047e9c259c4f211e46da94", + "size_in_bytes": 1572 + }, + { + "_path": "lib/python3.13/site-packages/tqdm/__main__.py", + "path_type": "hardlink", + "sha256": "6d8b7d7846a845059d7a3107143f11131f63c5511d669b44085b15ec5e3d2279", + "size_in_bytes": 30 + }, + { + "_path": "lib/python3.13/site-packages/tqdm/__pycache__/__init__.cpython-313.pyc", + "path_type": "hardlink", + "sha256": "d9d237a3ec726103df59c8f21c31193cc2857a44f69681ee61a9db9e47cd6dbb", + "size_in_bytes": 1630 + }, + { + "_path": "lib/python3.13/site-packages/tqdm/__pycache__/__main__.cpython-313.pyc", + "path_type": "hardlink", + "sha256": "b7c346e3e520ecf960cfe9f5bd665fd66401375a78c02026bc395d97f236c36e", + "size_in_bytes": 196 + }, + { + "_path": "lib/python3.13/site-packages/tqdm/__pycache__/_main.cpython-313.pyc", + "path_type": "hardlink", + "sha256": "0578f2fde3ca29d339f09ea79efdb9b121dbd4d8f73c14216ced39ef92cb1db4", + "size_in_bytes": 438 + }, + { + "_path": "lib/python3.13/site-packages/tqdm/__pycache__/_monitor.cpython-313.pyc", + "path_type": "hardlink", + "sha256": "974339a2a7c430cd5b6f8a7913085416913707e960ef710c2f4c063b8a9fa8d1", + "size_in_bytes": 4249 + }, + { + "_path": "lib/python3.13/site-packages/tqdm/__pycache__/_tqdm.cpython-313.pyc", + "path_type": "hardlink", + "sha256": "ce1bc464d10fd5a380011dbe501cd15b87f5468890dd8fc5376d3f207e9ade85", + "size_in_bytes": 433 + }, + { + "_path": "lib/python3.13/site-packages/tqdm/__pycache__/_tqdm_gui.cpython-313.pyc", + "path_type": "hardlink", + "sha256": "67a186a798ce55962b1536f7501889248bc3c7bdc7558ead32e0bbf56732d4e8", + "size_in_bytes": 446 + }, + { + "_path": "lib/python3.13/site-packages/tqdm/__pycache__/_tqdm_notebook.cpython-313.pyc", + "path_type": "hardlink", + "sha256": "e7db2ee86f9c499bdb4f65e957ede8a4d54a7e8ebbb458a90943ac1a7cbb8adc", + "size_in_bytes": 467 + }, + { + "_path": "lib/python3.13/site-packages/tqdm/__pycache__/_tqdm_pandas.cpython-313.pyc", + "path_type": "hardlink", + "sha256": "d2e11de2cae06266ea8603844dcd654f44222cf71c9d13148c05650fdd8cfc46", + "size_in_bytes": 1373 + }, + { + "_path": "lib/python3.13/site-packages/tqdm/__pycache__/_utils.cpython-313.pyc", + "path_type": "hardlink", + "sha256": "55c9cf19a8bacbe0ce5953a1f5872125f6327a415494faebdc718f3d763431f5", + "size_in_bytes": 845 + }, + { + "_path": "lib/python3.13/site-packages/tqdm/__pycache__/asyncio.cpython-313.pyc", + "path_type": "hardlink", + "sha256": "454c92827750fe80797c17fc0f0de376c49d86eaf3ab2c9a1e9335acbb77f119", + "size_in_bytes": 4493 + }, + { + "_path": "lib/python3.13/site-packages/tqdm/__pycache__/auto.cpython-313.pyc", + "path_type": "hardlink", + "sha256": "e0656562b9f63836372e73f467a5e4bdc405f7cff2ccddb9ea2613bab885f703", + "size_in_bytes": 1357 + }, + { + "_path": "lib/python3.13/site-packages/tqdm/__pycache__/autonotebook.cpython-313.pyc", + "path_type": "hardlink", + "sha256": "be40e0a15256a61bd4fce9264aed9d1cc89eb8876d9eba1629332e80fda90796", + "size_in_bytes": 1212 + }, + { + "_path": "lib/python3.13/site-packages/tqdm/__pycache__/cli.cpython-313.pyc", + "path_type": "hardlink", + "sha256": "173133299878e01e9f7a12c277feb820384e8a37a3905faf332fe6b4c2859d00", + "size_in_bytes": 15580 + }, + { + "_path": "lib/python3.13/site-packages/tqdm/__pycache__/dask.cpython-313.pyc", + "path_type": "hardlink", + "sha256": "3da58579bf67472e506a9922f0e5163a3f7c1dba4c3e2d874f8f3d320f4077bf", + "size_in_bytes": 2533 + }, + { + "_path": "lib/python3.13/site-packages/tqdm/__pycache__/gui.cpython-313.pyc", + "path_type": "hardlink", + "sha256": "a3cb9f6be4f754edbf8e642b5790437097e641701a6f46f4fcd458cd862143b8", + "size_in_bytes": 7923 + }, + { + "_path": "lib/python3.13/site-packages/tqdm/__pycache__/keras.cpython-313.pyc", + "path_type": "hardlink", + "sha256": "b99d116c81005ce8165ba20d374f804a87d3bc2e95c52b8b81c527332b7fff71", + "size_in_bytes": 6904 + }, + { + "_path": "lib/python3.13/site-packages/tqdm/__pycache__/notebook.cpython-313.pyc", + "path_type": "hardlink", + "sha256": "8f577ca94fa8528058d2b6f2fd675dd12ef4ce29f1b4a021f54c9a0ac2a868b8", + "size_in_bytes": 11786 + }, + { + "_path": "lib/python3.13/site-packages/tqdm/__pycache__/rich.cpython-313.pyc", + "path_type": "hardlink", + "sha256": "6b5ea381de94741a9394b0fba65ebcbc80bd568f1163f83ec33058da83d3e8e0", + "size_in_bytes": 7230 + }, + { + "_path": "lib/python3.13/site-packages/tqdm/__pycache__/std.cpython-313.pyc", + "path_type": "hardlink", + "sha256": "cf7c713e92b88515ebb244bf4744781b530d09443307bf56700db273c4395dbb", + "size_in_bytes": 63888 + }, + { + "_path": "lib/python3.13/site-packages/tqdm/__pycache__/tk.cpython-313.pyc", + "path_type": "hardlink", + "sha256": "851c494afdbaa9f509a416f22c187bc554d27e8052229d6f5d8a0638f3a637e4", + "size_in_bytes": 9961 + }, + { + "_path": "lib/python3.13/site-packages/tqdm/__pycache__/utils.cpython-313.pyc", + "path_type": "hardlink", + "sha256": "7ebada8070f75bb8efbd15bd830b4cfe6e6b1f88cc15d53fa14ca32ca1cc34e3", + "size_in_bytes": 18827 + }, + { + "_path": "lib/python3.13/site-packages/tqdm/__pycache__/version.cpython-313.pyc", + "path_type": "hardlink", + "sha256": "8ed714c23da2ca6c666b887e3ae0b1157cfcaeafcba3eca78834c3a71adfa01f", + "size_in_bytes": 550 + }, + { + "_path": "lib/python3.13/site-packages/tqdm/_main.py", + "path_type": "hardlink", + "sha256": "f724af8268bfd92c38080a395035b44367717d3af26e8116187a217c2273d2c0", + "size_in_bytes": 283 + }, + { + "_path": "lib/python3.13/site-packages/tqdm/_monitor.py", + "path_type": "hardlink", + "sha256": "524bbe0cf5a0cc9edd3b908ad3cc4a24af84fc5eaa43e241de4b2e5dccd2611d", + "size_in_bytes": 3699 + }, + { + "_path": "lib/python3.13/site-packages/tqdm/_tqdm.py", + "path_type": "hardlink", + "sha256": "2df2c2b89e9ba6c568f718a59ad057c849b5bc69d4085ae5896f398f727e9c3e", + "size_in_bytes": 283 + }, + { + "_path": "lib/python3.13/site-packages/tqdm/_tqdm_gui.py", + "path_type": "hardlink", + "sha256": "d371dcf0a6b2c49bde89e239fb4fb6346883a4bbf0f6365e9287c9515ec20b09", + "size_in_bytes": 287 + }, + { + "_path": "lib/python3.13/site-packages/tqdm/_tqdm_notebook.py", + "path_type": "hardlink", + "sha256": "06e1e22eec6eeae11f64568f256dd13e93dac5a55cb44400de47522520cbd61c", + "size_in_bytes": 307 + }, + { + "_path": "lib/python3.13/site-packages/tqdm/_tqdm_pandas.py", + "path_type": "hardlink", + "sha256": "73d8e9b5482280de9ac510e145de1189ff7c4e6c5ea297359c5345848a5b1541", + "size_in_bytes": 888 + }, + { + "_path": "lib/python3.13/site-packages/tqdm/_utils.py", + "path_type": "hardlink", + "sha256": "ff813bddb7c38f87f5b37b0ce3634b1cdad90ce9228d9a16abe9fac562e4759f", + "size_in_bytes": 553 + }, + { + "_path": "lib/python3.13/site-packages/tqdm/asyncio.py", + "path_type": "hardlink", + "sha256": "2a9dab4a43517fd291a9adddf58a6079943b2fb1197f62a2e1b49ced43c8ca8a", + "size_in_bytes": 2757 + }, + { + "_path": "lib/python3.13/site-packages/tqdm/auto.py", + "path_type": "hardlink", + "sha256": "9c365f963ea9db32a48c108d068babae14bcd7361f672d7f750bdb724add5bca", + "size_in_bytes": 871 + }, + { + "_path": "lib/python3.13/site-packages/tqdm/autonotebook.py", + "path_type": "hardlink", + "sha256": "61bf45e6e6a204f85f6c30c5a5bb681bc236614c37b9027cf6b5032db7d1eb0b", + "size_in_bytes": 956 + }, + { + "_path": "lib/python3.13/site-packages/tqdm/cli.py", + "path_type": "hardlink", + "sha256": "a2b11a6a1a83101199475b827135bc0648523c48419523b404a61b27542073a9", + "size_in_bytes": 10994 + }, + { + "_path": "lib/python3.13/site-packages/tqdm/completion.sh", + "path_type": "hardlink", + "sha256": "8fbf4a6d29a9223fc4d758df4df057ac69d44f3297569435bc6550becc83465e", + "size_in_bytes": 946 + }, + { + "_path": "lib/python3.13/site-packages/tqdm/contrib/__init__.py", + "path_type": "hardlink", + "sha256": "d46318604f3ae960af94783931d9b33af3ec423e19b8c957cf3f317117090fad", + "size_in_bytes": 2479 + }, + { + "_path": "lib/python3.13/site-packages/tqdm/contrib/__pycache__/__init__.cpython-313.pyc", + "path_type": "hardlink", + "sha256": "ca3f01a9ea0327c224d0cc68a532ae03e2b3ff4c113dc6b5fdd542a6fe2abe5e", + "size_in_bytes": 4199 + }, + { + "_path": "lib/python3.13/site-packages/tqdm/contrib/__pycache__/bells.cpython-313.pyc", + "path_type": "hardlink", + "sha256": "5da2bf59e3ba742d66c4084a25b9adb95771cf4be03dac2e9db39dc40db44046", + "size_in_bytes": 1352 + }, + { + "_path": "lib/python3.13/site-packages/tqdm/contrib/__pycache__/concurrent.cpython-313.pyc", + "path_type": "hardlink", + "sha256": "0abba90f9f8e61181b568e6086d4645ad6032025890ff393a453e82f13b204f5", + "size_in_bytes": 4501 + }, + { + "_path": "lib/python3.13/site-packages/tqdm/contrib/__pycache__/discord.cpython-313.pyc", + "path_type": "hardlink", + "sha256": "ed8c8aca6cab9df89f673823c2f75ab889a5f0f979fda7f611792537bb2ed6fa", + "size_in_bytes": 8128 + }, + { + "_path": "lib/python3.13/site-packages/tqdm/contrib/__pycache__/itertools.cpython-313.pyc", + "path_type": "hardlink", + "sha256": "3a8be1aea0e0dff402585a394968d3627aa65188d87a207623ef4074f22b50c0", + "size_in_bytes": 1385 + }, + { + "_path": "lib/python3.13/site-packages/tqdm/contrib/__pycache__/logging.cpython-313.pyc", + "path_type": "hardlink", + "sha256": "13b3ae02faa62abc5e443e51850c82ff2cbccc02b2bcba5c9b16920e99c1458e", + "size_in_bytes": 5072 + }, + { + "_path": "lib/python3.13/site-packages/tqdm/contrib/__pycache__/slack.cpython-313.pyc", + "path_type": "hardlink", + "sha256": "4aa7d6cfe408c32eea307b5280e670e914400995cd7a6aa463d14c7685c62388", + "size_in_bytes": 6089 + }, + { + "_path": "lib/python3.13/site-packages/tqdm/contrib/__pycache__/telegram.cpython-313.pyc", + "path_type": "hardlink", + "sha256": "2f767ccaacc55c8323270db1d4a1f1e81d3c99ef7689ecbeb29d463e4c1512a3", + "size_in_bytes": 7767 + }, + { + "_path": "lib/python3.13/site-packages/tqdm/contrib/__pycache__/utils_worker.cpython-313.pyc", + "path_type": "hardlink", + "sha256": "9480e4a6479e709fc7777812e4bc6efa19755d31240a9a312f114ba7ea68c251", + "size_in_bytes": 2107 + }, + { + "_path": "lib/python3.13/site-packages/tqdm/contrib/bells.py", + "path_type": "hardlink", + "sha256": "631d47a860a61eb1120803bbd348f9c04fff24295e34e0c9c5e761d628cf2c3d", + "size_in_bytes": 837 + }, + { + "_path": "lib/python3.13/site-packages/tqdm/contrib/concurrent.py", + "path_type": "hardlink", + "sha256": "2b5ca3968292e5644d1728cb46d8740e65393c09c36c5d00f860f6ecdf89e1af", + "size_in_bytes": 3986 + }, + { + "_path": "lib/python3.13/site-packages/tqdm/contrib/discord.py", + "path_type": "hardlink", + "sha256": "32d5482f5b3f7711f6d46e2c2fc141810e167a2db7868f449394fe0289a6bcd7", + "size_in_bytes": 5243 + }, + { + "_path": "lib/python3.13/site-packages/tqdm/contrib/itertools.py", + "path_type": "hardlink", + "sha256": "59d28a414e5e4b3b2a1eedbd48dfe81f5da1b98668d098a1aa88bdfa7561c33e", + "size_in_bytes": 774 + }, + { + "_path": "lib/python3.13/site-packages/tqdm/contrib/logging.py", + "path_type": "hardlink", + "sha256": "36c62d9cab6d8f698cac69b9f2611da396bd0cfff6beff29672ae2992b96ba50", + "size_in_bytes": 3760 + }, + { + "_path": "lib/python3.13/site-packages/tqdm/contrib/slack.py", + "path_type": "hardlink", + "sha256": "78ffccaf9b10a27627887c7140d1ae7b78e4d899083e63d6159a886319ceba2d", + "size_in_bytes": 4007 + }, + { + "_path": "lib/python3.13/site-packages/tqdm/contrib/telegram.py", + "path_type": "hardlink", + "sha256": "be7ffd4804cc6dbc27d8f01bcd20f2397e9abf7781074d5006e835d4fe07f8e8", + "size_in_bytes": 5008 + }, + { + "_path": "lib/python3.13/site-packages/tqdm/contrib/utils_worker.py", + "path_type": "hardlink", + "sha256": "bdac722726a06303824172d431df3a6c26c8e2c3ea672b2e3066c34869af116a", + "size_in_bytes": 1199 + }, + { + "_path": "lib/python3.13/site-packages/tqdm/dask.py", + "path_type": "hardlink", + "sha256": "f448b9f1e56a4e8b2c44b8407d6c9414276e5d82a398b9b091a5c8cbe08761fb", + "size_in_bytes": 1319 + }, + { + "_path": "lib/python3.13/site-packages/tqdm/gui.py", + "path_type": "hardlink", + "sha256": "493201dcaf220f30e090d52a588a6f708feed0e1ad6c6372e4dc2900b5e17d6b", + "size_in_bytes": 5479 + }, + { + "_path": "lib/python3.13/site-packages/tqdm/keras.py", + "path_type": "hardlink", + "sha256": "a29f6c0646faaba73a770db0274483d99c293caef233555b838975422cb7308a", + "size_in_bytes": 4373 + }, + { + "_path": "lib/python3.13/site-packages/tqdm/notebook.py", + "path_type": "hardlink", + "sha256": "b1c8334509836332056a0ff581187df0b86d65dbb78a0db2ae665daaf960a29b", + "size_in_bytes": 10802 + }, + { + "_path": "lib/python3.13/site-packages/tqdm/rich.py", + "path_type": "hardlink", + "sha256": "63230f9041d5c98515511dda74929b557dba89398d2a934c7f70c4aa69be9bad", + "size_in_bytes": 5021 + }, + { + "_path": "lib/python3.13/site-packages/tqdm/std.py", + "path_type": "hardlink", + "sha256": "4a4db84b039de7d86935b6f450bf18dfff2e79198bdffe4eef6572d9729ab231", + "size_in_bytes": 57510 + }, + { + "_path": "lib/python3.13/site-packages/tqdm/tk.py", + "path_type": "hardlink", + "sha256": "1aed2ec17c0b0863d1187391762dd6bc12c68ac794a7fc715ff87f829f55a4ad", + "size_in_bytes": 6701 + }, + { + "_path": "lib/python3.13/site-packages/tqdm/tqdm.1", + "path_type": "hardlink", + "sha256": "703ca8ea14b291779d2773dcc79b64a204756a2dd05d19eb27431b47619df7eb", + "size_in_bytes": 7581 + }, + { + "_path": "lib/python3.13/site-packages/tqdm/utils.py", + "path_type": "hardlink", + "sha256": "76919951eaa82cf8a733e904b142d349ed84de3ce9f3052e9cbe9e2b39183a09", + "size_in_bytes": 11810 + }, + { + "_path": "lib/python3.13/site-packages/tqdm/version.py", + "path_type": "hardlink", + "sha256": "a013357823930d90c66477df36a95e8574de41d29dada71c90d00468c4663e33", + "size_in_bytes": 337 + } + ], + "paths_version": 1 +} \ No newline at end of file diff --git a/miniconda3/pkgs/tqdm-4.67.3-py313h7040dfc_1/info/recipe/conda_build_config.yaml b/miniconda3/pkgs/tqdm-4.67.3-py313h7040dfc_1/info/recipe/conda_build_config.yaml new file mode 100644 index 0000000000000000000000000000000000000000..96cae3fe254e40268244ac2413ae2e7b67a81063 --- /dev/null +++ b/miniconda3/pkgs/tqdm-4.67.3-py313h7040dfc_1/info/recipe/conda_build_config.yaml @@ -0,0 +1,28 @@ +c_compiler: gcc +channel_targets: defaults +cpu_optimization_target: nocona +cran_mirror: https://cran.r-project.org +cxx_compiler: gxx +extend_keys: +- ignore_version +- ignore_build_only_deps +- extend_keys +- pin_run_as_build +fortran_compiler: gfortran +ignore_build_only_deps: +- python +- numpy +lua: '5' +numpy: '2.1' +perl: 5.26.2 +pin_run_as_build: + python: + max_pin: x.x + min_pin: x.x + r-base: + max_pin: x.x + min_pin: x.x +platform: linux-64 +python: '3.13' +r_base: '3.5' +target_platform: linux-64 diff --git a/miniconda3/pkgs/tqdm-4.67.3-py313h7040dfc_1/info/recipe/meta.yaml b/miniconda3/pkgs/tqdm-4.67.3-py313h7040dfc_1/info/recipe/meta.yaml new file mode 100644 index 0000000000000000000000000000000000000000..13e52f1085478985d9cff4cf1c09ded66b760576 --- /dev/null +++ b/miniconda3/pkgs/tqdm-4.67.3-py313h7040dfc_1/info/recipe/meta.yaml @@ -0,0 +1,105 @@ +# This file created by conda-build 25.11.1 +# meta.yaml template originally from: +# /home/task_177139827237424/tqdm-feedstock/recipe, last modified Wed Feb 18 07:11:19 2026 +# ------------------------------------------------ + +package: + name: tqdm + version: 4.67.3 +source: + url: https://pypi.org/packages/source/t/tqdm/tqdm-4.67.3.tar.gz + sha256: 7d825f03f89244ef73f1d4ce193cb1774a8179fd96f31d7e1dcde62092b960bb +build: + number: '1' + script: /home/task_177139827237424/croot/tqdm_1771398701478/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placeh/bin/python + -m pip install . --no-deps --no-build-isolation -vv + entry_points: + - tqdm = tqdm.cli:main + string: py313h7040dfc_1 +requirements: + host: + - _libgcc_mutex 0.1 main + - _openmp_mutex 5.1 1_gnu + - bzip2 1.0.8 h5eee18b_6 + - ca-certificates 2025.12.2 h06a4308_0 + - ld_impl_linux-64 2.44 h153f514_2 + - libexpat 2.7.4 h7354ed3_0 + - libffi 3.4.4 h6a678d5_1 + - libgcc 15.2.0 h69a1729_7 + - libgcc-ng 15.2.0 h166f726_7 + - libgomp 15.2.0 h4751f2c_7 + - libmpdec 4.0.0 h5eee18b_0 + - libstdcxx 15.2.0 h39759b7_7 + - libstdcxx-ng 15.2.0 hc03a8fd_7 + - libuuid 1.41.5 h5eee18b_0 + - libxcb 1.17.0 h9b100fa_0 + - libzlib 1.3.1 hb25bd0a_0 + - ncurses 6.5 h7934f7d_0 + - openssl 3.0.19 h1b28b03_0 + - packaging 25.0 py313h06a4308_1 + - pip 26.0.1 pyhc872135_0 + - pthread-stubs 0.3 h0ce48e5_1 + - python 3.13.11 hcf712cf_100_cp313 + - python_abi 3.13 3_cp313 + - readline 8.3 hc2a1206_0 + - setuptools 80.10.2 py313h06a4308_0 + - setuptools-scm 9.2.2 py313h06a4308_0 + - setuptools_scm 9.2.2 hd3eb1b0_0 + - sqlite 3.51.1 he0a8d7e_0 + - tk 8.6.15 h54e0aa7_0 + - toml 0.10.2 pyhd3eb1b0_0 + - tzdata 2025c he532380_0 + - wheel 0.46.3 py313h06a4308_0 + - xorg-libx11 1.8.12 h9b100fa_1 + - xorg-libxau 1.0.12 h9b100fa_0 + - xorg-libxdmcp 1.1.5 h9b100fa_0 + - xorg-xorgproto 2024.1 h5eee18b_1 + - xz 5.6.4 h5eee18b_1 + - zlib 1.3.1 hb25bd0a_0 + run: + - python >=3.13,<3.14.0a0 + - python_abi 3.13.* *_cp313 + run_constrained: + - ipywidgets >=6 +test: + requires: + - dask-core + - numpy + - pandas + - pip + - pytest >=6 + - pytest-asyncio >=0.24 + - pytest-timeout + - pytest-xdist + - rich + - ripgrep + source_files: + - pyproject.toml + - tests + imports: + - tqdm + commands: + - pip check + - tqdm --help + - tqdm -v | rg 4.67.3 + - pytest -k "not tests_perf" tests/ -W ignore::FutureWarning --deselect=tests/tests_pandas.py::test_pandas_leave +about: + home: https://tqdm.github.io + license: MPL-2.0 AND MIT + license_family: MOZILLA + license_file: LICENCE + summary: A Fast, Extensible Progress Meter + description: A Fast, Extensible Progress Bar for Python and CLI + dev_url: https://github.com/tqdm/tqdm + doc_url: https://tqdm.github.io +extra: + recipe-maintainers: + - casperdcl + - pmlandwehr + final: true + copy_test_source_files: true + remote_url: https://github.com/AnacondaRecipes/tqdm-feedstock + sha: a613e99b814652e0ad950865f5a5652931c33446 + task_id: TQ--YoKyRRKs5-y4aFJpTw + task_run_id: '0' + pbp_graph_uuid: 6a08bd9f-8cb8-48ae-aba9-77f75a5e5a1a diff --git a/miniconda3/pkgs/tqdm-4.67.3-py313h7040dfc_1/info/recipe/meta.yaml.template b/miniconda3/pkgs/tqdm-4.67.3-py313h7040dfc_1/info/recipe/meta.yaml.template new file mode 100644 index 0000000000000000000000000000000000000000..9da7d2d950804f8704ee12d5b2a130317bd43243 --- /dev/null +++ b/miniconda3/pkgs/tqdm-4.67.3-py313h7040dfc_1/info/recipe/meta.yaml.template @@ -0,0 +1,76 @@ +{% set name = "tqdm" %} +{% set version = "4.67.3" %} + +package: + name: {{ name }} + version: {{ version }} + +source: + url: https://pypi.org/packages/source/{{ name[0] }}/{{ name }}/{{ name }}-{{ version }}.tar.gz + sha256: 7d825f03f89244ef73f1d4ce193cb1774a8179fd96f31d7e1dcde62092b960bb + +build: + number: 1 + script: {{ PYTHON }} -m pip install . --no-deps --no-build-isolation -vv + entry_points: + - tqdm = tqdm.cli:main + skip: true # [py<37] + +requirements: + host: + - python + - pip + - setuptools_scm >=3.4 + - setuptools >=42 + - toml + - wheel + run: + - python + - colorama # [win] + run_constrained: + - ipywidgets >=6 + +{% set deselect_tests = "" %} +# E FileNotFoundError: [WinError 2] The system cannot find the file specified +{% set deselect_tests = deselect_tests + " --deselect=tests/tests_main.py::test_pipes" %} # [win] +# test_pandas_leave can raise AssertionError randomly on different platforms +{% set deselect_tests = deselect_tests + " --deselect=tests/tests_pandas.py::test_pandas_leave" %} + + +test: + requires: + - dask-core + - pandas + - numpy + - pip + - pytest >=6 + - pytest-timeout + - pytest-xdist + - pytest-asyncio >=0.24 + - rich + - ripgrep + source_files: + - tests + - pyproject.toml + imports: + - tqdm + commands: + - pip check + - tqdm --help + - tqdm -v | rg {{ version }} + - pytest -k "not tests_perf" tests/ -W ignore::FutureWarning {{ deselect_tests }} + +about: + home: https://tqdm.github.io + license: MPL-2.0 AND MIT + license_family: MOZILLA + license_file: LICENCE + summary: A Fast, Extensible Progress Meter + description: A Fast, Extensible Progress Bar for Python and CLI + dev_url: https://github.com/tqdm/tqdm + doc_url: https://tqdm.github.io + +extra: + recipe-maintainers: + - casperdcl + - pmlandwehr \ No newline at end of file diff --git a/miniconda3/pkgs/tqdm-4.67.3-py313h7040dfc_1/info/repodata_record.json b/miniconda3/pkgs/tqdm-4.67.3-py313h7040dfc_1/info/repodata_record.json new file mode 100644 index 0000000000000000000000000000000000000000..d29bff3a436ed9fa97996c028b2ede8aeb2d4886 --- /dev/null +++ b/miniconda3/pkgs/tqdm-4.67.3-py313h7040dfc_1/info/repodata_record.json @@ -0,0 +1,25 @@ +{ + "arch": "x86_64", + "build": "py313h7040dfc_1", + "build_number": 1, + "channel": "https://repo.anaconda.com/pkgs/main/linux-64/", + "constrains": [ + "ipywidgets >=6" + ], + "depends": [ + "python >=3.13,<3.14.0a0", + "python_abi 3.13.* *_cp313" + ], + "fn": "tqdm-4.67.3-py313h7040dfc_1.conda", + "license": "MPL-2.0 AND MIT", + "license_family": "MOZILLA", + "md5": "17b9f23e939b55ab9cab471b694a79d7", + "name": "tqdm", + "platform": "linux", + "sha256": "2dae6e5073fc7597727f5fc968f2a7be9fcb5f464d684d6d66d9e8664ab5baf6", + "size": 161112, + "subdir": "linux-64", + "timestamp": 1771398721000, + "url": "https://repo.anaconda.com/pkgs/main/linux-64/tqdm-4.67.3-py313h7040dfc_1.conda", + "version": "4.67.3" +} \ No newline at end of file diff --git a/miniconda3/pkgs/tqdm-4.67.3-py313h7040dfc_1/info/test/pyproject.toml b/miniconda3/pkgs/tqdm-4.67.3-py313h7040dfc_1/info/test/pyproject.toml new file mode 100644 index 0000000000000000000000000000000000000000..d892cd22186f3163f3fbcb963d4f9a2a1c993cf2 --- /dev/null +++ b/miniconda3/pkgs/tqdm-4.67.3-py313h7040dfc_1/info/test/pyproject.toml @@ -0,0 +1,136 @@ +[build-system] +requires = ["setuptools>=42", "setuptools-scm[toml]>=3.4"] +build-backend = "setuptools.build_meta" + +[tool.setuptools_scm] + +[tool.setuptools.packages.find] +exclude = ["benchmarks", "examples", "tests", "wiki", "docs", "feedstock"] + +[project.urls] +homepage = "https://tqdm.github.io" +repository = "https://github.com/tqdm/tqdm" +changelog = "https://tqdm.github.io/releases" +wiki = "https://github.com/tqdm/tqdm/wiki" + +[project] +name = "tqdm" +dynamic = ["version"] +maintainers = [{name = "tqdm developers", email = "devs@tqdm.ml"}] +description = "Fast, Extensible Progress Meter" +readme = "README.rst" +requires-python = ">=3.7" +keywords = ["progressbar", "progressmeter", "progress", "bar", "meter", "rate", "eta", "console", "terminal", "time"] +license = {text = "MPL-2.0 AND MIT"} +# Trove classifiers (https://pypi.org/pypi?%3Aaction=list_classifiers) +classifiers = [ + "Development Status :: 5 - Production/Stable", + "Environment :: Console", + "Environment :: MacOS X", + "Environment :: Other Environment", + "Environment :: Win32 (MS Windows)", + "Environment :: X11 Applications", + "Framework :: IPython", + "Framework :: Jupyter", + "Intended Audience :: Developers", + "Intended Audience :: Education", + "Intended Audience :: End Users/Desktop", + "Intended Audience :: Other Audience", + "Intended Audience :: System Administrators", + "Operating System :: MacOS", + "Operating System :: MacOS :: MacOS X", + "Operating System :: Microsoft", + "Operating System :: Microsoft :: MS-DOS", + "Operating System :: Microsoft :: Windows", + "Operating System :: POSIX", + "Operating System :: POSIX :: BSD", + "Operating System :: POSIX :: BSD :: FreeBSD", + "Operating System :: POSIX :: Linux", + "Operating System :: POSIX :: SunOS/Solaris", + "Operating System :: Unix", + "Programming Language :: Python", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.7", + "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: Implementation", + "Programming Language :: Python :: Implementation :: IronPython", + "Programming Language :: Python :: Implementation :: PyPy", + "Programming Language :: Unix Shell", + "Topic :: Desktop Environment", + "Topic :: Education :: Computer Aided Instruction (CAI)", + "Topic :: Education :: Testing", + "Topic :: Office/Business", + "Topic :: Other/Nonlisted Topic", + "Topic :: Software Development :: Build Tools", + "Topic :: Software Development :: Libraries", + "Topic :: Software Development :: Libraries :: Python Modules", + "Topic :: Software Development :: Pre-processors", + "Topic :: Software Development :: User Interfaces", + "Topic :: System :: Installation/Setup", + "Topic :: System :: Logging", + "Topic :: System :: Monitoring", + "Topic :: System :: Shells", + "Topic :: Terminals", + "Topic :: Utilities"] +dependencies = ['colorama; platform_system == "Windows"', 'importlib_metadata; python_version < "3.8"'] + +[project.optional-dependencies] +dev = ["pytest>=6", "pytest-cov", "pytest-timeout", "pytest-asyncio>=0.24", "nbval"] +discord = ["requests"] +slack = ["slack-sdk"] +telegram = ["requests"] +notebook = ["ipywidgets>=6"] + +[project.scripts] +tqdm = "tqdm.cli:main" + +[tool.flake8] +max_line_length = 99 +exclude = [".git", "__pycache__", "build", "dist", ".eggs", ".asv", ".tox", ".ipynb_checkpoints"] + +[tool.yapf] +spaces_before_comment = [15, 20] +arithmetic_precedence_indication = true +allow_split_before_dict_value = false +coalesce_brackets = true +column_limit = 99 +each_dict_entry_on_separate_line = false +space_between_ending_comma_and_closing_bracket = false +split_before_named_assigns = false +split_before_closing_bracket = false +blank_line_before_nested_class_or_def = false + +[tool.isort] +line_length = 99 +multi_line_output = 4 +known_first_party = ["tqdm", "tests"] + +[tool.pytest.ini_options] +minversion = "6.0" +timeout = 30 +log_level = "INFO" +markers = ["asyncio", "slow"] +python_files = ["tests_*.py", "tests_*.ipynb"] +testpaths = ["tests"] +addopts = "-v --tb=short -rxs -W=error --durations=0 --durations-min=0.1 --asyncio-mode=strict" +asyncio_default_fixture_loop_scope = "function" + +[tool.coverage.run] +branch = true +include = ["tqdm/*"] +omit = [ + "tqdm/contrib/bells.py", + "tqdm/contrib/slack.py", + "tqdm/contrib/discord.py", + "tqdm/contrib/telegram.py", + "tqdm/contrib/utils_worker.py"] +relative_files = true +disable_warnings = ["include-ignored"] +[tool.coverage.report] +show_missing = true diff --git a/miniconda3/pkgs/tqdm-4.67.3-py313h7040dfc_1/info/test/run_test.py b/miniconda3/pkgs/tqdm-4.67.3-py313h7040dfc_1/info/test/run_test.py new file mode 100644 index 0000000000000000000000000000000000000000..c8a1bf5d245756808798f722c489eb087a1eb542 --- /dev/null +++ b/miniconda3/pkgs/tqdm-4.67.3-py313h7040dfc_1/info/test/run_test.py @@ -0,0 +1,3 @@ +print("import: 'tqdm'") +import tqdm + diff --git a/miniconda3/pkgs/tqdm-4.67.3-py313h7040dfc_1/info/test/run_test.sh b/miniconda3/pkgs/tqdm-4.67.3-py313h7040dfc_1/info/test/run_test.sh new file mode 100644 index 0000000000000000000000000000000000000000..e3bafe6debb65b573cac13539cd51b11975eb064 --- /dev/null +++ b/miniconda3/pkgs/tqdm-4.67.3-py313h7040dfc_1/info/test/run_test.sh @@ -0,0 +1,11 @@ + + +set -ex + + + +pip check +tqdm --help +tqdm -v | rg 4.67.3 +pytest -k "not tests_perf" tests/ -W ignore::FutureWarning --deselect=tests/tests_pandas.py::test_pandas_leave +exit 0 diff --git a/miniconda3/pkgs/tqdm-4.67.3-py313h7040dfc_1/info/test/test_time_dependencies.json b/miniconda3/pkgs/tqdm-4.67.3-py313h7040dfc_1/info/test/test_time_dependencies.json new file mode 100644 index 0000000000000000000000000000000000000000..6fbe30f08e5df5443844ca5950a17a447924a8dd --- /dev/null +++ b/miniconda3/pkgs/tqdm-4.67.3-py313h7040dfc_1/info/test/test_time_dependencies.json @@ -0,0 +1 @@ +["pytest >=6", "numpy", "dask-core", "pytest-xdist", "pytest-timeout", "pip", "pytest-asyncio >=0.24", "rich", "ripgrep", "pandas"] \ No newline at end of file diff --git a/miniconda3/pkgs/tqdm-4.67.3-py313h7040dfc_1/info/test/tests/__init__.py b/miniconda3/pkgs/tqdm-4.67.3-py313h7040dfc_1/info/test/tests/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/miniconda3/pkgs/tqdm-4.67.3-py313h7040dfc_1/info/test/tests/conftest.py b/miniconda3/pkgs/tqdm-4.67.3-py313h7040dfc_1/info/test/tests/conftest.py new file mode 100644 index 0000000000000000000000000000000000000000..273c79304a899e68472bef94423efb08438529fa --- /dev/null +++ b/miniconda3/pkgs/tqdm-4.67.3-py313h7040dfc_1/info/test/tests/conftest.py @@ -0,0 +1,27 @@ +"""Shared pytest config.""" +import sys + +from pytest import fixture + +from tqdm import tqdm + + +@fixture(autouse=True) +def pretest_posttest(): + """Fixture for all tests ensuring environment cleanup""" + try: + sys.setswitchinterval(1) + except AttributeError: + sys.setcheckinterval(100) # deprecated + + if getattr(tqdm, "_instances", False): + n = len(tqdm._instances) + if n: + tqdm._instances.clear() + raise OSError(f"{n} `tqdm` instances still in existence PRE-test") + yield + if getattr(tqdm, "_instances", False): + n = len(tqdm._instances) + if n: + tqdm._instances.clear() + raise OSError(f"{n} `tqdm` instances still in existence POST-test") diff --git a/miniconda3/pkgs/tqdm-4.67.3-py313h7040dfc_1/info/test/tests/tests_asyncio.py b/miniconda3/pkgs/tqdm-4.67.3-py313h7040dfc_1/info/test/tests/tests_asyncio.py new file mode 100644 index 0000000000000000000000000000000000000000..250e6585d73a7d778f431335c6becd418490a621 --- /dev/null +++ b/miniconda3/pkgs/tqdm-4.67.3-py313h7040dfc_1/info/test/tests/tests_asyncio.py @@ -0,0 +1,133 @@ +"""Tests `tqdm.asyncio`.""" +import asyncio +from functools import partial +from sys import platform +from time import time + +from tqdm.asyncio import tarange, tqdm_asyncio + +from .tests_tqdm import StringIO, closing, mark + +tqdm = partial(tqdm_asyncio, miniters=0, mininterval=0) +trange = partial(tarange, miniters=0, mininterval=0) +as_completed = partial(tqdm_asyncio.as_completed, miniters=0, mininterval=0) +gather = partial(tqdm_asyncio.gather, miniters=0, mininterval=0) + + +def count(start=0, step=1): + i = start + while True: + new_start = yield i + if new_start is None: + i += step + else: + i = new_start + + +async def acount(*args, **kwargs): + for i in count(*args, **kwargs): + yield i + + +@mark.asyncio +async def test_break(): + """Test asyncio break""" + pbar = tqdm(count()) + async for _ in pbar: + break + pbar.close() + + +@mark.asyncio +async def test_generators(capsys): + """Test asyncio generators""" + with tqdm(count(), desc="counter") as pbar: + async for i in pbar: + if i >= 8: + break + _, err = capsys.readouterr() + assert '9it' in err + + acounter = acount() + try: + with tqdm(acounter, desc="async_counter") as pbar: + async for i in pbar: + if i >= 8: + break + finally: + await acounter.aclose() + _, err = capsys.readouterr() + assert '9it' in err + + +@mark.asyncio +async def test_range(): + """Test asyncio range""" + with closing(StringIO()) as our_file: + async for _ in tqdm(range(9), desc="range", file=our_file): + pass + assert '9/9' in our_file.getvalue() + our_file.seek(0) + our_file.truncate() + + async for _ in trange(9, desc="trange", file=our_file): + pass + assert '9/9' in our_file.getvalue() + + +@mark.asyncio +async def test_nested(): + """Test asyncio nested""" + with closing(StringIO()) as our_file: + async for _ in tqdm(trange(9, desc="inner", file=our_file), + desc="outer", file=our_file): + pass + assert 'inner: 100%' in our_file.getvalue() + assert 'outer: 100%' in our_file.getvalue() + + +@mark.asyncio +async def test_coroutines(): + """Test asyncio coroutine.send""" + with closing(StringIO()) as our_file: + with tqdm(count(), file=our_file) as pbar: + async for i in pbar: + if i == 9: + pbar.send(-10) + elif i < 0: + assert i == -9 + break + assert '10it' in our_file.getvalue() + + +@mark.slow +@mark.asyncio +@mark.parametrize("tol", [0.2 if platform.startswith("darwin") else 0.1]) +async def test_as_completed(capsys, tol): + """Test asyncio as_completed""" + for retry in range(3): + t = time() + skew = time() - t + for i in as_completed([asyncio.sleep(0.01 * i) for i in range(30, 0, -1)]): + await i + t = time() - t - 2 * skew + try: + assert 0.3 * (1 - tol) < t < 0.3 * (1 + tol), t + _, err = capsys.readouterr() + assert '30/30' in err + except AssertionError: + if retry == 2: + raise + + +async def double(i): + return i * 2 + + +@mark.asyncio +async def test_gather(capsys): + """Test asyncio gather""" + res = await gather(*map(double, range(30))) + _, err = capsys.readouterr() + assert '30/30' in err + assert res == list(range(0, 30 * 2, 2)) diff --git a/miniconda3/pkgs/tqdm-4.67.3-py313h7040dfc_1/info/test/tests/tests_concurrent.py b/miniconda3/pkgs/tqdm-4.67.3-py313h7040dfc_1/info/test/tests/tests_concurrent.py new file mode 100644 index 0000000000000000000000000000000000000000..5cd439c945c0ef41807a0ad7da9092685004ae1d --- /dev/null +++ b/miniconda3/pkgs/tqdm-4.67.3-py313h7040dfc_1/info/test/tests/tests_concurrent.py @@ -0,0 +1,49 @@ +""" +Tests for `tqdm.contrib.concurrent`. +""" +from pytest import warns + +from tqdm.contrib.concurrent import process_map, thread_map + +from .tests_tqdm import StringIO, TqdmWarning, closing, importorskip, mark, skip + + +def incr(x): + """Dummy function""" + return x + 1 + + +def test_thread_map(): + """Test contrib.concurrent.thread_map""" + with closing(StringIO()) as our_file: + a = range(9) + b = [i + 1 for i in a] + try: + assert thread_map(lambda x: x + 1, a, file=our_file) == b + except ImportError as err: + skip(str(err)) + assert thread_map(incr, a, file=our_file) == b + + +def test_process_map(): + """Test contrib.concurrent.process_map""" + with closing(StringIO()) as our_file: + a = range(9) + b = [i + 1 for i in a] + try: + assert process_map(incr, a, file=our_file) == b + except ImportError as err: + skip(str(err)) + + +@mark.parametrize("iterables,should_warn", [([], False), (['x'], False), ([()], False), + (['x', ()], False), (['x' * 1001], True), + (['x' * 100, ('x',) * 1001], True)]) +def test_chunksize_warning(iterables, should_warn): + """Test contrib.concurrent.process_map chunksize warnings""" + patch = importorskip('unittest.mock').patch + with patch('tqdm.contrib.concurrent._executor_map'): + if should_warn: + warns(TqdmWarning, process_map, incr, *iterables) + else: + process_map(incr, *iterables) diff --git a/miniconda3/pkgs/tqdm-4.67.3-py313h7040dfc_1/info/test/tests/tests_contrib.py b/miniconda3/pkgs/tqdm-4.67.3-py313h7040dfc_1/info/test/tests/tests_contrib.py new file mode 100644 index 0000000000000000000000000000000000000000..65c8cd5588a76cfae5a1e8f0ab502840953e140a --- /dev/null +++ b/miniconda3/pkgs/tqdm-4.67.3-py313h7040dfc_1/info/test/tests/tests_contrib.py @@ -0,0 +1,61 @@ +""" +Tests for `tqdm.contrib`. +""" +import pytest + +from tqdm import tqdm +from tqdm.contrib import tenumerate, tmap, tzip + +from .tests_tqdm import StringIO, closing, importorskip + + +def incr(x): + """Dummy function""" + return x + 1 + + +@pytest.mark.parametrize("tqdm_kwargs", [{}, {"tqdm_class": tqdm}]) +def test_enumerate(tqdm_kwargs): + """Test contrib.tenumerate""" + with closing(StringIO()) as our_file: + a = range(9) + assert list(tenumerate(a, file=our_file, **tqdm_kwargs)) == list(enumerate(a)) + assert list(tenumerate(a, 42, file=our_file, **tqdm_kwargs)) == list( + enumerate(a, 42) + ) + with closing(StringIO()) as our_file: + _ = list(tenumerate(iter(a), file=our_file, **tqdm_kwargs)) + assert "100%" not in our_file.getvalue() + with closing(StringIO()) as our_file: + _ = list(tenumerate(iter(a), file=our_file, total=len(a), **tqdm_kwargs)) + assert "100%" in our_file.getvalue() + + +def test_enumerate_numpy(): + """Test contrib.tenumerate(numpy.ndarray)""" + np = importorskip("numpy") + with closing(StringIO()) as our_file: + a = np.random.random((42, 7)) + assert list(tenumerate(a, file=our_file)) == list(np.ndenumerate(a)) + + +@pytest.mark.parametrize("tqdm_kwargs", [{}, {"tqdm_class": tqdm}]) +def test_zip(tqdm_kwargs): + """Test contrib.tzip""" + with closing(StringIO()) as our_file: + a = range(9) + b = [i + 1 for i in a] + gen = tzip(a, b, file=our_file, **tqdm_kwargs) + assert gen != list(zip(a, b)) + assert list(gen) == list(zip(a, b)) + + +@pytest.mark.parametrize("tqdm_kwargs", [{}, {"tqdm_class": tqdm}]) +def test_map(tqdm_kwargs): + """Test contrib.tmap""" + with closing(StringIO()) as our_file: + a = range(9) + b = [i + 1 for i in a] + gen = tmap(lambda x: x + 1, a, file=our_file, **tqdm_kwargs) + assert gen != b + assert list(gen) == b diff --git a/miniconda3/pkgs/tqdm-4.67.3-py313h7040dfc_1/info/test/tests/tests_contrib_logging.py b/miniconda3/pkgs/tqdm-4.67.3-py313h7040dfc_1/info/test/tests/tests_contrib_logging.py new file mode 100644 index 0000000000000000000000000000000000000000..b8d60b65a7c81b58bb25bf685fc837e52622e821 --- /dev/null +++ b/miniconda3/pkgs/tqdm-4.67.3-py313h7040dfc_1/info/test/tests/tests_contrib_logging.py @@ -0,0 +1,171 @@ +# pylint: disable=missing-module-docstring, missing-class-docstring +# pylint: disable=missing-function-docstring, no-self-use +import logging +import logging.handlers +import sys +from io import StringIO + +import pytest + +from tqdm import tqdm +from tqdm.contrib.logging import _get_first_found_console_logging_handler +from tqdm.contrib.logging import _TqdmLoggingHandler as TqdmLoggingHandler +from tqdm.contrib.logging import logging_redirect_tqdm, tqdm_logging_redirect + +from .tests_tqdm import importorskip + +LOGGER = logging.getLogger(__name__) + +TEST_LOGGING_FORMATTER = logging.Formatter() + + +class CustomTqdm(tqdm): + messages = [] + + @classmethod + def write(cls, s, **__): # pylint: disable=arguments-differ + CustomTqdm.messages.append(s) + + +class ErrorRaisingTqdm(tqdm): + exception_class = RuntimeError + + @classmethod + def write(cls, s, **__): # pylint: disable=arguments-differ + raise ErrorRaisingTqdm.exception_class('fail fast') + + +class TestTqdmLoggingHandler: + def test_should_call_tqdm_write(self): + CustomTqdm.messages = [] + logger = logging.Logger('test') + logger.handlers = [TqdmLoggingHandler(CustomTqdm)] + logger.info('test') + assert CustomTqdm.messages == ['test'] + + def test_should_call_handle_error_if_exception_was_thrown(self): + patch = importorskip('unittest.mock').patch + logger = logging.Logger('test') + ErrorRaisingTqdm.exception_class = RuntimeError + handler = TqdmLoggingHandler(ErrorRaisingTqdm) + logger.handlers = [handler] + with patch.object(handler, 'handleError') as mock: + logger.info('test') + assert mock.called + + @pytest.mark.parametrize('exception_class', [ + KeyboardInterrupt, + SystemExit + ]) + def test_should_not_swallow_certain_exceptions(self, exception_class): + logger = logging.Logger('test') + ErrorRaisingTqdm.exception_class = exception_class + handler = TqdmLoggingHandler(ErrorRaisingTqdm) + logger.handlers = [handler] + with pytest.raises(exception_class): + logger.info('test') + + +class TestGetFirstFoundConsoleLoggingHandler: + def test_should_return_none_for_no_handlers(self): + assert _get_first_found_console_logging_handler([]) is None + + def test_should_return_none_without_stream_handler(self): + handler = logging.handlers.MemoryHandler(capacity=1) + assert _get_first_found_console_logging_handler([handler]) is None + + def test_should_return_none_for_stream_handler_not_stdout_or_stderr(self): + handler = logging.StreamHandler(StringIO()) + assert _get_first_found_console_logging_handler([handler]) is None + + def test_should_return_stream_handler_if_stream_is_stdout(self): + handler = logging.StreamHandler(sys.stdout) + assert _get_first_found_console_logging_handler([handler]) == handler + + def test_should_return_stream_handler_if_stream_is_stderr(self): + handler = logging.StreamHandler(sys.stderr) + assert _get_first_found_console_logging_handler([handler]) == handler + + +class TestRedirectLoggingToTqdm: + def test_should_add_and_remove_tqdm_handler(self): + logger = logging.Logger('test') + with logging_redirect_tqdm(loggers=[logger]): + assert len(logger.handlers) == 1 + assert isinstance(logger.handlers[0], TqdmLoggingHandler) + assert not logger.handlers + + def test_should_remove_and_restore_console_handlers(self): + logger = logging.Logger('test') + stderr_console_handler = logging.StreamHandler(sys.stderr) + stdout_console_handler = logging.StreamHandler(sys.stderr) + logger.handlers = [stderr_console_handler, stdout_console_handler] + with logging_redirect_tqdm(loggers=[logger]): + assert len(logger.handlers) == 1 + assert isinstance(logger.handlers[0], TqdmLoggingHandler) + assert logger.handlers == [stderr_console_handler, stdout_console_handler] + + def test_should_inherit_console_logger_formatter(self): + logger = logging.Logger('test') + formatter = logging.Formatter('custom: %(message)s') + console_handler = logging.StreamHandler(sys.stderr) + console_handler.setFormatter(formatter) + logger.handlers = [console_handler] + with logging_redirect_tqdm(loggers=[logger]): + assert logger.handlers[0].formatter == formatter + + def test_should_not_remove_stream_handlers_not_for_stdout_or_stderr(self): + logger = logging.Logger('test') + stream_handler = logging.StreamHandler(StringIO()) + logger.addHandler(stream_handler) + with logging_redirect_tqdm(loggers=[logger]): + assert len(logger.handlers) == 2 + assert logger.handlers[0] == stream_handler + assert isinstance(logger.handlers[1], TqdmLoggingHandler) + assert logger.handlers == [stream_handler] + + +class TestTqdmWithLoggingRedirect: + def test_should_add_and_remove_handler_from_root_logger_by_default(self): + original_handlers = list(logging.root.handlers) + with tqdm_logging_redirect(total=1) as pbar: + assert isinstance(logging.root.handlers[-1], TqdmLoggingHandler) + LOGGER.info('test') + pbar.update(1) + assert logging.root.handlers == original_handlers + + def test_should_add_and_remove_handler_from_custom_logger(self): + logger = logging.Logger('test') + with tqdm_logging_redirect(total=1, loggers=[logger]) as pbar: + assert len(logger.handlers) == 1 + assert isinstance(logger.handlers[0], TqdmLoggingHandler) + logger.info('test') + pbar.update(1) + assert not logger.handlers + + def test_should_not_fail_with_logger_without_console_handler(self): + logger = logging.Logger('test') + logger.handlers = [] + with tqdm_logging_redirect(total=1, loggers=[logger]): + logger.info('test') + assert not logger.handlers + + def test_should_format_message(self): + logger = logging.Logger('test') + console_handler = logging.StreamHandler(sys.stdout) + console_handler.setFormatter(logging.Formatter( + r'prefix:%(message)s' + )) + logger.handlers = [console_handler] + CustomTqdm.messages = [] + with tqdm_logging_redirect(loggers=[logger], tqdm_class=CustomTqdm): + logger.info('test') + assert CustomTqdm.messages == ['prefix:test'] + + def test_use_root_logger_by_default_and_write_to_custom_tqdm(self): + logger = logging.root + CustomTqdm.messages = [] + with tqdm_logging_redirect(total=1, tqdm_class=CustomTqdm) as pbar: + assert isinstance(pbar, CustomTqdm) + logger.info('test') + assert CustomTqdm.messages == ['test'] diff --git a/miniconda3/pkgs/tqdm-4.67.3-py313h7040dfc_1/info/test/tests/tests_dask.py b/miniconda3/pkgs/tqdm-4.67.3-py313h7040dfc_1/info/test/tests/tests_dask.py new file mode 100644 index 0000000000000000000000000000000000000000..16992bf3e22e8b200b10de0ee20ca3a2eda17170 --- /dev/null +++ b/miniconda3/pkgs/tqdm-4.67.3-py313h7040dfc_1/info/test/tests/tests_dask.py @@ -0,0 +1,18 @@ +from time import sleep + +from .tests_tqdm import importorskip, mark + +pytestmark = mark.slow + + +def test_dask(capsys): + """Test tqdm.dask.TqdmCallback""" + ProgressBar = importorskip('tqdm.dask').TqdmCallback + dask = importorskip('dask') + + schedule = [dask.delayed(sleep)(i / 10) for i in range(5)] + with ProgressBar(desc="computing"): + dask.compute(schedule) + _, err = capsys.readouterr() + assert "computing: " in err + assert '5/5' in err diff --git a/miniconda3/pkgs/tqdm-4.67.3-py313h7040dfc_1/info/test/tests/tests_gui.py b/miniconda3/pkgs/tqdm-4.67.3-py313h7040dfc_1/info/test/tests/tests_gui.py new file mode 100644 index 0000000000000000000000000000000000000000..dddd918e3619b976be2cc820fdbc4dca7a857beb --- /dev/null +++ b/miniconda3/pkgs/tqdm-4.67.3-py313h7040dfc_1/info/test/tests/tests_gui.py @@ -0,0 +1,7 @@ +"""Test `tqdm.gui`.""" +from .tests_tqdm import importorskip + + +def test_gui_import(): + """Test `tqdm.gui` import""" + importorskip('tqdm.gui') diff --git a/miniconda3/pkgs/tqdm-4.67.3-py313h7040dfc_1/info/test/tests/tests_itertools.py b/miniconda3/pkgs/tqdm-4.67.3-py313h7040dfc_1/info/test/tests/tests_itertools.py new file mode 100644 index 0000000000000000000000000000000000000000..537a0578cf75c42a5c2baedba08fe92da065af9c --- /dev/null +++ b/miniconda3/pkgs/tqdm-4.67.3-py313h7040dfc_1/info/test/tests/tests_itertools.py @@ -0,0 +1,25 @@ +""" +Tests for `tqdm.contrib.itertools`. +""" +import itertools as it + +from tqdm.contrib.itertools import product + +from .tests_tqdm import StringIO, closing + + +class NoLenIter: + def __init__(self, iterable): + self._it = iterable + + def __iter__(self): + yield from self._it + + +def test_product(): + """Test contrib.itertools.product""" + with closing(StringIO()) as our_file: + a = range(9) + assert list(product(a, a[::-1], file=our_file)) == list(it.product(a, a[::-1])) + + assert list(product(a, NoLenIter(a), file=our_file)) == list(it.product(a, NoLenIter(a))) diff --git a/miniconda3/pkgs/tqdm-4.67.3-py313h7040dfc_1/info/test/tests/tests_keras.py b/miniconda3/pkgs/tqdm-4.67.3-py313h7040dfc_1/info/test/tests/tests_keras.py new file mode 100644 index 0000000000000000000000000000000000000000..5b7db2873738df677c82a371b0029a597262dc1f --- /dev/null +++ b/miniconda3/pkgs/tqdm-4.67.3-py313h7040dfc_1/info/test/tests/tests_keras.py @@ -0,0 +1,91 @@ +from .tests_tqdm import importorskip, mark + +pytestmark = mark.slow + + +@mark.filterwarnings("ignore:.*:DeprecationWarning") +def test_keras(capsys): + """Test tqdm.keras.TqdmCallback""" + TqdmCallback = importorskip('tqdm.keras').TqdmCallback + np = importorskip('numpy') + try: + import keras as K + except ImportError: + K = importorskip('tensorflow.keras') + + # 1D autoencoder + dtype = np.float32 + model = K.models.Sequential([ + K.layers.InputLayer((1, 1), dtype=dtype), K.layers.Conv1D(1, 1)]) + model.compile("adam", "mse") + x = np.random.rand(100, 1, 1).astype(dtype) + batch_size = 10 + batches = len(x) / batch_size + epochs = 5 + + # just epoch (no batch) progress + model.fit( + x, + x, + epochs=epochs, + batch_size=batch_size, + verbose=False, + callbacks=[ + TqdmCallback( + epochs, + desc="training", + data_size=len(x), + batch_size=batch_size, + verbose=0)]) + _, res = capsys.readouterr() + assert "training: " in res + assert f"{epochs}/{epochs}" in res + assert f"{batches}/{batches}" not in res + + # full (epoch and batch) progress + model.fit( + x, + x, + epochs=epochs, + batch_size=batch_size, + verbose=False, + callbacks=[ + TqdmCallback( + epochs, + desc="training", + data_size=len(x), + batch_size=batch_size, + verbose=2)]) + _, res = capsys.readouterr() + assert "training: " in res + assert f"{epochs}/{epochs}" in res + assert f"{batches}/{batches}" in res + + # auto-detect epochs and batches + model.fit( + x, + x, + epochs=epochs, + batch_size=batch_size, + verbose=False, + callbacks=[TqdmCallback(desc="training", verbose=2)]) + _, res = capsys.readouterr() + assert "training: " in res + assert f"{epochs}/{epochs}" in res + assert f"{batches}/{batches}" in res + + # continue training (start from epoch != 0) + initial_epoch = 3 + model.fit( + x, + x, + initial_epoch=initial_epoch, + epochs=epochs, + batch_size=batch_size, + verbose=False, + callbacks=[TqdmCallback(desc="training", verbose=0, + miniters=1, mininterval=0, maxinterval=0)]) + _, res = capsys.readouterr() + assert "training: " in res + assert f"{initial_epoch - 1}/{initial_epoch - 1}" not in res + assert f"{epochs}/{epochs}" in res diff --git a/miniconda3/pkgs/tqdm-4.67.3-py313h7040dfc_1/info/test/tests/tests_main.py b/miniconda3/pkgs/tqdm-4.67.3-py313h7040dfc_1/info/test/tests/tests_main.py new file mode 100644 index 0000000000000000000000000000000000000000..039ce338068a141e234fb1ecf880ab98d1a9bae1 --- /dev/null +++ b/miniconda3/pkgs/tqdm-4.67.3-py313h7040dfc_1/info/test/tests/tests_main.py @@ -0,0 +1,244 @@ +"""Test CLI usage.""" +import logging +import subprocess # nosec +import sys +from functools import wraps +from os import linesep + +from tqdm.cli import TqdmKeyError, TqdmTypeError, main +from tqdm.utils import IS_WIN + +from .tests_tqdm import BytesIO, closing, mark, raises + + +def restore_sys(func): + """Decorates `func(capsysbinary)` to save & restore `sys.(stdin|argv)`.""" + @wraps(func) + def inner(capsysbinary): + """function requiring capsysbinary which may alter `sys.(stdin|argv)`""" + _SYS = sys.stdin, sys.argv + try: + res = func(capsysbinary) + finally: + sys.stdin, sys.argv = _SYS + return res + + return inner + + +def norm(bytestr): + """Normalise line endings.""" + return bytestr if linesep == "\n" else bytestr.replace(linesep.encode(), b"\n") + + +@mark.slow +def test_pipes(): + """Test command line pipes""" + ls_out = subprocess.check_output(['ls']) # nosec + ls = subprocess.Popen(['ls'], stdout=subprocess.PIPE) # nosec + res = subprocess.Popen( # nosec + [sys.executable, '-c', 'from tqdm.cli import main; main()'], + stdin=ls.stdout, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + out, err = res.communicate() + assert ls.poll() == 0 + + # actual test: + assert norm(ls_out) == norm(out) + assert b"it/s" in err + assert b"Error" not in err + + +if sys.version_info[:2] >= (3, 8): + test_pipes = mark.filterwarnings("ignore:unclosed file:ResourceWarning")( + test_pipes) + + +def test_main_import(): + """Test main CLI import""" + N = 123 + _SYS = sys.stdin, sys.argv + # test direct import + sys.stdin = [str(i).encode() for i in range(N)] + sys.argv = ['', '--desc', 'Test CLI import', + '--ascii', 'True', '--unit_scale', 'True'] + try: + import tqdm.__main__ # NOQA, pylint: disable=unused-variable + finally: + sys.stdin, sys.argv = _SYS + + +@restore_sys +def test_main_bytes(capsysbinary): + """Test CLI --bytes""" + N = 123 + + # test --delim + IN_DATA = '\0'.join(map(str, range(N))).encode() + with closing(BytesIO()) as sys.stdin: + sys.stdin.write(IN_DATA) + # sys.stdin.write(b'\xff') # TODO + sys.stdin.seek(0) + main(sys.stderr, ['--desc', 'Test CLI delim', '--ascii', 'True', + '--delim', r'\0', '--buf_size', '64']) + out, err = capsysbinary.readouterr() + assert out == IN_DATA + assert str(N) + "it" in err.decode("U8") + + # test --bytes + IN_DATA = IN_DATA.replace(b'\0', b'\n') + with closing(BytesIO()) as sys.stdin: + sys.stdin.write(IN_DATA) + sys.stdin.seek(0) + main(sys.stderr, ['--ascii', '--bytes=True', '--unit_scale', 'False']) + out, err = capsysbinary.readouterr() + assert out == IN_DATA + assert str(len(IN_DATA)) + "B" in err.decode("U8") + + +def test_main_log(capsysbinary, caplog): + """Test CLI --log""" + _SYS = sys.stdin, sys.argv + N = 123 + sys.stdin = [(str(i) + '\n').encode() for i in range(N)] + IN_DATA = b''.join(sys.stdin) + try: + with caplog.at_level(logging.INFO): + main(sys.stderr, ['--log', 'INFO']) + out, err = capsysbinary.readouterr() + assert norm(out) == IN_DATA and b"123/123" in err + assert not caplog.record_tuples + with caplog.at_level(logging.DEBUG): + main(sys.stderr, ['--log', 'DEBUG']) + out, err = capsysbinary.readouterr() + assert norm(out) == IN_DATA and b"123/123" in err + assert caplog.record_tuples + finally: + sys.stdin, sys.argv = _SYS + + +@restore_sys +def test_main(capsysbinary): + """Test misc CLI options""" + N = 123 + sys.stdin = [(str(i) + '\n').encode() for i in range(N)] + IN_DATA = b''.join(sys.stdin) + + # test --tee + main(sys.stderr, ['--mininterval', '0', '--miniters', '1']) + out, err = capsysbinary.readouterr() + assert norm(out) == IN_DATA and b"123/123" in err + assert N <= len(err.split(b"\r")) < N + 5 + + len_err = len(err) + main(sys.stderr, ['--tee', '--mininterval', '0', '--miniters', '1']) + out, err = capsysbinary.readouterr() + assert norm(out) == IN_DATA and b"123/123" in err + # spaces to clear intermediate lines could increase length + assert len_err + len(norm(out)) <= len(err) + + # test --null + main(sys.stderr, ['--null']) + out, err = capsysbinary.readouterr() + assert not out and b"123/123" in err + + # test integer --update + main(sys.stderr, ['--update']) + out, err = capsysbinary.readouterr() + assert norm(out) == IN_DATA + assert (str(N // 2 * N) + "it").encode() in err, "expected arithmetic sum formula" + + # test integer --update_to + main(sys.stderr, ['--update-to']) + out, err = capsysbinary.readouterr() + assert norm(out) == IN_DATA + assert (str(N - 1) + "it").encode() in err + assert (str(N) + "it").encode() not in err + + with closing(BytesIO()) as sys.stdin: + sys.stdin.write(IN_DATA.replace(b'\n', b'D')) + + # test integer --update --delim + sys.stdin.seek(0) + main(sys.stderr, ['--update', '--delim', 'D']) + out, err = capsysbinary.readouterr() + assert out == IN_DATA.replace(b'\n', b'D') + assert (str(N // 2 * N) + "it").encode() in err, "expected arithmetic sum" + + # test integer --update_to --delim + sys.stdin.seek(0) + main(sys.stderr, ['--update-to', '--delim', 'D']) + out, err = capsysbinary.readouterr() + assert out == IN_DATA.replace(b'\n', b'D') + assert (str(N - 1) + "it").encode() in err + assert (str(N) + "it").encode() not in err + + # test float --update_to + sys.stdin = [(str(i / 2.0) + '\n').encode() for i in range(N)] + IN_DATA = b''.join(sys.stdin) + main(sys.stderr, ['--update-to']) + out, err = capsysbinary.readouterr() + assert norm(out) == IN_DATA + assert (str((N - 1) / 2.0) + "it").encode() in err + assert (str(N / 2.0) + "it").encode() not in err + + +@mark.slow +@mark.skipif(IS_WIN, reason="no manpages on windows") +def test_manpath(tmp_path): + """Test CLI --manpath""" + man = tmp_path / "tqdm.1" + assert not man.exists() + with raises(SystemExit): + main(argv=['--manpath', str(tmp_path)]) + assert man.is_file() + + +@mark.slow +@mark.skipif(IS_WIN, reason="no completion on windows") +def test_comppath(tmp_path): + """Test CLI --comppath""" + man = tmp_path / "tqdm_completion.sh" + assert not man.exists() + with raises(SystemExit): + main(argv=['--comppath', str(tmp_path)]) + assert man.is_file() + + # check most important options appear + script = man.read_text() + opts = {'--help', '--desc', '--total', '--leave', '--ncols', '--ascii', + '--dynamic_ncols', '--position', '--bytes', '--nrows', '--delim', + '--manpath', '--comppath'} + assert all(args in script for args in opts) + + +@restore_sys +def test_exceptions(capsysbinary): + """Test CLI Exceptions""" + N = 123 + sys.stdin = [str(i) + '\n' for i in range(N)] + IN_DATA = ''.join(sys.stdin).encode() + + with raises(TqdmKeyError, match="bad_arg_u_ment"): + main(sys.stderr, argv=['-ascii', '-unit_scale', '--bad_arg_u_ment', 'foo']) + out, _ = capsysbinary.readouterr() + assert norm(out) == IN_DATA + + with raises(TqdmTypeError, match="invalid_bool_value"): + main(sys.stderr, argv=['-ascii', '-unit_scale', 'invalid_bool_value']) + out, _ = capsysbinary.readouterr() + assert norm(out) == IN_DATA + + with raises(TqdmTypeError, match="invalid_int_value"): + main(sys.stderr, argv=['-ascii', '--total', 'invalid_int_value']) + out, _ = capsysbinary.readouterr() + assert norm(out) == IN_DATA + + with raises(TqdmKeyError, match="Can only have one of --"): + main(sys.stderr, argv=['--update', '--update_to']) + out, _ = capsysbinary.readouterr() + assert norm(out) == IN_DATA + + # test SystemExits + for i in ('-h', '--help', '-v', '--version'): + with raises(SystemExit): + main(argv=[i]) diff --git a/miniconda3/pkgs/tqdm-4.67.3-py313h7040dfc_1/info/test/tests/tests_notebook.py b/miniconda3/pkgs/tqdm-4.67.3-py313h7040dfc_1/info/test/tests/tests_notebook.py new file mode 100644 index 0000000000000000000000000000000000000000..004d7e57b2f378e4979a8b8e47b969c81114956f --- /dev/null +++ b/miniconda3/pkgs/tqdm-4.67.3-py313h7040dfc_1/info/test/tests/tests_notebook.py @@ -0,0 +1,7 @@ +from tqdm.notebook import tqdm as tqdm_notebook + + +def test_notebook_disabled_description(): + """Test that set_description works for disabled tqdm_notebook""" + with tqdm_notebook(1, disable=True) as t: + t.set_description("description") diff --git a/miniconda3/pkgs/tqdm-4.67.3-py313h7040dfc_1/info/test/tests/tests_pandas.py b/miniconda3/pkgs/tqdm-4.67.3-py313h7040dfc_1/info/test/tests/tests_pandas.py new file mode 100644 index 0000000000000000000000000000000000000000..e06b28d3dd370ba645f8b79f119babc1ad37d914 --- /dev/null +++ b/miniconda3/pkgs/tqdm-4.67.3-py313h7040dfc_1/info/test/tests/tests_pandas.py @@ -0,0 +1,223 @@ +from tqdm import tqdm + +from .tests_tqdm import StringIO, closing, importorskip, mark, skip + +pytestmark = mark.slow + +np = importorskip('numpy') +random = importorskip('numpy.random') +rand = random.rand +randint = random.randint +pd = importorskip('pandas') + + +def test_pandas_setup(): + """Test tqdm.pandas()""" + with closing(StringIO()) as our_file: + tqdm.pandas(file=our_file, leave=True, ascii=True, total=123) + series = pd.Series(randint(0, 50, (100,))) + series.progress_apply(lambda x: x + 10) + res = our_file.getvalue() + assert '100/123' in res + + +def test_pandas_rolling_expanding(): + """Test pandas.(Series|DataFrame).(rolling|expanding)""" + with closing(StringIO()) as our_file: + tqdm.pandas(file=our_file, leave=True, ascii=True) + + series = pd.Series(randint(0, 50, (123,))) + res1 = series.rolling(10).progress_apply(lambda x: 1, raw=True) + res2 = series.rolling(10).apply(lambda x: 1, raw=True) + assert res1.equals(res2) + + res3 = series.expanding(10).progress_apply(lambda x: 2, raw=True) + res4 = series.expanding(10).apply(lambda x: 2, raw=True) + assert res3.equals(res4) + + expects = ['114it'] # 123-10+1 + for exres in expects: + our_file.seek(0) + if our_file.getvalue().count(exres) < 2: + our_file.seek(0) + raise AssertionError( + f"\nExpected:\n{exres} at least twice.\nIn:\n{our_file.read()}\n") + + +def test_pandas_series(): + """Test pandas.Series.progress_apply and .progress_map""" + with closing(StringIO()) as our_file: + tqdm.pandas(file=our_file, leave=True, ascii=True) + + series = pd.Series(randint(0, 50, (123,))) + res1 = series.progress_apply(lambda x: x + 10) + res2 = series.apply(lambda x: x + 10) + assert res1.equals(res2) + + res3 = series.progress_map(lambda x: x + 10) + res4 = series.map(lambda x: x + 10) + assert res3.equals(res4) + + expects = ['100%', '123/123'] + for exres in expects: + our_file.seek(0) + if our_file.getvalue().count(exres) < 2: + our_file.seek(0) + raise AssertionError( + f"\nExpected:\n{exres} at least twice.\nIn:\n{our_file.read()}\n") + + +@mark.filterwarnings("ignore:DataFrame.applymap has been deprecated:FutureWarning") +def test_pandas_data_frame(): + """Test pandas.DataFrame.progress_apply and .progress_applymap""" + with closing(StringIO()) as our_file: + tqdm.pandas(file=our_file, leave=True, ascii=True) + df = pd.DataFrame(randint(0, 50, (100, 200))) + + def task_func(x): + return x + 1 + + if hasattr(df, 'map'): # pandas>=2.1.0 + # map + res1 = df.progress_map(task_func) + res2 = df.map(task_func) + assert res1.equals(res2) + assert '200/200' in our_file.getvalue() + else: + # applymap + res1 = df.progress_applymap(task_func) + res2 = df.applymap(task_func) + assert res1.equals(res2) + assert '20000/20000' in our_file.getvalue() + + # apply unhashable + res1 = [] + df.progress_apply(res1.extend) + assert len(res1) == df.size + + # apply + for axis in [0, 1, 'index', 'columns']: + res3 = df.progress_apply(task_func, axis=axis) + res4 = df.apply(task_func, axis=axis) + assert res3.equals(res4) + assert '200/200' in our_file.getvalue() # axis=0 + assert '100/100' in our_file.getvalue() # axis=1 + + our_file.seek(0) + if our_file.read().count('100%') < 6: + our_file.seek(0) + raise AssertionError( + f"\nExpected:\n100% at least 6 times\nIn:\n{our_file.read()}\n") + + +@mark.filterwarnings("ignore:DataFrameGroupBy.apply operated on the grouping columns") +def test_pandas_groupby_apply(): + """Test pandas.DataFrame.groupby(...).progress_apply""" + with closing(StringIO()) as our_file: + tqdm.pandas(file=our_file, leave=False, ascii=True) + + df = pd.DataFrame(randint(0, 50, (500, 3))) + df.groupby(0).progress_apply(lambda x: None) + + dfs = pd.DataFrame(randint(0, 50, (500, 3)), columns=list('abc')) + dfs.groupby(['a']).progress_apply(lambda x: None) + + df2 = df = pd.DataFrame({'a': randint(1, 8, 10000), 'b': rand(10000)}) + res1 = df2.groupby("a").apply(np.maximum.reduce) + res2 = df2.groupby("a").progress_apply(np.maximum.reduce) + assert res1.equals(res2) + + our_file.seek(0) + + # don't expect final output since no `leave` and + # high dynamic `miniters` + nexres = '100%|##########|' + if nexres in our_file.read(): + our_file.seek(0) + raise AssertionError(f"\nDid not expect:\n{nexres}\nIn:{our_file.read()}\n") + + with closing(StringIO()) as our_file: + tqdm.pandas(file=our_file, leave=True, ascii=True) + + dfs = pd.DataFrame(randint(0, 50, (500, 3)), columns=list('abc')) + dfs.loc[0] = [2, 1, 1] + dfs['d'] = 100 + + expects = ['500/500', '1/1', '4/4', '4/4'] + dfs.groupby(dfs.index).progress_apply(lambda x: None) + dfs.groupby('d').progress_apply(lambda x: None) + dfs.T.groupby(dfs.columns).progress_apply(lambda x: None) + dfs.T.groupby([2, 2, 1, 1]).progress_apply(lambda x: None) + + our_file.seek(0) + if our_file.read().count('100%') < 4: + our_file.seek(0) + raise AssertionError( + f"\nExpected:\n100% at least four times\nIn:\n{our_file.read()}\n") + + for exres in expects: + our_file.seek(0) + if our_file.getvalue().count(exres) < 1: + our_file.seek(0) + raise AssertionError( + f"\nExpected:\n{exres} at least once.\nIn:\n{our_file.read()}\n") + + +@mark.filterwarnings("ignore:DataFrameGroupBy.apply operated on the grouping columns") +def test_pandas_leave(): + """Test pandas with `leave=True`""" + with closing(StringIO()) as our_file: + df = pd.DataFrame(randint(0, 100, (1000, 6))) + tqdm.pandas(file=our_file, leave=True, ascii=True) + df.groupby(0).progress_apply(lambda x: None) + + our_file.seek(0) + + exres = '100%|##########| 100/100' + if exres not in our_file.read(): + our_file.seek(0) + raise AssertionError(f"\nExpected:\n{exres}\nIn:{our_file.read()}\n") + + +def test_pandas_apply_args_deprecation(): + """Test warning info in + `pandas.Dataframe(Series).progress_apply(func, *args)`""" + try: + from tqdm import tqdm_pandas + except ImportError as err: + skip(str(err)) + + with closing(StringIO()) as our_file: + tqdm_pandas(tqdm(file=our_file, leave=False, ascii=True, ncols=20)) + df = pd.DataFrame(randint(0, 50, (500, 3))) + df.progress_apply(lambda x: None, 1) # 1 shall cause a warning + # Check deprecation message + res = our_file.getvalue() + assert all(i in res for i in ( + "TqdmDeprecationWarning", "not supported", + "keyword arguments instead")) + + +@mark.filterwarnings("ignore:DataFrameGroupBy.apply operated on the grouping columns") +def test_pandas_deprecation(): + """Test bar object instance as argument deprecation""" + try: + from tqdm import tqdm_pandas + except ImportError as err: + skip(str(err)) + + with closing(StringIO()) as our_file: + tqdm_pandas(tqdm(file=our_file, leave=False, ascii=True, ncols=20)) + df = pd.DataFrame(randint(0, 50, (500, 3))) + df.groupby(0).progress_apply(lambda x: None) + # Check deprecation message + assert "TqdmDeprecationWarning" in our_file.getvalue() + assert "instead of `tqdm_pandas(tqdm(...))`" in our_file.getvalue() + + with closing(StringIO()) as our_file: + tqdm_pandas(tqdm, file=our_file, leave=False, ascii=True, ncols=20) + df = pd.DataFrame(randint(0, 50, (500, 3))) + df.groupby(0).progress_apply(lambda x: None) + # Check deprecation message + assert "TqdmDeprecationWarning" in our_file.getvalue() + assert "instead of `tqdm_pandas(tqdm, ...)`" in our_file.getvalue() diff --git a/miniconda3/pkgs/tqdm-4.67.3-py313h7040dfc_1/info/test/tests/tests_perf.py b/miniconda3/pkgs/tqdm-4.67.3-py313h7040dfc_1/info/test/tests/tests_perf.py new file mode 100644 index 0000000000000000000000000000000000000000..a6c48238bd5ee395db5610657531b35aace31df8 --- /dev/null +++ b/miniconda3/pkgs/tqdm-4.67.3-py313h7040dfc_1/info/test/tests/tests_perf.py @@ -0,0 +1,315 @@ +import sys +from contextlib import contextmanager +from functools import wraps +from time import sleep, time + +# Use relative/cpu timer to have reliable timings when there is a sudden load +try: + from time import process_time +except ImportError: + from time import clock + process_time = clock + +from tqdm import tqdm, trange + +from .tests_tqdm import importorskip, mark, patch_lock, skip + +pytestmark = mark.slow + + +def cpu_sleep(t): + """Sleep the given amount of cpu time""" + start = process_time() + while (process_time() - start) < t: + pass + + +def checkCpuTime(sleeptime=0.2): + """Check if cpu time works correctly""" + if checkCpuTime.passed: + return True + # First test that sleeping does not consume cputime + start1 = process_time() + sleep(sleeptime) + t1 = process_time() - start1 + + # secondly check by comparing to cpusleep (where we actually do something) + start2 = process_time() + cpu_sleep(sleeptime) + t2 = process_time() - start2 + + if abs(t1) < 0.0001 and t1 < t2 / 10: + checkCpuTime.passed = True + return True + skip("cpu time not reliable on this machine") + + +checkCpuTime.passed = False + + +@contextmanager +def relative_timer(): + """yields a context timer function which stops ticking on exit""" + start = process_time() + + def elapser(): + return process_time() - start + + yield lambda: elapser() + spent = elapser() + + def elapser(): # NOQA + return spent + + +def retry_on_except(n=3, check_cpu_time=True): + """decroator for retrying `n` times before raising Exceptions""" + def wrapper(func): + """actual decorator""" + @wraps(func) + def test_inner(*args, **kwargs): + """may skip if `check_cpu_time` fails""" + for i in range(1, n + 1): + try: + if check_cpu_time: + checkCpuTime() + func(*args, **kwargs) + except Exception: + if i >= n: + raise + else: + return + return test_inner + return wrapper + + +def simple_progress(iterable=None, total=None, file=sys.stdout, desc='', + leave=False, miniters=1, mininterval=0.1, width=60): + """Simple progress bar reproducing tqdm's major features""" + n = [0] # use a closure + start_t = [time()] + last_n = [0] + last_t = [0] + if iterable is not None: + total = len(iterable) + + def format_interval(t): + mins, s = divmod(int(t), 60) + h, m = divmod(mins, 60) + return f'{h:d}:{m:02d}:{s:02d}' if h else f'{m:02d}:{s:02d}' + + def update_and_print(i=1): + n[0] += i + if (n[0] - last_n[0]) >= miniters: + last_n[0] = n[0] + + if (time() - last_t[0]) >= mininterval: + last_t[0] = time() # last_t[0] == current time + + spent = last_t[0] - start_t[0] + spent_fmt = format_interval(spent) + rate = n[0] / spent if spent > 0 else 0 + rate_fmt = "%.2fs/it" % (1.0 / rate) if 0.0 < rate < 1.0 else "%.2fit/s" % rate + + frac = n[0] / total + percentage = int(frac * 100) + eta = (total - n[0]) / rate if rate > 0 else 0 + eta_fmt = format_interval(eta) + + # full_bar = "#" * int(frac * width) + barfill = " " * int((1.0 - frac) * width) + bar_length, frac_bar_length = divmod(int(frac * width * 10), 10) + full_bar = '#' * bar_length + frac_bar = chr(48 + frac_bar_length) if frac_bar_length else ' ' + + file.write("\r%s %i%%|%s%s%s| %i/%i [%s<%s, %s]" % + (desc, percentage, full_bar, frac_bar, barfill, n[0], + total, spent_fmt, eta_fmt, rate_fmt)) + + if n[0] == total and leave: + file.write("\n") + file.flush() + + def update_and_yield(): + for elt in iterable: + yield elt + update_and_print() + + update_and_print(0) + if iterable is not None: + return update_and_yield() + return update_and_print + + +def assert_performance(thresh, name_left, time_left, name_right, time_right): + """raises if time_left > thresh * time_right""" + if time_left > thresh * time_right: + raise ValueError( + f'{name_left}: {time_left:f}, {name_right}: {time_right:f}' + f', ratio {time_left / time_right:f} > {thresh:f}') + + +@retry_on_except() +def test_iter_basic_overhead(): + """Test overhead of iteration based tqdm""" + total = int(1e6) + + a = 0 + with trange(total) as t: + with relative_timer() as time_tqdm: + for i in t: + a += i + assert a == (total ** 2 - total) / 2.0 + + a = 0 + with relative_timer() as time_bench: + for i in range(total): + a += i + sys.stdout.write(str(a)) + + assert_performance(3, 'trange', time_tqdm(), 'range', time_bench()) + + +@retry_on_except() +def test_manual_basic_overhead(): + """Test overhead of manual tqdm""" + total = int(1e6) + + with tqdm(total=total * 10, leave=True) as t: + a = 0 + with relative_timer() as time_tqdm: + for i in range(total): + a += i + t.update(10) + + a = 0 + with relative_timer() as time_bench: + for i in range(total): + a += i + sys.stdout.write(str(a)) + + assert_performance(5, 'tqdm', time_tqdm(), 'range', time_bench()) + + +def worker(total, blocking=True): + def incr_bar(x): + for _ in trange(total, lock_args=None if blocking else (False,), + miniters=1, mininterval=0, maxinterval=0): + pass + return x + 1 + return incr_bar + + +@retry_on_except() +@patch_lock(thread=True) +def test_lock_args(): + """Test overhead of nonblocking threads""" + ThreadPoolExecutor = importorskip('concurrent.futures').ThreadPoolExecutor + + total = 16 + subtotal = 10000 + + with ThreadPoolExecutor() as pool: + sys.stderr.write('block ... ') + sys.stderr.flush() + with relative_timer() as time_tqdm: + res = list(pool.map(worker(subtotal, True), range(total))) + assert sum(res) == sum(range(total)) + total + sys.stderr.write('noblock ... ') + sys.stderr.flush() + with relative_timer() as time_noblock: + res = list(pool.map(worker(subtotal, False), range(total))) + assert sum(res) == sum(range(total)) + total + + assert_performance(0.5, 'noblock', time_noblock(), 'tqdm', time_tqdm()) + + +@retry_on_except(10) +def test_iter_overhead_hard(): + """Test overhead of iteration based tqdm (hard)""" + total = int(1e5) + + a = 0 + with trange(total, leave=True, miniters=1, + mininterval=0, maxinterval=0) as t: + with relative_timer() as time_tqdm: + for i in t: + a += i + assert a == (total ** 2 - total) / 2.0 + + a = 0 + with relative_timer() as time_bench: + for i in range(total): + a += i + sys.stdout.write(("%i" % a) * 40) + + assert_performance(130, 'trange', time_tqdm(), 'range', time_bench()) + + +@retry_on_except(10) +def test_manual_overhead_hard(): + """Test overhead of manual tqdm (hard)""" + total = int(1e5) + + with tqdm(total=total * 10, leave=True, miniters=1, + mininterval=0, maxinterval=0) as t: + a = 0 + with relative_timer() as time_tqdm: + for i in range(total): + a += i + t.update(10) + + a = 0 + with relative_timer() as time_bench: + for i in range(total): + a += i + sys.stdout.write(("%i" % a) * 40) + + assert_performance(130, 'tqdm', time_tqdm(), 'range', time_bench()) + + +@retry_on_except(10) +def test_iter_overhead_simplebar_hard(): + """Test overhead of iteration based tqdm vs simple progress bar (hard)""" + total = int(1e4) + + a = 0 + with trange(total, leave=True, miniters=1, + mininterval=0, maxinterval=0) as t: + with relative_timer() as time_tqdm: + for i in t: + a += i + assert a == (total ** 2 - total) / 2.0 + + a = 0 + s = simple_progress(range(total), leave=True, + miniters=1, mininterval=0) + with relative_timer() as time_bench: + for i in s: + a += i + + assert_performance(10, 'trange', time_tqdm(), 'simple_progress', time_bench()) + + +@retry_on_except(10) +def test_manual_overhead_simplebar_hard(): + """Test overhead of manual tqdm vs simple progress bar (hard)""" + total = int(1e4) + + with tqdm(total=total * 10, leave=True, miniters=1, + mininterval=0, maxinterval=0) as t: + a = 0 + with relative_timer() as time_tqdm: + for i in range(total): + a += i + t.update(10) + + simplebar_update = simple_progress(total=total * 10, leave=True, + miniters=1, mininterval=0) + a = 0 + with relative_timer() as time_bench: + for i in range(total): + a += i + simplebar_update(10) + + assert_performance(10, 'tqdm', time_tqdm(), 'simple_progress', time_bench()) diff --git a/miniconda3/pkgs/tqdm-4.67.3-py313h7040dfc_1/info/test/tests/tests_rich.py b/miniconda3/pkgs/tqdm-4.67.3-py313h7040dfc_1/info/test/tests/tests_rich.py new file mode 100644 index 0000000000000000000000000000000000000000..2fff78cc44fc24f4e2886299b8b3e5e40c535301 --- /dev/null +++ b/miniconda3/pkgs/tqdm-4.67.3-py313h7040dfc_1/info/test/tests/tests_rich.py @@ -0,0 +1,7 @@ +"""Test `tqdm.rich`.""" +from .tests_tqdm import importorskip + + +def test_rich_import(): + """Test `tqdm.rich` import""" + importorskip('tqdm.rich') diff --git a/miniconda3/pkgs/tqdm-4.67.3-py313h7040dfc_1/info/test/tests/tests_synchronisation.py b/miniconda3/pkgs/tqdm-4.67.3-py313h7040dfc_1/info/test/tests/tests_synchronisation.py new file mode 100644 index 0000000000000000000000000000000000000000..f813c5e482539d69f262758fe7def86392f4ad89 --- /dev/null +++ b/miniconda3/pkgs/tqdm-4.67.3-py313h7040dfc_1/info/test/tests/tests_synchronisation.py @@ -0,0 +1,207 @@ +from functools import wraps +from threading import Event +from time import sleep, time + +from tqdm import TMonitor, tqdm, trange + +from .tests_tqdm import StringIO, closing, importorskip, patch_lock, skip + + +class Time: + """Fake time class class providing an offset""" + offset = 0 + + @classmethod + def reset(cls): + """zeroes internal offset""" + cls.offset = 0 + + @classmethod + def time(cls): + """time.time() + offset""" + return time() + cls.offset + + @staticmethod + def sleep(dur): + """identical to time.sleep()""" + sleep(dur) + + @classmethod + def fake_sleep(cls, dur): + """adds `dur` to internal offset""" + cls.offset += dur + sleep(0.000001) # sleep to allow interrupt (instead of pass) + + +class FakeEvent(Event): + """patched `threading.Event` where `wait()` uses `Time.fake_sleep()`""" + def wait(self, timeout=None): + """uses Time.fake_sleep""" + if timeout is not None: + Time.fake_sleep(timeout) + return self.is_set() + + +def patch_sleep(func): + """Temporarily makes TMonitor use Time.fake_sleep""" + @wraps(func) + def inner(*args, **kwargs): + """restores TMonitor on completion regardless of Exceptions""" + TMonitor._test["time"] = Time.time + TMonitor._test["Event"] = FakeEvent + if tqdm.monitor: + assert not tqdm.monitor.get_instances() + tqdm.monitor.exit() + del tqdm.monitor + tqdm.monitor = None + try: + return func(*args, **kwargs) + finally: + # Check that class var monitor is deleted if no instance left + tqdm.monitor_interval = 10 + if tqdm.monitor: + assert not tqdm.monitor.get_instances() + tqdm.monitor.exit() + del tqdm.monitor + tqdm.monitor = None + TMonitor._test.pop("Event") + TMonitor._test.pop("time") + + return inner + + +def cpu_timify(t, timer=Time): + """Force tqdm to use the specified timer instead of system-wide time""" + t._time = timer.time + t._sleep = timer.fake_sleep + t.start_t = t.last_print_t = t._time() + return timer + + +class FakeTqdm: + _instances = set() + get_lock = tqdm.get_lock + + +def incr(x): + return x + 1 + + +def incr_bar(x): + with closing(StringIO()) as our_file: + for _ in trange(x, lock_args=(False,), file=our_file): + pass + return incr(x) + + +@patch_sleep +def test_monitor_thread(): + """Test dummy monitoring thread""" + monitor = TMonitor(FakeTqdm, 10) + # Test if alive, then killed + assert monitor.report() + monitor.exit() + assert not monitor.report() + assert not monitor.is_alive() + del monitor + + +@patch_sleep +def test_monitoring_and_cleanup(): + """Test for stalled tqdm instance and monitor deletion""" + # Note: should fix miniters for these tests, else with dynamic_miniters + # it's too complicated to handle with monitoring update and maxinterval... + maxinterval = tqdm.monitor_interval + assert maxinterval == 10 + total = 1000 + + with closing(StringIO()) as our_file: + with tqdm(total=total, file=our_file, miniters=500, mininterval=0.1, + maxinterval=maxinterval) as t: + cpu_timify(t, Time) + # Do a lot of iterations in a small timeframe + # (smaller than monitor interval) + Time.fake_sleep(maxinterval / 10) # monitor won't wake up + t.update(500) + # check that our fixed miniters is still there + assert t.miniters <= 500 # TODO: should really be == 500 + # Then do 1 it after monitor interval, so that monitor kicks in + Time.fake_sleep(maxinterval) + t.update(1) + # Wait for the monitor to get out of sleep's loop and update tqdm. + timeend = Time.time() + while not (t.monitor.woken >= timeend and t.miniters == 1): + Time.fake_sleep(1) # Force awake up if it woken too soon + assert t.miniters == 1 # check that monitor corrected miniters + # Note: at this point, there may be a race condition: monitor saved + # current woken time but Time.sleep() happen just before monitor + # sleep. To fix that, either sleep here or increase time in a loop + # to ensure that monitor wakes up at some point. + + # Try again but already at miniters = 1 so nothing will be done + Time.fake_sleep(maxinterval) + t.update(2) + timeend = Time.time() + while t.monitor.woken < timeend: + Time.fake_sleep(1) # Force awake if it woken too soon + # Wait for the monitor to get out of sleep's loop and update + # tqdm + assert t.miniters == 1 # check that monitor corrected miniters + + +@patch_sleep +def test_monitoring_multi(): + """Test on multiple bars, one not needing miniters adjustment""" + # Note: should fix miniters for these tests, else with dynamic_miniters + # it's too complicated to handle with monitoring update and maxinterval... + maxinterval = tqdm.monitor_interval + assert maxinterval == 10 + total = 1000 + + with closing(StringIO()) as our_file: + with tqdm(total=total, file=our_file, miniters=500, mininterval=0.1, + maxinterval=maxinterval) as t1: + # Set high maxinterval for t2 so monitor does not need to adjust it + with tqdm(total=total, file=our_file, miniters=500, mininterval=0.1, + maxinterval=1E5) as t2: + cpu_timify(t1, Time) + cpu_timify(t2, Time) + # Do a lot of iterations in a small timeframe + Time.fake_sleep(maxinterval / 10) + t1.update(500) + t2.update(500) + assert t1.miniters <= 500 # TODO: should really be == 500 + assert t2.miniters == 500 + # Then do 1 it after monitor interval, so that monitor kicks in + Time.fake_sleep(maxinterval) + t1.update(1) + t2.update(1) + # Wait for the monitor to get out of sleep and update tqdm + timeend = Time.time() + while not (t1.monitor.woken >= timeend and t1.miniters == 1): + Time.fake_sleep(1) + assert t1.miniters == 1 # check that monitor corrected miniters + assert t2.miniters == 500 # check that t2 was not adjusted + + +def test_imap(): + """Test multiprocessing.Pool""" + try: + from multiprocessing import Pool + except ImportError as err: + skip(str(err)) + + pool = Pool() + res = list(tqdm(pool.imap(incr, range(100)), disable=True)) + pool.close() + assert res[-1] == 100 + + +@patch_lock(thread=True) +def test_threadpool(): + """Test concurrent.futures.ThreadPoolExecutor""" + ThreadPoolExecutor = importorskip('concurrent.futures').ThreadPoolExecutor + + with ThreadPoolExecutor(8) as pool: + res = list(tqdm(pool.map(incr_bar, range(100)), disable=True)) + assert sum(res) == sum(range(1, 101)) diff --git a/miniconda3/pkgs/tqdm-4.67.3-py313h7040dfc_1/info/test/tests/tests_tk.py b/miniconda3/pkgs/tqdm-4.67.3-py313h7040dfc_1/info/test/tests/tests_tk.py new file mode 100644 index 0000000000000000000000000000000000000000..9aa645cef7ae7e042a64e41daca2eb01d2b97237 --- /dev/null +++ b/miniconda3/pkgs/tqdm-4.67.3-py313h7040dfc_1/info/test/tests/tests_tk.py @@ -0,0 +1,7 @@ +"""Test `tqdm.tk`.""" +from .tests_tqdm import importorskip + + +def test_tk_import(): + """Test `tqdm.tk` import""" + importorskip('tqdm.tk') diff --git a/miniconda3/pkgs/tqdm-4.67.3-py313h7040dfc_1/info/test/tests/tests_tqdm.py b/miniconda3/pkgs/tqdm-4.67.3-py313h7040dfc_1/info/test/tests/tests_tqdm.py new file mode 100644 index 0000000000000000000000000000000000000000..672664d9b7ebeb7bc45dd65a09d44a6f4fa217c8 --- /dev/null +++ b/miniconda3/pkgs/tqdm-4.67.3-py313h7040dfc_1/info/test/tests/tests_tqdm.py @@ -0,0 +1,1987 @@ +# Advice: use repr(our_file.read()) to print the full output of tqdm +# (else '\r' will replace the previous lines and you'll see only the latest. +import csv +import os +import re +import sys +from contextlib import contextmanager +from functools import wraps +from warnings import catch_warnings, simplefilter + +from pytest import importorskip, mark, raises, skip + +from tqdm import TqdmDeprecationWarning, TqdmWarning, tqdm, trange +from tqdm.contrib import DummyTqdmFile +from tqdm.std import EMA, Bar + +try: + from StringIO import StringIO +except ImportError: + from io import StringIO + +from io import IOBase # to support unicode strings +from io import BytesIO + + +class DeprecationError(Exception): + pass + + +# Ensure we can use `with closing(...) as ... :` syntax +if getattr(StringIO, '__exit__', False) and getattr(StringIO, '__enter__', False): + def closing(arg): + return arg +else: + from contextlib import closing + +nt_and_no_colorama = False +if os.name == 'nt': + try: + import colorama # NOQA + except ImportError: + nt_and_no_colorama = True + +# Regex definitions +# List of control characters +CTRLCHR = [r'\r', r'\n', r'\x1b\[A'] # Need to escape [ for regex +# Regular expressions compilation +RE_rate = re.compile(r'[^\d](\d[.\d]+)it/s') +RE_ctrlchr = re.compile("(%s)" % '|'.join(CTRLCHR)) # Match control chars +RE_ctrlchr_excl = re.compile('|'.join(CTRLCHR)) # Match and exclude ctrl chars +RE_pos = re.compile(r'([\r\n]+((pos\d+) bar:\s+\d+%|\s{3,6})?[^\r\n]*)') + + +def pos_line_diff(res_list, expected_list, raise_nonempty=True): + """ + Return differences between two bar output lists. + To be used with `RE_pos` + """ + res = [(r, e) for r, e in zip(res_list, expected_list) + for pos in [len(e) - len(e.lstrip('\n'))] # bar position + if r != e # simple comparison + if not r.startswith(e) # start matches + or not ( + # move up at end (maybe less due to closing bars) + any(r.endswith(end + i * '\x1b[A') for i in range(pos + 1) + for end in [ + ']', # bar + ' ']) # cleared + or '100%' in r # completed bar + or r == '\n') # final bar + or r[(-1 - pos) * len('\x1b[A'):] == '\x1b[A'] # too many moves up + if raise_nonempty and (res or len(res_list) != len(expected_list)): + if len(res_list) < len(expected_list): + res.extend([(None, e) for e in expected_list[len(res_list):]]) + elif len(res_list) > len(expected_list): + res.extend([(r, None) for r in res_list[len(expected_list):]]) + raise AssertionError( + "Got => Expected\n" + '\n'.join('%r => %r' % i for i in res)) + return res + + +class DiscreteTimer: + """Virtual discrete time manager, to precisely control time for tests""" + def __init__(self): + self.t = 0.0 + + def sleep(self, t): + """Sleep = increment the time counter (almost no CPU used)""" + self.t += t + + def time(self): + """Get the current time""" + return self.t + + +def cpu_timify(t, timer=None): + """Force tqdm to use the specified timer instead of system-wide time()""" + if timer is None: + timer = DiscreteTimer() + t._time = timer.time + t._sleep = timer.sleep + t.start_t = t.last_print_t = t._time() + return timer + + +class UnicodeIO(IOBase): + """Unicode version of StringIO""" + def __init__(self, *args, **kwargs): + super().__init__(*args, **kwargs) + self.encoding = 'U8' # io.StringIO supports unicode, but no encoding + self.text = '' + self.cursor = 0 + + def __len__(self): + return len(self.text) + + def seek(self, offset): + self.cursor = offset + + def tell(self): + return self.cursor + + def write(self, s): + self.text = self.text[:self.cursor] + s + self.text[self.cursor + len(s):] + self.cursor += len(s) + + def read(self, n=-1): + _cur = self.cursor + self.cursor = len(self) if n < 0 else min(_cur + n, len(self)) + return self.text[_cur:self.cursor] + + def getvalue(self): + return self.text + + +def get_bar(all_bars, i=None): + """Get a specific update from a whole bar traceback""" + # Split according to any used control characters + bars_split = RE_ctrlchr_excl.split(all_bars) + bars_split = list(filter(None, bars_split)) # filter out empty splits + return bars_split if i is None else bars_split[i] + + +def progressbar_rate(bar_str): + return float(RE_rate.search(bar_str).group(1)) + + +def squash_ctrlchars(s): + """Apply control characters in a string just like a terminal display""" + curline = 0 + lines = [''] # state of fake terminal + for nextctrl in filter(None, RE_ctrlchr.split(s)): + # apply control chars + if nextctrl == '\r': + # go to line beginning (simplified here: just empty the string) + lines[curline] = '' + elif nextctrl == '\n': + if curline >= len(lines) - 1: + # wrap-around creates newline + lines.append('') + # move cursor down + curline += 1 + elif nextctrl == '\x1b[A': + # move cursor up + if curline > 0: + curline -= 1 + else: + raise ValueError("Cannot go further up") + else: + # print message on current line + lines[curline] += nextctrl + return lines + + +def test_format_interval(): + """Test time interval format""" + format_interval = tqdm.format_interval + + assert format_interval(60) == '01:00' + assert format_interval(6160) == '1:42:40' + assert format_interval(238113) == '66:08:33' + assert format_interval(-1) == '-00:01' + assert format_interval(-60) == '-01:00' + assert format_interval(-100000) == '-27:46:40' + assert format_interval(0) == '00:00' + + +def test_format_num(): + """Test number format""" + format_num = tqdm.format_num + + assert float(format_num(1337)) == 1337 + assert format_num(int(1e6)) == '1e+6' + assert format_num(1239876) == '1' '239' '876' + assert format_num(0.00001234) == '1.23e-5' + assert format_num(-0.1234) == '-0.123' + + +def test_format_meter(): + """Test statistics and progress bar formatting""" + try: + unich = unichr + except NameError: + unich = chr + + format_meter = tqdm.format_meter + + assert format_meter(0, 1000, 13) == " 0%| | 0/1000 [00:13= (bigstep - 1) and ((i - (bigstep - 1)) % smallstep) == 0: + timer.sleep(1e-2) + if i >= 3 * bigstep: + break + + assert "15%" in our_file.getvalue() + + # Test different behavior with and without mininterval + timer = DiscreteTimer() + total = 1000 + mininterval = 0.1 + maxinterval = 10 + with closing(StringIO()) as our_file: + with tqdm(total=total, file=our_file, miniters=None, smoothing=1, + mininterval=mininterval, maxinterval=maxinterval) as tm1: + with tqdm(total=total, file=our_file, miniters=None, smoothing=1, + mininterval=0, maxinterval=maxinterval) as tm2: + + cpu_timify(tm1, timer) + cpu_timify(tm2, timer) + + # Fast iterations, check if dynamic_miniters triggers + timer.sleep(mininterval) # to force update for t1 + tm1.update(total / 2) + tm2.update(total / 2) + assert int(tm1.miniters) == tm2.miniters == total / 2 + + # Slow iterations, check different miniters if mininterval + timer.sleep(maxinterval * 2) + tm1.update(total / 2) + tm2.update(total / 2) + res = [tm1.miniters, tm2.miniters] + assert res == [(total / 2) * mininterval / (maxinterval * 2), + (total / 2) * maxinterval / (maxinterval * 2)] + + # Same with iterable based tqdm + timer1 = DiscreteTimer() # need 2 timers for each bar because zip not work + timer2 = DiscreteTimer() + total = 100 + mininterval = 0.1 + maxinterval = 10 + with closing(StringIO()) as our_file: + t1 = tqdm(range(total), file=our_file, miniters=None, smoothing=1, + mininterval=mininterval, maxinterval=maxinterval) + t2 = tqdm(range(total), file=our_file, miniters=None, smoothing=1, + mininterval=0, maxinterval=maxinterval) + + cpu_timify(t1, timer1) + cpu_timify(t2, timer2) + + for i in t1: + if i == ((total / 2) - 2): + timer1.sleep(mininterval) + if i == (total - 1): + timer1.sleep(maxinterval * 2) + + for i in t2: + if i == ((total / 2) - 2): + timer2.sleep(mininterval) + if i == (total - 1): + timer2.sleep(maxinterval * 2) + + assert t1.miniters == 0.255 + assert t2.miniters == 0.5 + + t1.close() + t2.close() + + +def test_delay(): + """Test delay""" + timer = DiscreteTimer() + with closing(StringIO()) as our_file: + t = tqdm(total=2, file=our_file, leave=True, delay=3) + cpu_timify(t, timer) + timer.sleep(2) + t.update(1) + assert not our_file.getvalue() + timer.sleep(2) + t.update(1) + assert our_file.getvalue() + t.close() + + +def test_min_iters(): + """Test miniters""" + with closing(StringIO()) as our_file: + for _ in tqdm(range(3), file=our_file, leave=True, mininterval=0, miniters=2): + pass + + out = our_file.getvalue() + assert '| 0/3 ' in out + assert '| 1/3 ' not in out + assert '| 2/3 ' in out + assert '| 3/3 ' in out + + with closing(StringIO()) as our_file: + for _ in tqdm(range(3), file=our_file, leave=True, mininterval=0, miniters=1): + pass + + out = our_file.getvalue() + assert '| 0/3 ' in out + assert '| 1/3 ' in out + assert '| 2/3 ' in out + assert '| 3/3 ' in out + + +def test_dynamic_min_iters(): + """Test purely dynamic miniters (and manual updates and __del__)""" + with closing(StringIO()) as our_file: + total = 10 + t = tqdm(total=total, file=our_file, miniters=None, mininterval=0, smoothing=1) + + t.update() + # Increase 3 iterations + t.update(3) + # The next two iterations should be skipped because of dynamic_miniters + t.update() + t.update() + # The third iteration should be displayed + t.update() + + out = our_file.getvalue() + assert t.dynamic_miniters + t.__del__() # simulate immediate del gc + + assert ' 0%| | 0/10 [00:00<' in out + assert '40%' in out + assert '50%' not in out + assert '60%' not in out + assert '70%' in out + + # Check with smoothing=0, miniters should be set to max update seen so far + with closing(StringIO()) as our_file: + total = 10 + t = tqdm(total=total, file=our_file, miniters=None, mininterval=0, smoothing=0) + + t.update() + t.update(2) + t.update(5) # this should be stored as miniters + t.update(1) + + out = our_file.getvalue() + assert all(i in out for i in ("0/10", "1/10", "3/10")) + assert "2/10" not in out + assert t.dynamic_miniters and not t.smoothing + assert t.miniters == 5 + t.close() + + # Check iterable based tqdm + with closing(StringIO()) as our_file: + t = tqdm(range(10), file=our_file, miniters=None, mininterval=None, + smoothing=0.5) + for _ in t: + pass + assert t.dynamic_miniters + + # No smoothing + with closing(StringIO()) as our_file: + t = tqdm(range(10), file=our_file, miniters=None, mininterval=None, + smoothing=0) + for _ in t: + pass + assert t.dynamic_miniters + + # No dynamic_miniters (miniters is fixed manually) + with closing(StringIO()) as our_file: + t = tqdm(range(10), file=our_file, miniters=1, mininterval=None) + for _ in t: + pass + assert not t.dynamic_miniters + + +def test_big_min_interval(): + """Test large mininterval""" + with closing(StringIO()) as our_file: + for _ in tqdm(range(2), file=our_file, mininterval=1E10): + pass + assert '50%' not in our_file.getvalue() + + with closing(StringIO()) as our_file: + with tqdm(range(2), file=our_file, mininterval=1E10) as t: + t.update() + t.update() + assert '50%' not in our_file.getvalue() + + +def test_smoothed_dynamic_min_iters(): + """Test smoothed dynamic miniters""" + timer = DiscreteTimer() + + with closing(StringIO()) as our_file: + with tqdm(total=100, file=our_file, miniters=None, mininterval=1, + smoothing=0.5, maxinterval=0) as t: + cpu_timify(t, timer) + + # Increase 10 iterations at once + timer.sleep(1) + t.update(10) + # The next iterations should be partially skipped + for _ in range(2): + timer.sleep(1) + t.update(4) + for _ in range(20): + timer.sleep(1) + t.update() + + assert t.dynamic_miniters + out = our_file.getvalue() + assert ' 0%| | 0/100 [00:00<' in out + assert '20%' in out + assert '23%' not in out + assert '25%' in out + assert '26%' not in out + assert '28%' in out + + +def test_smoothed_dynamic_min_iters_with_min_interval(): + """Test smoothed dynamic miniters with mininterval""" + timer = DiscreteTimer() + + # In this test, `miniters` should gradually decline + total = 100 + + with closing(StringIO()) as our_file: + # Test manual updating tqdm + with tqdm(total=total, file=our_file, miniters=None, mininterval=1e-3, + smoothing=1, maxinterval=0) as t: + cpu_timify(t, timer) + + t.update(10) + timer.sleep(1e-2) + for _ in range(4): + t.update() + timer.sleep(1e-2) + out = our_file.getvalue() + assert t.dynamic_miniters + + with closing(StringIO()) as our_file: + # Test iteration-based tqdm + with tqdm(range(total), file=our_file, miniters=None, + mininterval=0.01, smoothing=1, maxinterval=0) as t2: + cpu_timify(t2, timer) + + for i in t2: + if i >= 10: + timer.sleep(0.1) + if i >= 14: + break + out2 = our_file.getvalue() + + assert t.dynamic_miniters + assert ' 0%| | 0/100 [00:00<' in out + assert '11%' in out and '11%' in out2 + # assert '12%' not in out and '12%' in out2 + assert '13%' in out and '13%' in out2 + assert '14%' in out and '14%' in out2 + + +@mark.slow +def test_rlock_creation(): + """Test that importing tqdm does not create multiprocessing objects.""" + mp = importorskip('multiprocessing') + if not hasattr(mp, 'get_context'): + skip("missing multiprocessing.get_context") + + # Use 'spawn' instead of 'fork' so that the process does not inherit any + # globals that have been constructed by running other tests + ctx = mp.get_context('spawn') + with ctx.Pool(1) as pool: + # The pool will propagate the error if the target method fails + pool.apply(_rlock_creation_target) + + +def _rlock_creation_target(): + """Check that the RLock has not been constructed.""" + import multiprocessing as mp + patch = importorskip('unittest.mock').patch + + # Patch the RLock class/method but use the original implementation + with patch('multiprocessing.RLock', wraps=mp.RLock) as rlock_mock: + # Importing the module should not create a lock + from tqdm import tqdm + assert rlock_mock.call_count == 0 + # Creating a progress bar should initialize the lock + with closing(StringIO()) as our_file: + with tqdm(file=our_file) as _: # NOQA + pass + assert rlock_mock.call_count == 1 + # Creating a progress bar again should reuse the lock + with closing(StringIO()) as our_file: + with tqdm(file=our_file) as _: # NOQA + pass + assert rlock_mock.call_count == 1 + + +def test_disable(): + """Test disable""" + with closing(StringIO()) as our_file: + for _ in tqdm(range(3), file=our_file, disable=True): + pass + assert our_file.getvalue() == '' + + with closing(StringIO()) as our_file: + progressbar = tqdm(total=3, file=our_file, miniters=1, disable=True) + progressbar.update(3) + progressbar.close() + assert our_file.getvalue() == '' + + +def test_infinite_total(): + """Test treatment of infinite total""" + with closing(StringIO()) as our_file: + for _ in tqdm(range(3), file=our_file, total=float("inf")): + pass + + +def test_nototal(): + """Test unknown total length""" + with closing(StringIO()) as our_file: + for _ in tqdm(iter(range(10)), file=our_file, unit_scale=10): + pass + assert "100it" in our_file.getvalue() + + with closing(StringIO()) as our_file: + for _ in tqdm(iter(range(10)), file=our_file, + bar_format="{l_bar}{bar}{r_bar}"): + pass + assert "10/?" in our_file.getvalue() + + +def test_unit(): + """Test SI unit prefix""" + with closing(StringIO()) as our_file: + for _ in tqdm(range(3), file=our_file, miniters=1, unit="bytes"): + pass + assert 'bytes/s' in our_file.getvalue() + + +def test_ascii(): + """Test ascii/unicode bar""" + # Test ascii autodetection + with closing(StringIO()) as our_file: + with tqdm(total=10, file=our_file, ascii=None) as t: + assert t.ascii # TODO: this may fail in the future + + # Test ascii bar + with closing(StringIO()) as our_file: + for _ in tqdm(range(3), total=15, file=our_file, miniters=1, + mininterval=0, ascii=True): + pass + res = our_file.getvalue().strip("\r").split("\r") + assert '7%|6' in res[1] + assert '13%|#3' in res[2] + assert '20%|##' in res[3] + + # Test unicode bar + with closing(UnicodeIO()) as our_file: + with tqdm(total=15, file=our_file, ascii=False, mininterval=0) as t: + for _ in range(3): + t.update() + res = our_file.getvalue().strip("\r").split("\r") + assert "7%|\u258b" in res[1] + assert "13%|\u2588\u258e" in res[2] + assert "20%|\u2588\u2588" in res[3] + + # Test custom bar + for bars in [" .oO0", " #"]: + with closing(StringIO()) as our_file: + for _ in tqdm(range(len(bars) - 1), file=our_file, miniters=1, + mininterval=0, ascii=bars, ncols=27): + pass + res = our_file.getvalue().strip("\r").split("\r") + for b, line in zip(bars, res): + assert '|' + b + '|' in line + + +def test_update(): + """Test manual creation and updates""" + res = None + with closing(StringIO()) as our_file: + with tqdm(total=2, file=our_file, miniters=1, mininterval=0) as progressbar: + assert len(progressbar) == 2 + progressbar.update(2) + assert '| 2/2' in our_file.getvalue() + progressbar.desc = 'dynamically notify of 4 increments in total' + progressbar.total = 4 + progressbar.update(-1) + progressbar.update(2) + res = our_file.getvalue() + assert '| 3/4 ' in res + assert 'dynamically notify of 4 increments in total' in res + + +def test_close(): + """Test manual creation and closure and n_instances""" + + # With `leave` option + with closing(StringIO()) as our_file: + progressbar = tqdm(total=3, file=our_file, miniters=10) + progressbar.update(3) + assert '| 3/3 ' not in our_file.getvalue() # Should be blank + assert len(tqdm._instances) == 1 + progressbar.close() + assert len(tqdm._instances) == 0 + assert '| 3/3 ' in our_file.getvalue() + + # Without `leave` option + with closing(StringIO()) as our_file: + progressbar = tqdm(total=3, file=our_file, miniters=10, leave=False) + progressbar.update(3) + progressbar.close() + assert '| 3/3 ' not in our_file.getvalue() # Should be blank + + # With all updates + with closing(StringIO()) as our_file: + assert len(tqdm._instances) == 0 + with tqdm(total=3, file=our_file, miniters=0, mininterval=0, + leave=True) as progressbar: + assert len(tqdm._instances) == 1 + progressbar.update(3) + res = our_file.getvalue() + assert '| 3/3 ' in res # Should be blank + assert '\n' not in res + # close() called + assert len(tqdm._instances) == 0 + + exres = res.rsplit(', ', 1)[0] + res = our_file.getvalue() + assert res[-1] == '\n' + if not res.startswith(exres): + raise AssertionError(f"\n<<< Expected:\n{exres}, ...it/s]\n>>> Got:\n{res}\n===") + + # Closing after the output stream has closed + with closing(StringIO()) as our_file: + t = tqdm(total=2, file=our_file) + t.update() + t.update() + t.close() + + +def test_ema(): + """Test exponential weighted average""" + ema = EMA(0.01) + assert round(ema(10), 2) == 10 + assert round(ema(1), 2) == 5.48 + assert round(ema(), 2) == 5.48 + assert round(ema(1), 2) == 3.97 + assert round(ema(1), 2) == 3.22 + + +def test_smoothing(): + """Test exponential weighted average smoothing""" + timer = DiscreteTimer() + + # -- Test disabling smoothing + with closing(StringIO()) as our_file: + with tqdm(range(3), file=our_file, smoothing=None, leave=True) as t: + cpu_timify(t, timer) + + for _ in t: + pass + assert '| 3/3 ' in our_file.getvalue() + + # -- Test smoothing + # 1st case: no smoothing (only use average) + with closing(StringIO()) as our_file2: + with closing(StringIO()) as our_file: + t = tqdm(range(3), file=our_file2, smoothing=None, leave=True, + miniters=1, mininterval=0) + cpu_timify(t, timer) + + with tqdm(range(3), file=our_file, smoothing=None, leave=True, + miniters=1, mininterval=0) as t2: + cpu_timify(t2, timer) + + for i in t2: + # Sleep more for first iteration and + # see how quickly rate is updated + if i == 0: + timer.sleep(0.01) + else: + # Need to sleep in all iterations + # to calculate smoothed rate + # (else delta_t is 0!) + timer.sleep(0.001) + t.update() + n_old = len(tqdm._instances) + t.close() + assert len(tqdm._instances) == n_old - 1 + # Get result for iter-based bar + a = progressbar_rate(get_bar(our_file.getvalue(), 3)) + # Get result for manually updated bar + a2 = progressbar_rate(get_bar(our_file2.getvalue(), 3)) + + # 2nd case: use max smoothing (= instant rate) + with closing(StringIO()) as our_file2: + with closing(StringIO()) as our_file: + t = tqdm(range(3), file=our_file2, smoothing=1, leave=True, + miniters=1, mininterval=0) + cpu_timify(t, timer) + + with tqdm(range(3), file=our_file, smoothing=1, leave=True, + miniters=1, mininterval=0) as t2: + cpu_timify(t2, timer) + + for i in t2: + if i == 0: + timer.sleep(0.01) + else: + timer.sleep(0.001) + t.update() + t.close() + # Get result for iter-based bar + b = progressbar_rate(get_bar(our_file.getvalue(), 3)) + # Get result for manually updated bar + b2 = progressbar_rate(get_bar(our_file2.getvalue(), 3)) + + # 3rd case: use medium smoothing + with closing(StringIO()) as our_file2: + with closing(StringIO()) as our_file: + t = tqdm(range(3), file=our_file2, smoothing=0.5, leave=True, + miniters=1, mininterval=0) + cpu_timify(t, timer) + + t2 = tqdm(range(3), file=our_file, smoothing=0.5, leave=True, + miniters=1, mininterval=0) + cpu_timify(t2, timer) + + for i in t2: + if i == 0: + timer.sleep(0.01) + else: + timer.sleep(0.001) + t.update() + t2.close() + t.close() + # Get result for iter-based bar + c = progressbar_rate(get_bar(our_file.getvalue(), 3)) + # Get result for manually updated bar + c2 = progressbar_rate(get_bar(our_file2.getvalue(), 3)) + + # Check that medium smoothing's rate is between no and max smoothing rates + assert a <= c <= b + assert a2 <= c2 <= b2 + + +@mark.skipif(nt_and_no_colorama, reason="Windows without colorama") +def test_deprecated_nested(): + """Test nested progress bars""" + # TODO: test degradation on windows without colorama? + + # Artificially test nested loop printing + # Without leave + our_file = StringIO() + try: + tqdm(total=2, file=our_file, nested=True) + except TqdmDeprecationWarning: + if """`nested` is deprecated and automated. +Use `position` instead for manual control.""" not in our_file.getvalue(): + raise + else: + raise DeprecationError("Should not allow nested kwarg") + + +def test_bar_format(): + """Test custom bar formatting""" + with closing(StringIO()) as our_file: + bar_format = ('{l_bar}{bar}|{n_fmt}/{total_fmt}-{n}/{total}' + '{percentage}{rate}{rate_fmt}{elapsed}{remaining}') + for _ in trange(2, file=our_file, leave=True, bar_format=bar_format): + pass + out = our_file.getvalue() + assert "\r 0%| |0/2-0/20.0None?it/s00:00?\r" in out + + # Test unicode string auto conversion + with closing(StringIO()) as our_file: + bar_format = r'hello world' + with tqdm(ascii=False, bar_format=bar_format, file=our_file) as t: + assert isinstance(t.bar_format, str) + + +def test_custom_format(): + """Test adding additional derived format arguments""" + class TqdmExtraFormat(tqdm): + """Provides a `total_time` format parameter""" + @property + def format_dict(self): + d = super().format_dict + total_time = d["elapsed"] * (d["total"] or 0) / max(d["n"], 1) + d.update(total_time=self.format_interval(total_time) + " in total") + return d + + with closing(StringIO()) as our_file: + for _ in TqdmExtraFormat( + range(10), file=our_file, + bar_format="{total_time}: {percentage:.0f}%|{bar}{r_bar}"): + pass + assert "00:00 in total" in our_file.getvalue() + + +def test_eta(capsys): + """Test eta bar_format""" + from datetime import datetime as dt + for _ in trange(999, miniters=1, mininterval=0, leave=True, + bar_format='{l_bar}{eta:%Y-%m-%d}'): + pass + _, err = capsys.readouterr() + assert f"\r100%|{dt.now():%Y-%m-%d}\n" in err + + +def test_unpause(): + """Test unpause""" + timer = DiscreteTimer() + with closing(StringIO()) as our_file: + t = trange(10, file=our_file, leave=True, mininterval=0) + cpu_timify(t, timer) + timer.sleep(0.01) + t.update() + timer.sleep(0.01) + t.update() + timer.sleep(0.1) # longer wait time + t.unpause() + timer.sleep(0.01) + t.update() + timer.sleep(0.01) + t.update() + t.close() + r_before = progressbar_rate(get_bar(our_file.getvalue(), 2)) + r_after = progressbar_rate(get_bar(our_file.getvalue(), 3)) + assert r_before == r_after + + +def test_disabled_unpause(capsys): + """Test disabled unpause""" + with tqdm(total=10, disable=True) as t: + t.update() + t.unpause() + t.update() + print(t) + out, err = capsys.readouterr() + assert not err + assert out == ' 0%| | 0/10 [00:00= t0 + assert t0 <= t2 + + t3 = tqdm(total=10, file=our_file) + t4 = tqdm(total=10, file=our_file) + t5 = tqdm(total=10, file=our_file) + t5.close() + t6 = tqdm(total=10, file=our_file) + + assert t3 != t4 + assert t3 > t2 + assert t5 == t6 + t6.close() + t4.close() + t3.close() + t2.close() + t1.close() + t0.close() + + +def test_repr(): + """Test representation""" + with closing(StringIO()) as our_file: + with tqdm(total=10, ascii=True, file=our_file) as t: + assert str(t) == ' 0%| | 0/10 [00:00 out3.count('\r') + assert out4.count(", ".join(expected_order)) == 2 + + # Test setting postfix string directly + with closing(StringIO()) as our_file: + with trange(10, file=our_file, desc='pos2 bar', bar_format='{r_bar}', + postfix=None) as t5: + t5.set_postfix_str("Hello", False) + t5.set_postfix_str("World") + out5 = our_file.getvalue() + + assert "Hello" not in out5 + out5 = out5[1:-1].split(', ')[3:] + assert out5 == ["World"] + + +def test_postfix_direct(): + """Test directly assigning non-str objects to postfix""" + with closing(StringIO()) as our_file: + with tqdm(total=10, file=our_file, miniters=1, mininterval=0, + bar_format="{postfix[0][name]} {postfix[1]:>5.2f}", + postfix=[{'name': "foo"}, 42]) as t: + for i in range(10): + if i % 2: + t.postfix[0]["name"] = "abcdefghij"[i] + else: + t.postfix[1] = i + t.update() + res = our_file.getvalue() + assert "f 6.00" in res + assert "h 6.00" in res + assert "h 8.00" in res + assert "j 8.00" in res + + +@contextmanager +def std_out_err_redirect_tqdm(tqdm_file=sys.stderr): + orig_out_err = sys.stdout, sys.stderr + try: + sys.stdout = sys.stderr = DummyTqdmFile(tqdm_file) + yield orig_out_err[0] + # Relay exceptions + except Exception as exc: + raise exc + # Always restore sys.stdout/err if necessary + finally: + sys.stdout, sys.stderr = orig_out_err + + +def test_file_redirection(): + """Test redirection of output""" + with closing(StringIO()) as our_file: + # Redirect stdout to tqdm.write() + with std_out_err_redirect_tqdm(tqdm_file=our_file): + with tqdm(total=3) as pbar: + print("Such fun") + pbar.update(1) + print("Such", "fun") + pbar.update(1) + print("Such ", end="") + print("fun") + pbar.update(1) + res = our_file.getvalue() + assert res.count("Such fun\n") == 3 + assert "0/3" in res + assert "3/3" in res + + +def test_external_write(): + """Test external write mode""" + with closing(StringIO()) as our_file: + # Redirect stdout to tqdm.write() + for _ in trange(3, file=our_file): + del tqdm._lock # classmethod should be able to recreate lock + with tqdm.external_write_mode(file=our_file): + our_file.write("Such fun\n") + res = our_file.getvalue() + assert res.count("Such fun\n") == 3 + assert "0/3" in res + assert "3/3" in res + + +def test_unit_scale(): + """Test numeric `unit_scale`""" + with closing(StringIO()) as our_file: + for _ in tqdm(range(9), unit_scale=9, file=our_file, + miniters=1, mininterval=0): + pass + out = our_file.getvalue() + assert '81/81' in out + + +def patch_lock(thread=True): + """decorator replacing tqdm's lock with vanilla threading/multiprocessing""" + try: + if thread: + from threading import RLock + else: + from multiprocessing import RLock + lock = RLock() + except (ImportError, OSError) as err: + skip(str(err)) + + def outer(func): + """actual decorator""" + @wraps(func) + def inner(*args, **kwargs): + """set & reset lock even if exceptions occur""" + default_lock = tqdm.get_lock() + try: + tqdm.set_lock(lock) + return func(*args, **kwargs) + finally: + tqdm.set_lock(default_lock) + return inner + return outer + + +@patch_lock(thread=False) +def test_threading(): + """Test multiprocess/thread-realted features""" + pass # TODO: test interleaved output #445 + + +def test_bool(): + """Test boolean cast""" + def internal(our_file, disable): + kwargs = {'file': our_file, 'disable': disable} + with trange(10, **kwargs) as t: + assert t + with trange(0, **kwargs) as t: + assert not t + with tqdm(total=10, **kwargs) as t: + assert bool(t) + with tqdm(total=0, **kwargs) as t: + assert not bool(t) + with tqdm([], **kwargs) as t: + assert not t + with tqdm([0], **kwargs) as t: + assert t + with tqdm(iter([]), **kwargs) as t: + assert t + with tqdm(iter([1, 2, 3]), **kwargs) as t: + assert t + with tqdm(**kwargs) as t: + try: + print(bool(t)) + except TypeError: + pass + else: + raise TypeError("Expected bool(tqdm()) to fail") + + # test with and without disable + with closing(StringIO()) as our_file: + internal(our_file, False) + internal(our_file, True) + + +def backendCheck(module): + """Test tqdm-like module fallback""" + tn = module.tqdm + tr = module.trange + + with closing(StringIO()) as our_file: + with tn(total=10, file=our_file) as t: + assert len(t) == 10 + with tr(1337) as t: + assert len(t) == 1337 + + +def test_auto(): + """Test auto fallback""" + from tqdm import auto, autonotebook + backendCheck(autonotebook) + backendCheck(auto) + + +def test_wrapattr(): + """Test wrapping file-like objects""" + data = "a twenty-char string" + + with closing(StringIO()) as our_file: + with closing(StringIO()) as writer: + with tqdm.wrapattr(writer, "write", file=our_file, bytes=True) as wrap: + wrap.write(data) + res = writer.getvalue() + assert data == res + res = our_file.getvalue() + assert '%.1fB [' % len(data) in res + + with closing(StringIO()) as our_file: + with closing(StringIO()) as writer: + with tqdm.wrapattr(writer, "write", file=our_file, bytes=False) as wrap: + wrap.write(data) + res = our_file.getvalue() + assert '%dit [' % len(data) in res + + +def test_float_progress(): + """Test float totals""" + with closing(StringIO()) as our_file: + with trange(10, total=9.6, file=our_file) as t: + with catch_warnings(record=True) as w: + simplefilter("always", category=TqdmWarning) + for i in t: + if i < 9: + assert not w + assert w + assert "clamping frac" in str(w[-1].message) + + +def test_screen_shape(): + """Test screen shape""" + # ncols + with closing(StringIO()) as our_file: + with trange(10, file=our_file, ncols=50) as t: + list(t) + + res = our_file.getvalue() + assert all(len(i) == 50 for i in get_bar(res)) + + # no second/third bar, leave=False + with closing(StringIO()) as our_file: + kwargs = {'file': our_file, 'ncols': 50, 'nrows': 2, 'miniters': 0, + 'mininterval': 0, 'leave': False} + with trange(10, desc="one", **kwargs) as t1: + with trange(10, desc="two", **kwargs) as t2: + with trange(10, desc="three", **kwargs) as t3: + list(t3) + list(t2) + list(t1) + + res = our_file.getvalue() + assert "one" in res + assert "two" not in res + assert "three" not in res + assert "\n\n" not in res + assert "more hidden" in res + # double-check ncols + assert all(len(i) == 50 for i in get_bar(res) + if i.strip() and "more hidden" not in i) + + # all bars, leave=True + with closing(StringIO()) as our_file: + kwargs = {'file': our_file, 'ncols': 50, 'nrows': 2, + 'miniters': 0, 'mininterval': 0} + with trange(10, desc="one", **kwargs) as t1: + with trange(10, desc="two", **kwargs) as t2: + assert "two" not in our_file.getvalue() + with trange(10, desc="three", **kwargs) as t3: + assert "three" not in our_file.getvalue() + list(t3) + list(t2) + list(t1) + + res = our_file.getvalue() + assert "one" in res + assert "two" in res + assert "three" in res + assert "\n\n" not in res + assert "more hidden" in res + # double-check ncols + assert all(len(i) == 50 for i in get_bar(res) + if i.strip() and "more hidden" not in i) + + # second bar becomes first, leave=False + with closing(StringIO()) as our_file: + kwargs = {'file': our_file, 'ncols': 50, 'nrows': 2, 'miniters': 0, + 'mininterval': 0, 'leave': False} + t1 = tqdm(total=10, desc="one", **kwargs) + with tqdm(total=10, desc="two", **kwargs) as t2: + t1.update() + t2.update() + t1.close() + res = our_file.getvalue() + assert "one" in res + assert "two" not in res + assert "more hidden" in res + t2.update() + + res = our_file.getvalue() + assert "two" in res + + +def test_initial(): + """Test `initial`""" + with closing(StringIO()) as our_file: + for _ in tqdm(range(9), initial=10, total=19, file=our_file, + miniters=1, mininterval=0): + pass + out = our_file.getvalue() + assert '10/19' in out + assert '19/19' in out + + +def test_colour(): + """Test `colour`""" + with closing(StringIO()) as our_file: + for _ in tqdm(range(9), file=our_file, colour="#beefed"): + pass + out = our_file.getvalue() + assert '\x1b[38;2;%d;%d;%dm' % (0xbe, 0xef, 0xed) in out + + with catch_warnings(record=True) as w: + simplefilter("always", category=TqdmWarning) + with tqdm(total=1, file=our_file, colour="charm") as t: + assert w + t.update() + assert "Unknown colour" in str(w[-1].message) + + with closing(StringIO()) as our_file2: + for _ in tqdm(range(9), file=our_file2, colour="blue"): + pass + out = our_file2.getvalue() + assert '\x1b[34m' in out + + +def test_closed(): + """Test writing to closed file""" + with closing(StringIO()) as our_file: + for i in trange(9, file=our_file, miniters=1, mininterval=0): + if i == 5: + our_file.close() + + +def test_reversed(capsys): + """Test reversed()""" + for _ in reversed(tqdm(range(9))): + pass + out, err = capsys.readouterr() + assert not out + assert ' 0%' in err + assert '100%' in err + + +def test_contains(capsys): + """Test __contains__ doesn't iterate""" + with tqdm(list(range(9))) as t: + assert 9 not in t + assert all(i in t for i in range(9)) + out, err = capsys.readouterr() + assert not out + assert ' 0%' in err + assert '100%' not in err diff --git a/miniconda3/pkgs/tqdm-4.67.3-py313h7040dfc_1/info/test/tests/tests_utils.py b/miniconda3/pkgs/tqdm-4.67.3-py313h7040dfc_1/info/test/tests/tests_utils.py new file mode 100644 index 0000000000000000000000000000000000000000..6cf1e6cf98551fa513098304b126049919ef8a3f --- /dev/null +++ b/miniconda3/pkgs/tqdm-4.67.3-py313h7040dfc_1/info/test/tests/tests_utils.py @@ -0,0 +1,51 @@ +from ast import literal_eval +from collections import defaultdict +from typing import Union # py<3.10 + +from tqdm.utils import envwrap + + +def test_envwrap(monkeypatch): + """Test @envwrap (basic)""" + monkeypatch.setenv('FUNC_A', "42") + monkeypatch.setenv('FUNC_TyPe_HiNt', "1337") + monkeypatch.setenv('FUNC_Unused', "x") + + @envwrap("FUNC_") + def func(a=1, b=2, type_hint: int = None): + return a, b, type_hint + + assert (42, 2, 1337) == func() + assert (99, 2, 1337) == func(a=99) + + +def test_envwrap_types(monkeypatch): + """Test @envwrap(types)""" + monkeypatch.setenv('FUNC_notype', "3.14159") + + @envwrap("FUNC_", types=defaultdict(lambda: literal_eval)) + def func(notype=None): + return notype + + assert 3.14159 == func() + + monkeypatch.setenv('FUNC_number', "1") + monkeypatch.setenv('FUNC_string', "1") + + @envwrap("FUNC_", types={'number': int}) + def nofallback(number=None, string=None): + return number, string + + assert 1, "1" == nofallback() + + +def test_envwrap_annotations(monkeypatch): + """Test @envwrap with typehints""" + monkeypatch.setenv('FUNC_number', "1.1") + monkeypatch.setenv('FUNC_string', "1.1") + + @envwrap("FUNC_") + def annotated(number: Union[int, float] = None, string: int = None): + return number, string + + assert 1.1, "1.1" == annotated() diff --git a/miniconda3/pkgs/tqdm-4.67.3-py313h7040dfc_1/info/test/tests/tests_version.py b/miniconda3/pkgs/tqdm-4.67.3-py313h7040dfc_1/info/test/tests/tests_version.py new file mode 100644 index 0000000000000000000000000000000000000000..495c797f27a0f2dad1a4057375a4a905f459a81a --- /dev/null +++ b/miniconda3/pkgs/tqdm-4.67.3-py313h7040dfc_1/info/test/tests/tests_version.py @@ -0,0 +1,14 @@ +"""Test `tqdm.__version__`.""" +import re +from ast import literal_eval + + +def test_version(): + """Test version string""" + from tqdm import __version__ + version_parts = re.split('[.-]', __version__) + if __version__ != "UNKNOWN": + assert 3 <= len(version_parts), "must have at least Major.minor.patch" + assert all( + isinstance(literal_eval(i), int) for i in version_parts[:3] + ), "Version Major.minor.patch must be 3 integers" diff --git a/miniconda3/pkgs/tqdm-4.67.3-py313h7040dfc_1/lib/python3.13/site-packages/tqdm-4.67.3.dist-info/INSTALLER b/miniconda3/pkgs/tqdm-4.67.3-py313h7040dfc_1/lib/python3.13/site-packages/tqdm-4.67.3.dist-info/INSTALLER new file mode 100644 index 0000000000000000000000000000000000000000..f79e4cb9aaf0b2d9e8ba78861e2071317b2384b3 --- /dev/null +++ b/miniconda3/pkgs/tqdm-4.67.3-py313h7040dfc_1/lib/python3.13/site-packages/tqdm-4.67.3.dist-info/INSTALLER @@ -0,0 +1 @@ +conda \ No newline at end of file diff --git a/miniconda3/pkgs/tqdm-4.67.3-py313h7040dfc_1/lib/python3.13/site-packages/tqdm-4.67.3.dist-info/METADATA b/miniconda3/pkgs/tqdm-4.67.3-py313h7040dfc_1/lib/python3.13/site-packages/tqdm-4.67.3.dist-info/METADATA new file mode 100644 index 0000000000000000000000000000000000000000..fb6453e5b2468e0f16b4653f413868ba32e0930c --- /dev/null +++ b/miniconda3/pkgs/tqdm-4.67.3-py313h7040dfc_1/lib/python3.13/site-packages/tqdm-4.67.3.dist-info/METADATA @@ -0,0 +1,1595 @@ +Metadata-Version: 2.4 +Name: tqdm +Version: 4.67.3 +Summary: Fast, Extensible Progress Meter +Maintainer-email: tqdm developers +License: MPL-2.0 AND MIT +Project-URL: homepage, https://tqdm.github.io +Project-URL: repository, https://github.com/tqdm/tqdm +Project-URL: changelog, https://tqdm.github.io/releases +Project-URL: wiki, https://github.com/tqdm/tqdm/wiki +Keywords: progressbar,progressmeter,progress,bar,meter,rate,eta,console,terminal,time +Classifier: Development Status :: 5 - Production/Stable +Classifier: Environment :: Console +Classifier: Environment :: MacOS X +Classifier: Environment :: Other Environment +Classifier: Environment :: Win32 (MS Windows) +Classifier: Environment :: X11 Applications +Classifier: Framework :: IPython +Classifier: Framework :: Jupyter +Classifier: Intended Audience :: Developers +Classifier: Intended Audience :: Education +Classifier: Intended Audience :: End Users/Desktop +Classifier: Intended Audience :: Other Audience +Classifier: Intended Audience :: System Administrators +Classifier: Operating System :: MacOS +Classifier: Operating System :: MacOS :: MacOS X +Classifier: Operating System :: Microsoft +Classifier: Operating System :: Microsoft :: MS-DOS +Classifier: Operating System :: Microsoft :: Windows +Classifier: Operating System :: POSIX +Classifier: Operating System :: POSIX :: BSD +Classifier: Operating System :: POSIX :: BSD :: FreeBSD +Classifier: Operating System :: POSIX :: Linux +Classifier: Operating System :: POSIX :: SunOS/Solaris +Classifier: Operating System :: Unix +Classifier: Programming Language :: Python +Classifier: Programming Language :: Python :: 3 +Classifier: Programming Language :: Python :: 3.7 +Classifier: Programming Language :: Python :: 3.8 +Classifier: Programming Language :: Python :: 3.9 +Classifier: Programming Language :: Python :: 3.10 +Classifier: Programming Language :: Python :: 3.11 +Classifier: Programming Language :: Python :: 3.12 +Classifier: Programming Language :: Python :: 3.13 +Classifier: Programming Language :: Python :: 3 :: Only +Classifier: Programming Language :: Python :: Implementation +Classifier: Programming Language :: Python :: Implementation :: IronPython +Classifier: Programming Language :: Python :: Implementation :: PyPy +Classifier: Programming Language :: Unix Shell +Classifier: Topic :: Desktop Environment +Classifier: Topic :: Education :: Computer Aided Instruction (CAI) +Classifier: Topic :: Education :: Testing +Classifier: Topic :: Office/Business +Classifier: Topic :: Other/Nonlisted Topic +Classifier: Topic :: Software Development :: Build Tools +Classifier: Topic :: Software Development :: Libraries +Classifier: Topic :: Software Development :: Libraries :: Python Modules +Classifier: Topic :: Software Development :: Pre-processors +Classifier: Topic :: Software Development :: User Interfaces +Classifier: Topic :: System :: Installation/Setup +Classifier: Topic :: System :: Logging +Classifier: Topic :: System :: Monitoring +Classifier: Topic :: System :: Shells +Classifier: Topic :: Terminals +Classifier: Topic :: Utilities +Requires-Python: >=3.7 +Description-Content-Type: text/x-rst +License-File: LICENCE +Requires-Dist: colorama; platform_system == "Windows" +Requires-Dist: importlib_metadata; python_version < "3.8" +Provides-Extra: dev +Requires-Dist: pytest>=6; extra == "dev" +Requires-Dist: pytest-cov; extra == "dev" +Requires-Dist: pytest-timeout; extra == "dev" +Requires-Dist: pytest-asyncio>=0.24; extra == "dev" +Requires-Dist: nbval; extra == "dev" +Provides-Extra: discord +Requires-Dist: requests; extra == "discord" +Provides-Extra: slack +Requires-Dist: slack-sdk; extra == "slack" +Provides-Extra: telegram +Requires-Dist: requests; extra == "telegram" +Provides-Extra: notebook +Requires-Dist: ipywidgets>=6; extra == "notebook" +Dynamic: license-file + +|Logo| + +tqdm +==== + +|Py-Versions| |Versions| |Conda-Forge-Status| |Docker| |Snapcraft| + +|Build-Status| |Coverage-Status| |Branch-Coverage-Status| |Codacy-Grade| |Libraries-Rank| |PyPI-Downloads| + +|LICENCE| |OpenHub-Status| |binder-demo| |awesome-python| + +``tqdm`` derives from the Arabic word *taqaddum* (تقدّم) which can mean "progress," +and is an abbreviation for "I love you so much" in Spanish (*te quiero demasiado*). + +Instantly make your loops show a smart progress meter - just wrap any +iterable with ``tqdm(iterable)``, and you're done! + +.. code:: python + + from tqdm import tqdm + for i in tqdm(range(10000)): + ... + +``76%|ā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆ Ā Ā Ā Ā Ā Ā  | 7568/10000 [00:33<00:10, 229.00it/s]`` + +``trange(N)`` can be also used as a convenient shortcut for +``tqdm(range(N))``. + +|Screenshot| + |Video| |Slides| |Merch| + +It can also be executed as a module with pipes: + +.. code:: sh + + $ seq 9999999 | tqdm --bytes | wc -l + 75.2MB [00:00, 217MB/s] + 9999999 + + $ tar -zcf - docs/ | tqdm --bytes --total `du -sb docs/ | cut -f1` \ + > backup.tgz + 32%|ā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā– | 8.89G/27.9G [00:42<01:31, 223MB/s] + +Overhead is low -- about 60ns per iteration (80ns with ``tqdm.gui``), and is +unit tested against performance regression. +By comparison, the well-established +`ProgressBar `__ has +an 800ns/iter overhead. + +In addition to its low overhead, ``tqdm`` uses smart algorithms to predict +the remaining time and to skip unnecessary iteration displays, which allows +for a negligible overhead in most cases. + +``tqdm`` works on any platform +(Linux, Windows, Mac, FreeBSD, NetBSD, Solaris/SunOS), +in any console or in a GUI, and is also friendly with IPython/Jupyter notebooks. + +``tqdm`` does not require any dependencies (not even ``curses``!), just +Python and an environment supporting ``carriage return \r`` and +``line feed \n`` control characters. + +------------------------------------------ + +.. contents:: Table of contents + :backlinks: top + :local: + + +Installation +------------ + +Latest PyPI stable release +~~~~~~~~~~~~~~~~~~~~~~~~~~ + +|Versions| |PyPI-Downloads| |Libraries-Dependents| + +.. code:: sh + + pip install tqdm + +Latest development release on GitHub +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +|GitHub-Status| |GitHub-Stars| |GitHub-Commits| |GitHub-Forks| |GitHub-Updated| + +Pull and install pre-release ``devel`` branch: + +.. code:: sh + + pip install "git+https://github.com/tqdm/tqdm.git@devel#egg=tqdm" + +Latest Conda release +~~~~~~~~~~~~~~~~~~~~ + +|Conda-Forge-Status| + +.. code:: sh + + conda install -c conda-forge tqdm + +Latest Snapcraft release +~~~~~~~~~~~~~~~~~~~~~~~~ + +|Snapcraft| + +There are 3 channels to choose from: + +.. code:: sh + + snap install tqdm # implies --stable, i.e. latest tagged release + snap install tqdm --candidate # master branch + snap install tqdm --edge # devel branch + +Note that ``snap`` binaries are purely for CLI use (not ``import``-able), and +automatically set up ``bash`` tab-completion. + +Latest Docker release +~~~~~~~~~~~~~~~~~~~~~ + +|Docker| + +.. code:: sh + + docker pull tqdm/tqdm + docker run -i --rm tqdm/tqdm --help + +Other +~~~~~ + +There are other (unofficial) places where ``tqdm`` may be downloaded, particularly for CLI use: + +|Repology| + +.. |Repology| image:: https://repology.org/badge/tiny-repos/python:tqdm.svg + :target: https://repology.org/project/python:tqdm/versions + +Changelog +--------- + +The list of all changes is available either on GitHub's Releases: +|GitHub-Status|, on the +`wiki `__, or on the +`website `__. + + +Usage +----- + +``tqdm`` is very versatile and can be used in a number of ways. +The three main ones are given below. + +Iterable-based +~~~~~~~~~~~~~~ + +Wrap ``tqdm()`` around any iterable: + +.. code:: python + + from tqdm import tqdm + from time import sleep + + text = "" + for char in tqdm(["a", "b", "c", "d"]): + sleep(0.25) + text = text + char + +``trange(i)`` is a special optimised instance of ``tqdm(range(i))``: + +.. code:: python + + from tqdm import trange + + for i in trange(100): + sleep(0.01) + +Instantiation outside of the loop allows for manual control over ``tqdm()``: + +.. code:: python + + pbar = tqdm(["a", "b", "c", "d"]) + for char in pbar: + sleep(0.25) + pbar.set_description("Processing %s" % char) + +Manual +~~~~~~ + +Manual control of ``tqdm()`` updates using a ``with`` statement: + +.. code:: python + + with tqdm(total=100) as pbar: + for i in range(10): + sleep(0.1) + pbar.update(10) + +If the optional variable ``total`` (or an iterable with ``len()``) is +provided, predictive stats are displayed. + +``with`` is also optional (you can just assign ``tqdm()`` to a variable, +but in this case don't forget to ``del`` or ``close()`` at the end: + +.. code:: python + + pbar = tqdm(total=100) + for i in range(10): + sleep(0.1) + pbar.update(10) + pbar.close() + +Module +~~~~~~ + +Perhaps the most wonderful use of ``tqdm`` is in a script or on the command +line. Simply inserting ``tqdm`` (or ``python -m tqdm``) between pipes will pass +through all ``stdin`` to ``stdout`` while printing progress to ``stderr``. + +The example below demonstrate counting the number of lines in all Python files +in the current directory, with timing information included. + +.. code:: sh + + $ time find . -name '*.py' -type f -exec cat \{} \; | wc -l + 857365 + + real 0m3.458s + user 0m0.274s + sys 0m3.325s + + $ time find . -name '*.py' -type f -exec cat \{} \; | tqdm | wc -l + 857366it [00:03, 246471.31it/s] + 857365 + + real 0m3.585s + user 0m0.862s + sys 0m3.358s + +Note that the usual arguments for ``tqdm`` can also be specified. + +.. code:: sh + + $ find . -name '*.py' -type f -exec cat \{} \; | + tqdm --unit loc --unit_scale --total 857366 >> /dev/null + 100%|ā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆ| 857K/857K [00:04<00:00, 246Kloc/s] + +Backing up a large directory? + +.. code:: sh + + $ tar -zcf - docs/ | tqdm --bytes --total `du -sb docs/ | cut -f1` \ + > backup.tgz + 44%|ā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–Š | 153M/352M [00:14<00:18, 11.0MB/s] + +This can be beautified further: + +.. code:: sh + + $ BYTES=$(du -sb docs/ | cut -f1) + $ tar -cf - docs/ \ + | tqdm --bytes --total "$BYTES" --desc Processing | gzip \ + | tqdm --bytes --total "$BYTES" --desc Compressed --position 1 \ + > ~/backup.tgz + Processing: 100%|ā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆ| 352M/352M [00:14<00:00, 30.2MB/s] + Compressed: 42%|ā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–Ž | 148M/352M [00:14<00:19, 10.9MB/s] + +Or done on a file level using 7-zip: + +.. code:: sh + + $ 7z a -bd -r backup.7z docs/ | grep Compressing \ + | tqdm --total $(find docs/ -type f | wc -l) --unit files \ + | grep -v Compressing + 100%|ā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–‰| 15327/15327 [01:00<00:00, 712.96files/s] + +Pre-existing CLI programs already outputting basic progress information will +benefit from ``tqdm``'s ``--update`` and ``--update_to`` flags: + +.. code:: sh + + $ seq 3 0.1 5 | tqdm --total 5 --update_to --null + 100%|ā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆ| 5.0/5 [00:00<00:00, 9673.21it/s] + $ seq 10 | tqdm --update --null # 1 + 2 + ... + 10 = 55 iterations + 55it [00:00, 90006.52it/s] + +FAQ and Known Issues +-------------------- + +|GitHub-Issues| + +The most common issues relate to excessive output on multiple lines, instead +of a neat one-line progress bar. + +- Consoles in general: require support for carriage return (``CR``, ``\r``). + + * Some cloud logging consoles which don't support ``\r`` properly + (`cloudwatch `__, + `K8s `__) may benefit from + ``export TQDM_POSITION=-1``. + +- Nested progress bars: + + * Consoles in general: require support for moving cursors up to the + previous line. For example, + `IDLE `__, + `ConEmu `__ and + `PyCharm `__ (also + `here `__, + `here `__, and + `here `__) + lack full support. + * Windows: additionally may require the Python module ``colorama`` + to ensure nested bars stay within their respective lines. + +- Unicode: + + * Environments which report that they support unicode will have solid smooth + progressbars. The fallback is an ``ascii``-only bar. + * Windows consoles often only partially support unicode and thus + `often require explicit ascii=True `__ + (also `here `__). This is due to + either normal-width unicode characters being incorrectly displayed as + "wide", or some unicode characters not rendering. + +- Wrapping generators: + + * Generator wrapper functions tend to hide the length of iterables. + ``tqdm`` does not. + * Replace ``tqdm(enumerate(...))`` with ``enumerate(tqdm(...))`` or + ``tqdm(enumerate(x), total=len(x), ...)``. + The same applies to ``numpy.ndenumerate``. + * Replace ``tqdm(zip(a, b))`` with ``zip(tqdm(a), b)`` or even + ``zip(tqdm(a), tqdm(b))``. + * The same applies to ``itertools``. + * Some useful convenience functions can be found under ``tqdm.contrib``. + +- `No intermediate output in docker-compose `__: + use ``docker-compose run`` instead of ``docker-compose up`` and ``tty: true``. + +- Overriding defaults via environment variables: + e.g. in CI/cloud jobs, ``export TQDM_MININTERVAL=5`` to avoid log spam. + This override logic is handled by the ``tqdm.utils.envwrap`` decorator + (useful independent of ``tqdm``). + +If you come across any other difficulties, browse and file |GitHub-Issues|. + +Documentation +------------- + +|Py-Versions| |README-Hits| (Since 19 May 2016) + +.. code:: python + + class tqdm(): + """ + Decorate an iterable object, returning an iterator which acts exactly + like the original iterable, but prints a dynamically updating + progressbar every time a value is requested. + """ + + @envwrap("TQDM_") # override defaults via env vars + def __init__(self, iterable=None, desc=None, total=None, leave=True, + file=None, ncols=None, mininterval=0.1, + maxinterval=10.0, miniters=None, ascii=None, disable=False, + unit='it', unit_scale=False, dynamic_ncols=False, + smoothing=0.3, bar_format=None, initial=0, position=None, + postfix=None, unit_divisor=1000, write_bytes=False, + lock_args=None, nrows=None, colour=None, delay=0): + +Parameters +~~~~~~~~~~ + +* iterable : iterable, optional + Iterable to decorate with a progressbar. + Leave blank to manually manage the updates. +* desc : str, optional + Prefix for the progressbar. +* total : int or float, optional + The number of expected iterations. If unspecified, + len(iterable) is used if possible. If float("inf") or as a last + resort, only basic progress statistics are displayed + (no ETA, no progressbar). + If ``gui`` is True and this parameter needs subsequent updating, + specify an initial arbitrary large positive number, + e.g. 9e9. +* leave : bool, optional + If [default: True], keeps all traces of the progressbar + upon termination of iteration. + If ``None``, will leave only if ``position`` is ``0``. +* file : ``io.TextIOWrapper`` or ``io.StringIO``, optional + Specifies where to output the progress messages + (default: sys.stderr). Uses ``file.write(str)`` and ``file.flush()`` + methods. For encoding, see ``write_bytes``. +* ncols : int, optional + The width of the entire output message. If specified, + dynamically resizes the progressbar to stay within this bound. + If unspecified, attempts to use environment width. The + fallback is a meter width of 10 and no limit for the counter and + statistics. If 0, will not print any meter (only stats). +* mininterval : float, optional + Minimum progress display update interval [default: 0.1] seconds. +* maxinterval : float, optional + Maximum progress display update interval [default: 10] seconds. + Automatically adjusts ``miniters`` to correspond to ``mininterval`` + after long display update lag. Only works if ``dynamic_miniters`` + or monitor thread is enabled. +* miniters : int or float, optional + Minimum progress display update interval, in iterations. + If 0 and ``dynamic_miniters``, will automatically adjust to equal + ``mininterval`` (more CPU efficient, good for tight loops). + If > 0, will skip display of specified number of iterations. + Tweak this and ``mininterval`` to get very efficient loops. + If your progress is erratic with both fast and slow iterations + (network, skipping items, etc) you should set miniters=1. +* ascii : bool or str, optional + If unspecified or False, use unicode (smooth blocks) to fill + the meter. The fallback is to use ASCII characters " 123456789#". +* disable : bool, optional + Whether to disable the entire progressbar wrapper + [default: False]. If set to None, disable on non-TTY. +* unit : str, optional + String that will be used to define the unit of each iteration + [default: it]. +* unit_scale : bool or int or float, optional + If 1 or True, the number of iterations will be reduced/scaled + automatically and a metric prefix following the + International System of Units standard will be added + (kilo, mega, etc.) [default: False]. If any other non-zero + number, will scale ``total`` and ``n``. +* dynamic_ncols : bool, optional + If set, constantly alters ``ncols`` and ``nrows`` to the + environment (allowing for window resizes) [default: False]. +* smoothing : float, optional + Exponential moving average smoothing factor for speed estimates + (ignored in GUI mode). Ranges from 0 (average speed) to 1 + (current/instantaneous speed) [default: 0.3]. +* bar_format : str, optional + Specify a custom bar string formatting. May impact performance. + [default: '{l_bar}{bar}{r_bar}'], where + l_bar='{desc}: {percentage:3.0f}%|' and + r_bar='| {n_fmt}/{total_fmt} [{elapsed}<{remaining}, ' + '{rate_fmt}{postfix}]' + Possible vars: l_bar, bar, r_bar, n, n_fmt, total, total_fmt, + percentage, elapsed, elapsed_s, ncols, nrows, desc, unit, + rate, rate_fmt, rate_noinv, rate_noinv_fmt, + rate_inv, rate_inv_fmt, postfix, unit_divisor, + remaining, remaining_s, eta. + Note that a trailing ": " is automatically removed after {desc} + if the latter is empty. +* initial : int or float, optional + The initial counter value. Useful when restarting a progress + bar [default: 0]. If using float, consider specifying ``{n:.3f}`` + or similar in ``bar_format``, or specifying ``unit_scale``. +* position : int, optional + Specify the line offset to print this bar (starting from 0) + Automatic if unspecified. + Useful to manage multiple bars at once (eg, from threads). +* postfix : dict or ``*``, optional + Specify additional stats to display at the end of the bar. + Calls ``set_postfix(**postfix)`` if possible (dict). +* unit_divisor : float, optional + [default: 1000], ignored unless ``unit_scale`` is True. +* write_bytes : bool, optional + Whether to write bytes. If (default: False) will write unicode. +* lock_args : tuple, optional + Passed to ``refresh`` for intermediate output + (initialisation, iterating, and updating). +* nrows : int, optional + The screen height. If specified, hides nested bars outside this + bound. If unspecified, attempts to use environment height. + The fallback is 20. +* colour : str, optional + Bar colour (e.g. 'green', '#00ff00'). +* delay : float, optional + Don't display until [default: 0] seconds have elapsed. + +Extra CLI Options +~~~~~~~~~~~~~~~~~ + +* delim : chr, optional + Delimiting character [default: '\n']. Use '\0' for null. + N.B.: on Windows systems, Python converts '\n' to '\r\n'. +* buf_size : int, optional + String buffer size in bytes [default: 256] + used when ``delim`` is specified. +* bytes : bool, optional + If true, will count bytes, ignore ``delim``, and default + ``unit_scale`` to True, ``unit_divisor`` to 1024, and ``unit`` to 'B'. +* tee : bool, optional + If true, passes ``stdin`` to both ``stderr`` and ``stdout``. +* update : bool, optional + If true, will treat input as newly elapsed iterations, + i.e. numbers to pass to ``update()``. Note that this is slow + (~2e5 it/s) since every input must be decoded as a number. +* update_to : bool, optional + If true, will treat input as total elapsed iterations, + i.e. numbers to assign to ``self.n``. Note that this is slow + (~2e5 it/s) since every input must be decoded as a number. +* null : bool, optional + If true, will discard input (no stdout). +* manpath : str, optional + Directory in which to install tqdm man pages. +* comppath : str, optional + Directory in which to place tqdm completion. +* log : str, optional + CRITICAL|FATAL|ERROR|WARN(ING)|[default: 'INFO']|DEBUG|NOTSET. + +Returns +~~~~~~~ + +* out : decorated iterator. + +.. code:: python + + class tqdm(): + def update(self, n=1): + """ + Manually update the progress bar, useful for streams + such as reading files. + E.g.: + >>> t = tqdm(total=filesize) # Initialise + >>> for current_buffer in stream: + ... ... + ... t.update(len(current_buffer)) + >>> t.close() + The last line is highly recommended, but possibly not necessary if + ``t.update()`` will be called in such a way that ``filesize`` will be + exactly reached and printed. + + Parameters + ---------- + n : int or float, optional + Increment to add to the internal counter of iterations + [default: 1]. If using float, consider specifying ``{n:.3f}`` + or similar in ``bar_format``, or specifying ``unit_scale``. + + Returns + ------- + out : bool or None + True if a ``display()`` was triggered. + """ + + def close(self): + """Cleanup and (if leave=False) close the progressbar.""" + + def clear(self, nomove=False): + """Clear current bar display.""" + + def refresh(self): + """ + Force refresh the display of this bar. + + Parameters + ---------- + nolock : bool, optional + If ``True``, does not lock. + If [default: ``False``]: calls ``acquire()`` on internal lock. + lock_args : tuple, optional + Passed to internal lock's ``acquire()``. + If specified, will only ``display()`` if ``acquire()`` returns ``True``. + """ + + def unpause(self): + """Restart tqdm timer from last print time.""" + + def reset(self, total=None): + """ + Resets to 0 iterations for repeated use. + + Consider combining with ``leave=True``. + + Parameters + ---------- + total : int or float, optional. Total to use for the new bar. + """ + + def set_description(self, desc=None, refresh=True): + """ + Set/modify description of the progress bar. + + Parameters + ---------- + desc : str, optional + refresh : bool, optional + Forces refresh [default: True]. + """ + + def set_postfix(self, ordered_dict=None, refresh=True, **tqdm_kwargs): + """ + Set/modify postfix (additional stats) + with automatic formatting based on datatype. + + Parameters + ---------- + ordered_dict : dict or OrderedDict, optional + refresh : bool, optional + Forces refresh [default: True]. + kwargs : dict, optional + """ + + @classmethod + def write(cls, s, file=sys.stdout, end="\n"): + """Print a message via tqdm (without overlap with bars).""" + + @property + def format_dict(self): + """Public API for read-only member access.""" + + def display(self, msg=None, pos=None): + """ + Use ``self.sp`` to display ``msg`` in the specified ``pos``. + + Consider overloading this function when inheriting to use e.g.: + ``self.some_frontend(**self.format_dict)`` instead of ``self.sp``. + + Parameters + ---------- + msg : str, optional. What to display (default: ``repr(self)``). + pos : int, optional. Position to ``moveto`` + (default: ``abs(self.pos)``). + """ + + @classmethod + @contextmanager + def wrapattr(cls, stream, method, total=None, bytes=True, **tqdm_kwargs): + """ + stream : file-like object. + method : str, "read" or "write". The result of ``read()`` and + the first argument of ``write()`` should have a ``len()``. + + >>> with tqdm.wrapattr(file_obj, "read", total=file_obj.size) as fobj: + ... while True: + ... chunk = fobj.read(chunk_size) + ... if not chunk: + ... break + """ + + @classmethod + def pandas(cls, *targs, **tqdm_kwargs): + """Registers the current `tqdm` class with `pandas`.""" + + def trange(*args, **tqdm_kwargs): + """Shortcut for `tqdm(range(*args), **tqdm_kwargs)`.""" + +Convenience Functions +~~~~~~~~~~~~~~~~~~~~~ + +.. code:: python + + def tqdm.contrib.tenumerate(iterable, start=0, total=None, + tqdm_class=tqdm.auto.tqdm, **tqdm_kwargs): + """Equivalent of `numpy.ndenumerate` or builtin `enumerate`.""" + + def tqdm.contrib.tzip(iter1, *iter2plus, **tqdm_kwargs): + """Equivalent of builtin `zip`.""" + + def tqdm.contrib.tmap(function, *sequences, **tqdm_kwargs): + """Equivalent of builtin `map`.""" + +Submodules +~~~~~~~~~~ + +.. code:: python + + class tqdm.notebook.tqdm(tqdm.tqdm): + """IPython/Jupyter Notebook widget.""" + + class tqdm.auto.tqdm(tqdm.tqdm): + """Automatically chooses beween `tqdm.notebook` and `tqdm.tqdm`.""" + + class tqdm.asyncio.tqdm(tqdm.tqdm): + """Asynchronous version.""" + @classmethod + def as_completed(cls, fs, *, loop=None, timeout=None, total=None, + **tqdm_kwargs): + """Wrapper for `asyncio.as_completed`.""" + + class tqdm.gui.tqdm(tqdm.tqdm): + """Matplotlib GUI version.""" + + class tqdm.tk.tqdm(tqdm.tqdm): + """Tkinter GUI version.""" + + class tqdm.rich.tqdm(tqdm.tqdm): + """`rich.progress` version.""" + + class tqdm.keras.TqdmCallback(keras.callbacks.Callback): + """Keras callback for epoch and batch progress.""" + + class tqdm.dask.TqdmCallback(dask.callbacks.Callback): + """Dask callback for task progress.""" + + +``contrib`` ++++++++++++ + +The ``tqdm.contrib`` package also contains experimental modules: + +- ``tqdm.contrib.itertools``: Thin wrappers around ``itertools`` +- ``tqdm.contrib.concurrent``: Thin wrappers around ``concurrent.futures`` +- ``tqdm.contrib.slack``: Posts to `Slack `__ bots +- ``tqdm.contrib.discord``: Posts to `Discord `__ bots +- ``tqdm.contrib.telegram``: Posts to `Telegram `__ bots +- ``tqdm.contrib.bells``: Automagically enables all optional features + + * ``auto``, ``pandas``, ``slack``, ``discord``, ``telegram`` + +Examples and Advanced Usage +--------------------------- + +- See the `examples `__ + folder; +- import the module and run ``help()``; +- consult the `wiki `__; + + * this has an + `excellent article `__ + on how to make a **great** progressbar; + +- check out the `slides from PyData London `__, or +- run the |binder-demo|. + +Description and additional stats +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Custom information can be displayed and updated dynamically on ``tqdm`` bars +with the ``desc`` and ``postfix`` arguments: + +.. code:: python + + from tqdm import tqdm, trange + from random import random, randint + from time import sleep + + with trange(10) as t: + for i in t: + # Description will be displayed on the left + t.set_description('GEN %i' % i) + # Postfix will be displayed on the right, + # formatted automatically based on argument's datatype + t.set_postfix(loss=random(), gen=randint(1,999), str='h', + lst=[1, 2]) + sleep(0.1) + + with tqdm(total=10, bar_format="{postfix[0]} {postfix[1][value]:>8.2g}", + postfix=["Batch", {"value": 0}]) as t: + for i in range(10): + sleep(0.1) + t.postfix[1]["value"] = i / 2 + t.update() + +Points to remember when using ``{postfix[...]}`` in the ``bar_format`` string: + +- ``postfix`` also needs to be passed as an initial argument in a compatible + format, and +- ``postfix`` will be auto-converted to a string if it is a ``dict``-like + object. To prevent this behaviour, insert an extra item into the dictionary + where the key is not a string. + +Additional ``bar_format`` parameters may also be defined by overriding +``format_dict``, and the bar itself may be modified using ``ascii``: + +.. code:: python + + from tqdm import tqdm + class TqdmExtraFormat(tqdm): + """Provides a `total_time` format parameter""" + @property + def format_dict(self): + d = super().format_dict + total_time = d["elapsed"] * (d["total"] or 0) / max(d["n"], 1) + d.update(total_time=self.format_interval(total_time) + " in total") + return d + + for i in TqdmExtraFormat( + range(9), ascii=" .oO0", + bar_format="{total_time}: {percentage:.0f}%|{bar}{r_bar}"): + if i == 4: + break + +.. code:: + + 00:00 in total: 44%|0000. | 4/9 [00:00<00:00, 962.93it/s] + +Note that ``{bar}`` also supports a format specifier ``[width][type]``. + +- ``width`` + + * unspecified (default): automatic to fill ``ncols`` + * ``int >= 0``: fixed width overriding ``ncols`` logic + * ``int < 0``: subtract from the automatic default + +- ``type`` + + * ``a``: ascii (``ascii=True`` override) + * ``u``: unicode (``ascii=False`` override) + * ``b``: blank (``ascii=" "`` override) + +This means a fixed bar with right-justified text may be created by using: +``bar_format="{l_bar}{bar:10}|{bar:-10b}right-justified"`` + +Nested progress bars +~~~~~~~~~~~~~~~~~~~~ + +``tqdm`` supports nested progress bars. Here's an example: + +.. code:: python + + from tqdm.auto import trange + from time import sleep + + for i in trange(4, desc='1st loop'): + for j in trange(5, desc='2nd loop'): + for k in trange(50, desc='3rd loop', leave=False): + sleep(0.01) + +For manual control over positioning (e.g. for multi-processing use), +you may specify ``position=n`` where ``n=0`` for the outermost bar, +``n=1`` for the next, and so on. +However, it's best to check if ``tqdm`` can work without manual ``position`` +first. + +.. code:: python + + from time import sleep + from tqdm import trange, tqdm + from multiprocessing import Pool, RLock, freeze_support + + L = list(range(9)) + + def progresser(n): + interval = 0.001 / (n + 2) + total = 5000 + text = f"#{n}, est. {interval * total:<04.2}s" + for _ in trange(total, desc=text, position=n): + sleep(interval) + + if __name__ == '__main__': + freeze_support() # for Windows support + tqdm.set_lock(RLock()) # for managing output contention + p = Pool(initializer=tqdm.set_lock, initargs=(tqdm.get_lock(),)) + p.map(progresser, L) + +Note that in Python 3, ``tqdm.write`` is thread-safe: + +.. code:: python + + from time import sleep + from tqdm import tqdm, trange + from concurrent.futures import ThreadPoolExecutor + + L = list(range(9)) + + def progresser(n): + interval = 0.001 / (n + 2) + total = 5000 + text = f"#{n}, est. {interval * total:<04.2}s" + for _ in trange(total, desc=text): + sleep(interval) + if n == 6: + tqdm.write("n == 6 completed.") + tqdm.write("`tqdm.write()` is thread-safe in py3!") + + if __name__ == '__main__': + with ThreadPoolExecutor() as p: + p.map(progresser, L) + +Hooks and callbacks +~~~~~~~~~~~~~~~~~~~ + +``tqdm`` can easily support callbacks/hooks and manual updates. +Here's an example with ``urllib``: + +**``urllib.urlretrieve`` documentation** + + | [...] + | If present, the hook function will be called once + | on establishment of the network connection and once after each block read + | thereafter. The hook will be passed three arguments; a count of blocks + | transferred so far, a block size in bytes, and the total size of the file. + | [...] + +.. code:: python + + import urllib, os + from tqdm import tqdm + urllib = getattr(urllib, 'request', urllib) + + class TqdmUpTo(tqdm): + """Provides `update_to(n)` which uses `tqdm.update(delta_n)`.""" + def update_to(self, b=1, bsize=1, tsize=None): + """ + b : int, optional + Number of blocks transferred so far [default: 1]. + bsize : int, optional + Size of each block (in tqdm units) [default: 1]. + tsize : int, optional + Total size (in tqdm units). If [default: None] remains unchanged. + """ + if tsize is not None: + self.total = tsize + return self.update(b * bsize - self.n) # also sets self.n = b * bsize + + eg_link = "https://caspersci.uk.to/matryoshka.zip" + with TqdmUpTo(unit='B', unit_scale=True, unit_divisor=1024, miniters=1, + desc=eg_link.split('/')[-1]) as t: # all optional kwargs + urllib.urlretrieve(eg_link, filename=os.devnull, + reporthook=t.update_to, data=None) + t.total = t.n + +Inspired by `twine#242 `__. +Functional alternative in +`examples/tqdm_wget.py `__. + +It is recommend to use ``miniters=1`` whenever there is potentially +large differences in iteration speed (e.g. downloading a file over +a patchy connection). + +**Wrapping read/write methods** + +To measure throughput through a file-like object's ``read`` or ``write`` +methods, use ``CallbackIOWrapper``: + +.. code:: python + + from tqdm.auto import tqdm + from tqdm.utils import CallbackIOWrapper + + with tqdm(total=file_obj.size, + unit='B', unit_scale=True, unit_divisor=1024) as t: + fobj = CallbackIOWrapper(t.update, file_obj, "read") + while True: + chunk = fobj.read(chunk_size) + if not chunk: + break + t.reset() + # ... continue to use `t` for something else + +Alternatively, use the even simpler ``wrapattr`` convenience function, +which would condense both the ``urllib`` and ``CallbackIOWrapper`` examples +down to: + +.. code:: python + + import urllib, os + from tqdm import tqdm + + eg_link = "https://caspersci.uk.to/matryoshka.zip" + response = getattr(urllib, 'request', urllib).urlopen(eg_link) + with tqdm.wrapattr(open(os.devnull, "wb"), "write", + miniters=1, desc=eg_link.split('/')[-1], + total=getattr(response, 'length', None)) as fout: + for chunk in response: + fout.write(chunk) + +The ``requests`` equivalent is nearly identical: + +.. code:: python + + import requests, os + from tqdm import tqdm + + eg_link = "https://caspersci.uk.to/matryoshka.zip" + response = requests.get(eg_link, stream=True) + with tqdm.wrapattr(open(os.devnull, "wb"), "write", + miniters=1, desc=eg_link.split('/')[-1], + total=int(response.headers.get('content-length', 0))) as fout: + for chunk in response.iter_content(chunk_size=4096): + fout.write(chunk) + +**Custom callback** + +``tqdm`` is known for intelligently skipping unnecessary displays. To make a +custom callback take advantage of this, simply use the return value of +``update()``. This is set to ``True`` if a ``display()`` was triggered. + +.. code:: python + + from tqdm.auto import tqdm as std_tqdm + + def external_callback(*args, **kwargs): + ... + + class TqdmExt(std_tqdm): + def update(self, n=1): + displayed = super().update(n) + if displayed: + external_callback(**self.format_dict) + return displayed + +``asyncio`` +~~~~~~~~~~~ + +Note that ``break`` isn't currently caught by asynchronous iterators. +This means that ``tqdm`` cannot clean up after itself in this case: + +.. code:: python + + from tqdm.asyncio import tqdm + + async for i in tqdm(range(9)): + if i == 2: + break + +Instead, either call ``pbar.close()`` manually or use the context manager syntax: + +.. code:: python + + from tqdm.asyncio import tqdm + + with tqdm(range(9)) as pbar: + async for i in pbar: + if i == 2: + break + +Pandas Integration +~~~~~~~~~~~~~~~~~~ + +Due to popular demand we've added support for ``pandas`` -- here's an example +for ``DataFrame.progress_apply`` and ``DataFrameGroupBy.progress_apply``: + +.. code:: python + + import pandas as pd + import numpy as np + from tqdm import tqdm + + df = pd.DataFrame(np.random.randint(0, 100, (100000, 6))) + + # Register `pandas.progress_apply` and `pandas.Series.map_apply` with `tqdm` + # (can use `tqdm.gui.tqdm`, `tqdm.notebook.tqdm`, optional kwargs, etc.) + tqdm.pandas(desc="my bar!") + + # Now you can use `progress_apply` instead of `apply` + # and `progress_map` instead of `map` + df.progress_apply(lambda x: x**2) + # can also groupby: + # df.groupby(0).progress_apply(lambda x: x**2) + +In case you're interested in how this works (and how to modify it for your +own callbacks), see the +`examples `__ +folder or import the module and run ``help()``. + +Keras Integration +~~~~~~~~~~~~~~~~~ + +A ``keras`` callback is also available: + +.. code:: python + + from tqdm.keras import TqdmCallback + + ... + + model.fit(..., verbose=0, callbacks=[TqdmCallback()]) + +Dask Integration +~~~~~~~~~~~~~~~~ + +A ``dask`` callback is also available: + +.. code:: python + + from tqdm.dask import TqdmCallback + + with TqdmCallback(desc="compute"): + ... + arr.compute() + + # or use callback globally + cb = TqdmCallback(desc="global") + cb.register() + arr.compute() + +IPython/Jupyter Integration +~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +IPython/Jupyter is supported via the ``tqdm.notebook`` submodule: + +.. code:: python + + from tqdm.notebook import trange, tqdm + from time import sleep + + for i in trange(3, desc='1st loop'): + for j in tqdm(range(100), desc='2nd loop'): + sleep(0.01) + +In addition to ``tqdm`` features, the submodule provides a native Jupyter +widget (compatible with IPython v1-v4 and Jupyter), fully working nested bars +and colour hints (blue: normal, green: completed, red: error/interrupt, +light blue: no ETA); as demonstrated below. + +|Screenshot-Jupyter1| +|Screenshot-Jupyter2| +|Screenshot-Jupyter3| + +The ``notebook`` version supports percentage or pixels for overall width +(e.g.: ``ncols='100%'`` or ``ncols='480px'``). + +It is also possible to let ``tqdm`` automatically choose between +console or notebook versions by using the ``autonotebook`` submodule: + +.. code:: python + + from tqdm.autonotebook import tqdm + tqdm.pandas() + +Note that this will issue a ``TqdmExperimentalWarning`` if run in a notebook +since it is not meant to be possible to distinguish between ``jupyter notebook`` +and ``jupyter console``. Use ``auto`` instead of ``autonotebook`` to suppress +this warning. + +Note that notebooks will display the bar in the cell where it was created. +This may be a different cell from the one where it is used. +If this is not desired, either + +- delay the creation of the bar to the cell where it must be displayed, or +- create the bar with ``display=False``, and in a later cell call + ``display(bar.container)``: + +.. code:: python + + from tqdm.notebook import tqdm + pbar = tqdm(..., display=False) + +.. code:: python + + # different cell + display(pbar.container) + +The ``keras`` callback has a ``display()`` method which can be used likewise: + +.. code:: python + + from tqdm.keras import TqdmCallback + cbk = TqdmCallback(display=False) + +.. code:: python + + # different cell + cbk.display() + model.fit(..., verbose=0, callbacks=[cbk]) + +Another possibility is to have a single bar (near the top of the notebook) +which is constantly re-used (using ``reset()`` rather than ``close()``). +For this reason, the notebook version (unlike the CLI version) does not +automatically call ``close()`` upon ``Exception``. + +.. code:: python + + from tqdm.notebook import tqdm + pbar = tqdm() + +.. code:: python + + # different cell + iterable = range(100) + pbar.reset(total=len(iterable)) # initialise with new `total` + for i in iterable: + pbar.update() + pbar.refresh() # force print final status but don't `close()` + +Custom Integration +~~~~~~~~~~~~~~~~~~ + +To change the default arguments (such as making ``dynamic_ncols=True``), +simply use built-in Python magic: + +.. code:: python + + from functools import partial + from tqdm import tqdm as std_tqdm + tqdm = partial(std_tqdm, dynamic_ncols=True) + +For further customisation, +``tqdm`` may be inherited from to create custom callbacks (as with the +``TqdmUpTo`` example `above <#hooks-and-callbacks>`__) or for custom frontends +(e.g. GUIs such as notebook or plotting packages). In the latter case: + +1. ``def __init__()`` to call ``super().__init__(..., gui=True)`` to disable + terminal ``status_printer`` creation. +2. Redefine: ``close()``, ``clear()``, ``display()``. + +Consider overloading ``display()`` to use e.g. +``self.frontend(**self.format_dict)`` instead of ``self.sp(repr(self))``. + +Some submodule examples of inheritance: + +- `tqdm/notebook.py `__ +- `tqdm/gui.py `__ +- `tqdm/tk.py `__ +- `tqdm/contrib/slack.py `__ +- `tqdm/contrib/discord.py `__ +- `tqdm/contrib/telegram.py `__ + +Dynamic Monitor/Meter +~~~~~~~~~~~~~~~~~~~~~ + +You can use a ``tqdm`` as a meter which is not monotonically increasing. +This could be because ``n`` decreases (e.g. a CPU usage monitor) or ``total`` +changes. + +One example would be recursively searching for files. The ``total`` is the +number of objects found so far, while ``n`` is the number of those objects which +are files (rather than folders): + +.. code:: python + + from tqdm import tqdm + import os.path + + def find_files_recursively(path, show_progress=True): + files = [] + # total=1 assumes `path` is a file + t = tqdm(total=1, unit="file", disable=not show_progress) + if not os.path.exists(path): + raise IOError("Cannot find:" + path) + + def append_found_file(f): + files.append(f) + t.update() + + def list_found_dir(path): + """returns os.listdir(path) assuming os.path.isdir(path)""" + listing = os.listdir(path) + # subtract 1 since a "file" we found was actually this directory + t.total += len(listing) - 1 + # fancy way to give info without forcing a refresh + t.set_postfix(dir=path[-10:], refresh=False) + t.update(0) # may trigger a refresh + return listing + + def recursively_search(path): + if os.path.isdir(path): + for f in list_found_dir(path): + recursively_search(os.path.join(path, f)) + else: + append_found_file(path) + + recursively_search(path) + t.set_postfix(dir=path) + t.close() + return files + +Using ``update(0)`` is a handy way to let ``tqdm`` decide when to trigger a +display refresh to avoid console spamming. + +Writing messages +~~~~~~~~~~~~~~~~ + +This is a work in progress (see +`#737 `__). + +Since ``tqdm`` uses a simple printing mechanism to display progress bars, +you should not write any message in the terminal using ``print()`` while +a progressbar is open. + +To write messages in the terminal without any collision with ``tqdm`` bar +display, a ``.write()`` method is provided: + +.. code:: python + + from tqdm.auto import tqdm, trange + from time import sleep + + bar = trange(10) + for i in bar: + # Print using tqdm class method .write() + sleep(0.1) + if not (i % 3): + tqdm.write("Done task %i" % i) + # Can also use bar.write() + +By default, this will print to standard output ``sys.stdout``. but you can +specify any file-like object using the ``file`` argument. For example, this +can be used to redirect the messages writing to a log file or class. + +Redirecting writing +~~~~~~~~~~~~~~~~~~~ + +If using a library that can print messages to the console, editing the library +by replacing ``print()`` with ``tqdm.write()`` may not be desirable. +In that case, redirecting ``sys.stdout`` to ``tqdm.write()`` is an option. + +To redirect ``sys.stdout``, create a file-like class that will write +any input string to ``tqdm.write()``, and supply the arguments +``file=sys.stdout, dynamic_ncols=True``. + +A reusable canonical example is given below: + +.. code:: python + + from time import sleep + import contextlib + import sys + from tqdm import tqdm + from tqdm.contrib import DummyTqdmFile + + + @contextlib.contextmanager + def std_out_err_redirect_tqdm(): + orig_out_err = sys.stdout, sys.stderr + try: + sys.stdout, sys.stderr = map(DummyTqdmFile, orig_out_err) + yield orig_out_err[0] + # Relay exceptions + except Exception as exc: + raise exc + # Always restore sys.stdout/err if necessary + finally: + sys.stdout, sys.stderr = orig_out_err + + def some_fun(i): + print("Fee, fi, fo,".split()[i]) + + # Redirect stdout to tqdm.write() (don't forget the `as save_stdout`) + with std_out_err_redirect_tqdm() as orig_stdout: + # tqdm needs the original stdout + # and dynamic_ncols=True to autodetect console width + for i in tqdm(range(3), file=orig_stdout, dynamic_ncols=True): + sleep(.5) + some_fun(i) + + # After the `with`, printing is restored + print("Done!") + +Redirecting ``logging`` +~~~~~~~~~~~~~~~~~~~~~~~ + +Similar to ``sys.stdout``/``sys.stderr`` as detailed above, console ``logging`` +may also be redirected to ``tqdm.write()``. + +Warning: if also redirecting ``sys.stdout``/``sys.stderr``, make sure to +redirect ``logging`` first if needed. + +Helper methods are available in ``tqdm.contrib.logging``. For example: + +.. code:: python + + import logging + from tqdm import trange + from tqdm.contrib.logging import logging_redirect_tqdm + + LOG = logging.getLogger(__name__) + + if __name__ == '__main__': + logging.basicConfig(level=logging.INFO) + with logging_redirect_tqdm(): + for i in trange(9): + if i == 4: + LOG.info("console logging redirected to `tqdm.write()`") + # logging restored + +Monitoring thread, intervals and miniters +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +``tqdm`` implements a few tricks to increase efficiency and reduce overhead. + +- Avoid unnecessary frequent bar refreshing: ``mininterval`` defines how long + to wait between each refresh. ``tqdm`` always gets updated in the background, + but it will display only every ``mininterval``. +- Reduce number of calls to check system clock/time. +- ``mininterval`` is more intuitive to configure than ``miniters``. + A clever adjustment system ``dynamic_miniters`` will automatically adjust + ``miniters`` to the amount of iterations that fit into time ``mininterval``. + Essentially, ``tqdm`` will check if it's time to print without actually + checking time. This behaviour can be still be bypassed by manually setting + ``miniters``. + +However, consider a case with a combination of fast and slow iterations. +After a few fast iterations, ``dynamic_miniters`` will set ``miniters`` to a +large number. When iteration rate subsequently slows, ``miniters`` will +remain large and thus reduce display update frequency. To address this: + +- ``maxinterval`` defines the maximum time between display refreshes. + A concurrent monitoring thread checks for overdue updates and forces one + where necessary. + +The monitoring thread should not have a noticeable overhead, and guarantees +updates at least every 10 seconds by default. +This value can be directly changed by setting the ``monitor_interval`` of +any ``tqdm`` instance (i.e. ``t = tqdm.tqdm(...); t.monitor_interval = 2``). +The monitor thread may be disabled application-wide by setting +``tqdm.tqdm.monitor_interval = 0`` before instantiation of any ``tqdm`` bar. + + +Merch +----- + +You can buy `tqdm branded merch `__ now! + +Contributions +------------- + +|GitHub-Commits| |GitHub-Issues| |GitHub-PRs| |OpenHub-Status| |GitHub-Contributions| |CII Best Practices| + +All source code is hosted on `GitHub `__. +Contributions are welcome. + +See the +`CONTRIBUTING `__ +file for more information. + +Developers who have made significant contributions, ranked by *SLoC* +(surviving lines of code, +`git fame `__ ``-wMC --excl '\.(png|gif|jpg)$'``), +are: + +==================== ======================================================== ==== ================================ +Name ID SLoC Notes +==================== ======================================================== ==== ================================ +Casper da Costa-Luis `casperdcl `__ ~80% primary maintainer |Gift-Casper| +Stephen Larroque `lrq3000 `__ ~9% team member +Martin Zugnoni `martinzugnoni `__ ~3% +Daniel Ecer `de-code `__ ~2% +Richard Sheridan `richardsheridan `__ ~1% +Guangshuo Chen `chengs `__ ~1% +Helio Machado `0x2b3bfa0 `__ ~1% +Kyle Altendorf `altendky `__ <1% +Noam Yorav-Raphael `noamraph `__ <1% original author +Matthew Stevens `mjstevens777 `__ <1% +Hadrien Mary `hadim `__ <1% team member +Mikhail Korobov `kmike `__ <1% team member +==================== ======================================================== ==== ================================ + +Ports to Other Languages +~~~~~~~~~~~~~~~~~~~~~~~~ + +A list is available on +`this wiki page `__. + + +LICENCE +------- + +Open Source (OSI approved): |LICENCE| + +Citation information: |DOI| + +|README-Hits| (Since 19 May 2016) + +.. |Logo| image:: https://tqdm.github.io/img/logo.gif +.. |Screenshot| image:: https://tqdm.github.io/img/tqdm.gif +.. |Video| image:: https://tqdm.github.io/img/video.jpg + :target: https://tqdm.github.io/video +.. |Slides| image:: https://tqdm.github.io/img/slides.jpg + :target: https://tqdm.github.io/PyData2019/slides.html +.. |Merch| image:: https://tqdm.github.io/img/merch.jpg + :target: https://tqdm.github.io/merch +.. |Build-Status| image:: https://img.shields.io/github/actions/workflow/status/tqdm/tqdm/test.yml?branch=master&label=tqdm&logo=GitHub + :target: https://github.com/tqdm/tqdm/actions/workflows/test.yml +.. |Coverage-Status| image:: https://img.shields.io/coveralls/github/tqdm/tqdm/master?logo=coveralls + :target: https://coveralls.io/github/tqdm/tqdm +.. |Branch-Coverage-Status| image:: https://codecov.io/gh/tqdm/tqdm/branch/master/graph/badge.svg + :target: https://codecov.io/gh/tqdm/tqdm +.. |Codacy-Grade| image:: https://app.codacy.com/project/badge/Grade/3f965571598f44549c7818f29cdcf177 + :target: https://www.codacy.com/gh/tqdm/tqdm/dashboard +.. |CII Best Practices| image:: https://bestpractices.coreinfrastructure.org/projects/3264/badge + :target: https://bestpractices.coreinfrastructure.org/projects/3264 +.. |GitHub-Status| image:: https://img.shields.io/github/tag/tqdm/tqdm.svg?maxAge=86400&logo=github&logoColor=white + :target: https://github.com/tqdm/tqdm/releases +.. |GitHub-Forks| image:: https://img.shields.io/github/forks/tqdm/tqdm.svg?logo=github&logoColor=white + :target: https://github.com/tqdm/tqdm/network +.. |GitHub-Stars| image:: https://img.shields.io/github/stars/tqdm/tqdm.svg?logo=github&logoColor=white + :target: https://github.com/tqdm/tqdm/stargazers +.. |GitHub-Commits| image:: https://img.shields.io/github/commit-activity/y/tqdm/tqdm.svg?logo=git&logoColor=white + :target: https://github.com/tqdm/tqdm/graphs/commit-activity +.. |GitHub-Issues| image:: https://img.shields.io/github/issues-closed/tqdm/tqdm.svg?logo=github&logoColor=white + :target: https://github.com/tqdm/tqdm/issues?q= +.. |GitHub-PRs| image:: https://img.shields.io/github/issues-pr-closed/tqdm/tqdm.svg?logo=github&logoColor=white + :target: https://github.com/tqdm/tqdm/pulls +.. |GitHub-Contributions| image:: https://img.shields.io/github/contributors/tqdm/tqdm.svg?logo=github&logoColor=white + :target: https://github.com/tqdm/tqdm/graphs/contributors +.. |GitHub-Updated| image:: https://img.shields.io/github/last-commit/tqdm/tqdm/master.svg?logo=github&logoColor=white&label=pushed + :target: https://github.com/tqdm/tqdm/pulse +.. |Gift-Casper| image:: https://img.shields.io/badge/dynamic/json.svg?color=ff69b4&label=gifts%20received&prefix=%C2%A3&query=%24..sum&url=https%3A%2F%2Fcaspersci.uk.to%2Fgifts.json + :target: https://cdcl.ml/sponsor +.. |Versions| image:: https://img.shields.io/pypi/v/tqdm.svg + :target: https://tqdm.github.io/releases +.. |PyPI-Downloads| image:: https://img.shields.io/pypi/dm/tqdm.svg?label=pypi%20downloads&logo=PyPI&logoColor=white + :target: https://pepy.tech/project/tqdm +.. |Py-Versions| image:: https://img.shields.io/pypi/pyversions/tqdm.svg?logo=python&logoColor=white + :target: https://pypi.org/project/tqdm +.. |Conda-Forge-Status| image:: https://img.shields.io/conda/v/conda-forge/tqdm.svg?label=conda-forge&logo=conda-forge + :target: https://anaconda.org/conda-forge/tqdm +.. |Snapcraft| image:: https://img.shields.io/badge/snap-install-82BEA0.svg?logo=snapcraft + :target: https://snapcraft.io/tqdm +.. |Docker| image:: https://img.shields.io/badge/docker-pull-blue.svg?logo=docker&logoColor=white + :target: https://hub.docker.com/r/tqdm/tqdm +.. |Libraries-Rank| image:: https://img.shields.io/librariesio/sourcerank/pypi/tqdm.svg?logo=koding&logoColor=white + :target: https://libraries.io/pypi/tqdm +.. |Libraries-Dependents| image:: https://img.shields.io/librariesio/dependent-repos/pypi/tqdm.svg?logo=koding&logoColor=white + :target: https://github.com/tqdm/tqdm/network/dependents +.. |OpenHub-Status| image:: https://www.openhub.net/p/tqdm/widgets/project_thin_badge?format=gif + :target: https://www.openhub.net/p/tqdm?ref=Thin+badge +.. |awesome-python| image:: https://awesome.re/mentioned-badge.svg + :target: https://github.com/vinta/awesome-python +.. |LICENCE| image:: https://img.shields.io/pypi/l/tqdm.svg + :target: https://raw.githubusercontent.com/tqdm/tqdm/master/LICENCE +.. |DOI| image:: https://img.shields.io/badge/DOI-10.5281/zenodo.595120-blue.svg + :target: https://doi.org/10.5281/zenodo.595120 +.. |binder-demo| image:: https://mybinder.org/badge_logo.svg + :target: https://mybinder.org/v2/gh/tqdm/tqdm/master?filepath=DEMO.ipynb +.. |Screenshot-Jupyter1| image:: https://tqdm.github.io/img/jupyter-1.gif +.. |Screenshot-Jupyter2| image:: https://tqdm.github.io/img/jupyter-2.gif +.. |Screenshot-Jupyter3| image:: https://tqdm.github.io/img/jupyter-3.gif +.. |README-Hits| image:: https://cgi.cdcl.ml/hits?q=tqdm&style=social&r=https://github.com/tqdm/tqdm&l=https://tqdm.github.io/img/favicon.png&f=https://tqdm.github.io/img/logo.gif + :target: https://cgi.cdcl.ml/hits?q=tqdm&a=plot&r=https://github.com/tqdm/tqdm&l=https://tqdm.github.io/img/favicon.png&f=https://tqdm.github.io/img/logo.gif&style=social diff --git a/miniconda3/pkgs/tqdm-4.67.3-py313h7040dfc_1/lib/python3.13/site-packages/tqdm-4.67.3.dist-info/RECORD b/miniconda3/pkgs/tqdm-4.67.3-py313h7040dfc_1/lib/python3.13/site-packages/tqdm-4.67.3.dist-info/RECORD new file mode 100644 index 0000000000000000000000000000000000000000..2f44609819aede399136c6879c57d4e3ccc56c86 --- /dev/null +++ b/miniconda3/pkgs/tqdm-4.67.3-py313h7040dfc_1/lib/python3.13/site-packages/tqdm-4.67.3.dist-info/RECORD @@ -0,0 +1,74 @@ +../../../bin/tqdm,sha256=73U48CzPisWZ32FTy_S_gWeTwg0o9rZO6gw1G0ZJkFc,438 +tqdm-4.67.3.dist-info/INSTALLER,sha256=zuuue4knoyJ-UwPPXg8fezS7VCrXJQrAP7zeNuwvFQg,4 +tqdm-4.67.3.dist-info/METADATA,sha256=fA6aZiwZCV8zmkt2EgHrBs_5xh-5WBU1svlvROcY7Sk,57679 +tqdm-4.67.3.dist-info/RECORD,, +tqdm-4.67.3.dist-info/REQUESTED,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0 +tqdm-4.67.3.dist-info/WHEEL,sha256=wUyA8OaulRlbfwMtmQsvNngGrxQHAvkKcvRmdizlJi0,92 +tqdm-4.67.3.dist-info/direct_url.json,sha256=nCuD6POfnL1taF9om0CuWT_e3zbNCW9npT8FZ5govwA,90 +tqdm-4.67.3.dist-info/entry_points.txt,sha256=ReJCH7Ui3Zyh6M16E4OhsZ1oU7WtMXCfbtoyBhGO29Y,39 +tqdm-4.67.3.dist-info/licenses/LICENCE,sha256=_P-Hw6R86AKKhRKqGC1PzwrRyQVE7nXPmzQ2hMrBlN4,1985 +tqdm-4.67.3.dist-info/top_level.txt,sha256=NLiUJNfmc9At15s7JURiwvqMEjUi9G5PMGRrmMYzNSM,5 +tqdm/__init__.py,sha256=9mQNYSSqP99JasubEC1POJLMmhkkBH6cJZxPIR5G2pQ,1572 +tqdm/__main__.py,sha256=bYt9eEaoRQWdejEHFD8REx9jxVEdZptECFsV7F49Ink,30 +tqdm/__pycache__/__init__.cpython-313.pyc,, +tqdm/__pycache__/__main__.cpython-313.pyc,, +tqdm/__pycache__/_main.cpython-313.pyc,, +tqdm/__pycache__/_monitor.cpython-313.pyc,, +tqdm/__pycache__/_tqdm.cpython-313.pyc,, +tqdm/__pycache__/_tqdm_gui.cpython-313.pyc,, +tqdm/__pycache__/_tqdm_notebook.cpython-313.pyc,, +tqdm/__pycache__/_tqdm_pandas.cpython-313.pyc,, +tqdm/__pycache__/_utils.cpython-313.pyc,, +tqdm/__pycache__/asyncio.cpython-313.pyc,, +tqdm/__pycache__/auto.cpython-313.pyc,, +tqdm/__pycache__/autonotebook.cpython-313.pyc,, +tqdm/__pycache__/cli.cpython-313.pyc,, +tqdm/__pycache__/dask.cpython-313.pyc,, +tqdm/__pycache__/gui.cpython-313.pyc,, +tqdm/__pycache__/keras.cpython-313.pyc,, +tqdm/__pycache__/notebook.cpython-313.pyc,, +tqdm/__pycache__/rich.cpython-313.pyc,, +tqdm/__pycache__/std.cpython-313.pyc,, +tqdm/__pycache__/tk.cpython-313.pyc,, +tqdm/__pycache__/utils.cpython-313.pyc,, +tqdm/__pycache__/version.cpython-313.pyc,, +tqdm/_main.py,sha256=9ySvgmi_2Sw4CAo5UDW0Q2dxfTryboEWGHohfCJz0sA,283 +tqdm/_monitor.py,sha256=Uku-DPWgzJ7dO5CK08xKJK-E_F6qQ-JB3ksuXczSYR0,3699 +tqdm/_tqdm.py,sha256=LfLCuJ6bpsVo9xilmtBXyEm1vGnUCFrliW85j3J-nD4,283 +tqdm/_tqdm_gui.py,sha256=03Hc8KayxJveieI5-0-2NGiDpLvw9jZekofJUV7CCwk,287 +tqdm/_tqdm_notebook.py,sha256=BuHiLuxu6uEfZFaPJW3RPpPaxaVctEQA3kdSJSDL1hw,307 +tqdm/_tqdm_pandas.py,sha256=c9jptUgigN6axRDhRd4Rif98Tmxeopc1nFNFhIpbFUE,888 +tqdm/_utils.py,sha256=_4E73bfDj4f1s3sM42NLHNrZDOkijZoWq-n6xWLkdZ8,553 +tqdm/asyncio.py,sha256=Kp2rSkNRf9KRqa3d9YpgeZQ7L7EZf2Ki4bSc7UPIyoo,2757 +tqdm/auto.py,sha256=nDZflj6p2zKkjBCNBourrhS81zYfZy1_dQvbckrdW8o,871 +tqdm/autonotebook.py,sha256=Yb9F5uaiBPhfbDDFpbtoG8I2YUw3uQJ89rUDLbfR6ws,956 +tqdm/cli.py,sha256=orEaahqDEBGZR1uCcTW8BkhSPEhBlSO0BKYbJ1Qgc6k,10994 +tqdm/completion.sh,sha256=j79KbSmpIj_E11jfTfBXrGnUTzKXVpQ1vGVQvsyDRl4,946 +tqdm/contrib/__init__.py,sha256=1GMYYE866WCvlHg5MdmzOvPsQj4ZuMlXzz8xcRcJD60,2479 +tqdm/contrib/__pycache__/__init__.cpython-313.pyc,, +tqdm/contrib/__pycache__/bells.cpython-313.pyc,, +tqdm/contrib/__pycache__/concurrent.cpython-313.pyc,, +tqdm/contrib/__pycache__/discord.cpython-313.pyc,, +tqdm/contrib/__pycache__/itertools.cpython-313.pyc,, +tqdm/contrib/__pycache__/logging.cpython-313.pyc,, +tqdm/contrib/__pycache__/slack.cpython-313.pyc,, +tqdm/contrib/__pycache__/telegram.cpython-313.pyc,, +tqdm/contrib/__pycache__/utils_worker.cpython-313.pyc,, +tqdm/contrib/bells.py,sha256=Yx1HqGCmHrESCAO700j5wE__JCleNODJxedh1ijPLD0,837 +tqdm/contrib/concurrent.py,sha256=K1yjloKS5WRNFyjLRth0DmU5PAnDbF0A-GD27N-J4a8,3986 +tqdm/contrib/discord.py,sha256=MtVIL1s_dxH21G4sL8FBgQ4Wei23ho9Ek5T-AommvNc,5243 +tqdm/contrib/itertools.py,sha256=WdKKQU5eSzsqHu29SN_oH12huYZo0Jihqoi9-nVhwz4,774 +tqdm/contrib/logging.py,sha256=NsYtnKttj2mMrGm58mEdo5a9DP_2vv8pZyrimSuWulA,3760 +tqdm/contrib/slack.py,sha256=eP_Mr5sQonYniHxxQNGue3jk2JkIPmPWFZqIYxnOui0,4007 +tqdm/contrib/telegram.py,sha256=vn_9SATMbbwn2PAbzSDyOX6av3eBB01QBug11P4H-Og,5008 +tqdm/contrib/utils_worker.py,sha256=vaxyJyagYwOCQXLUMd86bCbI4sPqZysuMGbDSGmvEWo,1199 +tqdm/dask.py,sha256=9Ei58eVqTossRLhAfWyUFCduXYKjmLmwkaXIy-CHYfs,1319 +tqdm/gui.py,sha256=STIB3K8iDzDgkNUqWIpvcI_u0OGtbGNy5NwpALXhfWs,5479 +tqdm/keras.py,sha256=op9sBkb6q6c6dw2wJ0SD2ZwpPK7yM1Vbg4l1Qiy3MIo,4373 +tqdm/notebook.py,sha256=scgzRQmDYzIFag_1gRh98LhtZdu3ig2yrmZdqvlgops,10802 +tqdm/rich.py,sha256=YyMPkEHVyYUVUR3adJKbVX26iTmNKpNMf3DEqmm-m60,5021 +tqdm/std.py,sha256=Sk24SwOd59hpNbb0UL8Y3_8ueRmL3_5O72Vy2XKasjE,57510 +tqdm/tk.py,sha256=Gu0uwXwLCGPRGHORdi3WvBLGiseUp_xxX_h_gp9VpK0,6701 +tqdm/tqdm.1,sha256=cDyo6hSykXedJ3Pcx5tkogR1ai3QXRnrJ0MbR2Gd9-s,7581 +tqdm/utils.py,sha256=dpGZUeqoLPinM-kEsULTSe2E3jzp8wUunL6eKzkYOgk,11810 +tqdm/version.py,sha256=oBM1eCOTDZDGZHffNqlehXTeQdKdracckNAEaMRmPjM,337 diff --git a/miniconda3/pkgs/tqdm-4.67.3-py313h7040dfc_1/lib/python3.13/site-packages/tqdm-4.67.3.dist-info/REQUESTED b/miniconda3/pkgs/tqdm-4.67.3-py313h7040dfc_1/lib/python3.13/site-packages/tqdm-4.67.3.dist-info/REQUESTED new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/miniconda3/pkgs/tqdm-4.67.3-py313h7040dfc_1/lib/python3.13/site-packages/tqdm-4.67.3.dist-info/WHEEL b/miniconda3/pkgs/tqdm-4.67.3-py313h7040dfc_1/lib/python3.13/site-packages/tqdm-4.67.3.dist-info/WHEEL new file mode 100644 index 0000000000000000000000000000000000000000..0885d055554a9bce53952482316a33cebf0845e4 --- /dev/null +++ b/miniconda3/pkgs/tqdm-4.67.3-py313h7040dfc_1/lib/python3.13/site-packages/tqdm-4.67.3.dist-info/WHEEL @@ -0,0 +1,5 @@ +Wheel-Version: 1.0 +Generator: setuptools (80.10.2) +Root-Is-Purelib: true +Tag: py3-none-any + diff --git a/miniconda3/pkgs/tqdm-4.67.3-py313h7040dfc_1/lib/python3.13/site-packages/tqdm-4.67.3.dist-info/direct_url.json b/miniconda3/pkgs/tqdm-4.67.3-py313h7040dfc_1/lib/python3.13/site-packages/tqdm-4.67.3.dist-info/direct_url.json new file mode 100644 index 0000000000000000000000000000000000000000..49c8081bc96d2801f315d92682aace0653241dd1 --- /dev/null +++ b/miniconda3/pkgs/tqdm-4.67.3-py313h7040dfc_1/lib/python3.13/site-packages/tqdm-4.67.3.dist-info/direct_url.json @@ -0,0 +1 @@ +{"dir_info": {}, "url": "file:///home/task_177139827237424/croot/tqdm_1771398701478/work"} \ No newline at end of file diff --git a/miniconda3/pkgs/tqdm-4.67.3-py313h7040dfc_1/lib/python3.13/site-packages/tqdm-4.67.3.dist-info/entry_points.txt b/miniconda3/pkgs/tqdm-4.67.3-py313h7040dfc_1/lib/python3.13/site-packages/tqdm-4.67.3.dist-info/entry_points.txt new file mode 100644 index 0000000000000000000000000000000000000000..540e60f4e073bc53a5f0a521a3639e0d80780af4 --- /dev/null +++ b/miniconda3/pkgs/tqdm-4.67.3-py313h7040dfc_1/lib/python3.13/site-packages/tqdm-4.67.3.dist-info/entry_points.txt @@ -0,0 +1,2 @@ +[console_scripts] +tqdm = tqdm.cli:main diff --git a/miniconda3/pkgs/tqdm-4.67.3-py313h7040dfc_1/lib/python3.13/site-packages/tqdm-4.67.3.dist-info/licenses/LICENCE b/miniconda3/pkgs/tqdm-4.67.3-py313h7040dfc_1/lib/python3.13/site-packages/tqdm-4.67.3.dist-info/licenses/LICENCE new file mode 100644 index 0000000000000000000000000000000000000000..194caf554f8f10ba4cac8a81b631a61d0d81f60d --- /dev/null +++ b/miniconda3/pkgs/tqdm-4.67.3-py313h7040dfc_1/lib/python3.13/site-packages/tqdm-4.67.3.dist-info/licenses/LICENCE @@ -0,0 +1,49 @@ +`tqdm` is a product of collaborative work. +Unless otherwise stated, all authors (see commit logs) retain copyright +for their respective work, and release the work under the MIT licence +(text below). + +Exceptions or notable authors are listed below +in reverse chronological order: + +* files: * + MPL-2.0 2015-2026 (c) Casper da Costa-Luis + [casperdcl](https://github.com/casperdcl). +* files: tqdm/_tqdm.py + MIT 2016 (c) [PR #96] on behalf of Google Inc. +* files: tqdm/_tqdm.py README.rst .gitignore + MIT 2013 (c) Noam Yorav-Raphael, original author. + +[PR #96]: https://github.com/tqdm/tqdm/pull/96 + + +Mozilla Public Licence (MPL) v. 2.0 - Exhibit A +----------------------------------------------- + +This Source Code Form is subject to the terms of the +Mozilla Public License, v. 2.0. +If a copy of the MPL was not distributed with this project, +You can obtain one at https://mozilla.org/MPL/2.0/. + + +MIT License (MIT) +----------------- + +Copyright (c) 2013 noamraph + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/miniconda3/pkgs/tqdm-4.67.3-py313h7040dfc_1/lib/python3.13/site-packages/tqdm-4.67.3.dist-info/top_level.txt b/miniconda3/pkgs/tqdm-4.67.3-py313h7040dfc_1/lib/python3.13/site-packages/tqdm-4.67.3.dist-info/top_level.txt new file mode 100644 index 0000000000000000000000000000000000000000..78620c472c9d799a14ccb02a0233f4669b3bcdcb --- /dev/null +++ b/miniconda3/pkgs/tqdm-4.67.3-py313h7040dfc_1/lib/python3.13/site-packages/tqdm-4.67.3.dist-info/top_level.txt @@ -0,0 +1 @@ +tqdm diff --git a/miniconda3/pkgs/tqdm-4.67.3-py313h7040dfc_1/lib/python3.13/site-packages/tqdm/__init__.py b/miniconda3/pkgs/tqdm-4.67.3-py313h7040dfc_1/lib/python3.13/site-packages/tqdm/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..8081f77b8812f3b42d7949daa4195d2c35dc70ac --- /dev/null +++ b/miniconda3/pkgs/tqdm-4.67.3-py313h7040dfc_1/lib/python3.13/site-packages/tqdm/__init__.py @@ -0,0 +1,38 @@ +from ._monitor import TMonitor, TqdmSynchronisationWarning +from ._tqdm_pandas import tqdm_pandas +from .cli import main # TODO: remove in v5.0.0 +from .gui import tqdm as tqdm_gui # TODO: remove in v5.0.0 +from .gui import trange as tgrange # TODO: remove in v5.0.0 +from .std import ( + TqdmDeprecationWarning, TqdmExperimentalWarning, TqdmKeyError, TqdmMonitorWarning, + TqdmTypeError, TqdmWarning, tqdm, trange) +from .version import __version__ + +__all__ = ['tqdm', 'tqdm_gui', 'trange', 'tgrange', 'tqdm_pandas', + 'tqdm_notebook', 'tnrange', 'main', 'TMonitor', + 'TqdmTypeError', 'TqdmKeyError', + 'TqdmWarning', 'TqdmDeprecationWarning', + 'TqdmExperimentalWarning', + 'TqdmMonitorWarning', 'TqdmSynchronisationWarning', + '__version__'] + + +def tqdm_notebook(*args, **kwargs): # pragma: no cover + """See tqdm.notebook.tqdm for full documentation""" + from warnings import warn + + from .notebook import tqdm as _tqdm_notebook + warn("This function will be removed in tqdm==5.0.0\n" + "Please use `tqdm.notebook.tqdm` instead of `tqdm.tqdm_notebook`", + TqdmDeprecationWarning, stacklevel=2) + return _tqdm_notebook(*args, **kwargs) + + +def tnrange(*args, **kwargs): # pragma: no cover + """Shortcut for `tqdm.notebook.tqdm(range(*args), **kwargs)`.""" + from warnings import warn + + from .notebook import trange as _tnrange + warn("Please use `tqdm.notebook.trange` instead of `tqdm.tnrange`", + TqdmDeprecationWarning, stacklevel=2) + return _tnrange(*args, **kwargs) diff --git a/miniconda3/pkgs/tqdm-4.67.3-py313h7040dfc_1/lib/python3.13/site-packages/tqdm/__main__.py b/miniconda3/pkgs/tqdm-4.67.3-py313h7040dfc_1/lib/python3.13/site-packages/tqdm/__main__.py new file mode 100644 index 0000000000000000000000000000000000000000..4e28416e104515e90fca4b69cc60d0c61fd15d61 --- /dev/null +++ b/miniconda3/pkgs/tqdm-4.67.3-py313h7040dfc_1/lib/python3.13/site-packages/tqdm/__main__.py @@ -0,0 +1,3 @@ +from .cli import main + +main() diff --git a/miniconda3/pkgs/tqdm-4.67.3-py313h7040dfc_1/lib/python3.13/site-packages/tqdm/_main.py b/miniconda3/pkgs/tqdm-4.67.3-py313h7040dfc_1/lib/python3.13/site-packages/tqdm/_main.py new file mode 100644 index 0000000000000000000000000000000000000000..04fdeeff17b5cc84b210f445b54b87d5b99e3748 --- /dev/null +++ b/miniconda3/pkgs/tqdm-4.67.3-py313h7040dfc_1/lib/python3.13/site-packages/tqdm/_main.py @@ -0,0 +1,9 @@ +from warnings import warn + +from .cli import * # NOQA +from .cli import __all__ # NOQA +from .std import TqdmDeprecationWarning + +warn("This function will be removed in tqdm==5.0.0\n" + "Please use `tqdm.cli.*` instead of `tqdm._main.*`", + TqdmDeprecationWarning, stacklevel=2) diff --git a/miniconda3/pkgs/tqdm-4.67.3-py313h7040dfc_1/lib/python3.13/site-packages/tqdm/_monitor.py b/miniconda3/pkgs/tqdm-4.67.3-py313h7040dfc_1/lib/python3.13/site-packages/tqdm/_monitor.py new file mode 100644 index 0000000000000000000000000000000000000000..f71aa56817ca77eba5df4a2dd11cb0c4a9a7ea1c --- /dev/null +++ b/miniconda3/pkgs/tqdm-4.67.3-py313h7040dfc_1/lib/python3.13/site-packages/tqdm/_monitor.py @@ -0,0 +1,95 @@ +import atexit +from threading import Event, Thread, current_thread +from time import time +from warnings import warn + +__all__ = ["TMonitor", "TqdmSynchronisationWarning"] + + +class TqdmSynchronisationWarning(RuntimeWarning): + """tqdm multi-thread/-process errors which may cause incorrect nesting + but otherwise no adverse effects""" + pass + + +class TMonitor(Thread): + """ + Monitoring thread for tqdm bars. + Monitors if tqdm bars are taking too much time to display + and readjusts miniters automatically if necessary. + + Parameters + ---------- + tqdm_cls : class + tqdm class to use (can be core tqdm or a submodule). + sleep_interval : float + Time to sleep between monitoring checks. + """ + _test = {} # internal vars for unit testing + + def __init__(self, tqdm_cls, sleep_interval): + Thread.__init__(self) + self.daemon = True # kill thread when main killed (KeyboardInterrupt) + self.woken = 0 # last time woken up, to sync with monitor + self.tqdm_cls = tqdm_cls + self.sleep_interval = sleep_interval + self._time = self._test.get("time", time) + self.was_killed = self._test.get("Event", Event)() + atexit.register(self.exit) + self.start() + + def exit(self): + self.was_killed.set() + if self is not current_thread(): + self.join() + return self.report() + + def get_instances(self): + # returns a copy of started `tqdm_cls` instances + return [i for i in self.tqdm_cls._instances.copy() + # Avoid race by checking that the instance started + if hasattr(i, 'start_t')] + + def run(self): + cur_t = self._time() + while True: + # After processing and before sleeping, notify that we woke + # Need to be done just before sleeping + self.woken = cur_t + # Sleep some time... + self.was_killed.wait(self.sleep_interval) + # Quit if killed + if self.was_killed.is_set(): + return + # Then monitor! + # Acquire lock (to access _instances) + with self.tqdm_cls.get_lock(): + cur_t = self._time() + # Check tqdm instances are waiting too long to print + instances = self.get_instances() + for instance in instances: + # Check event in loop to reduce blocking time on exit + if self.was_killed.is_set(): + return + # Only if mininterval > 1 (else iterations are just slow) + # and last refresh exceeded maxinterval + if ( + instance.miniters > 1 + and (cur_t - instance.last_print_t) >= instance.maxinterval + ): + # force bypassing miniters on next iteration + # (dynamic_miniters adjusts mininterval automatically) + instance.miniters = 1 + # Refresh now! (works only for manual tqdm) + instance.refresh(nolock=True) + # Remove accidental long-lived strong reference + del instance + if instances != self.get_instances(): # pragma: nocover + warn("Set changed size during iteration" + + " (see https://github.com/tqdm/tqdm/issues/481)", + TqdmSynchronisationWarning, stacklevel=2) + # Remove accidental long-lived strong references + del instances + + def report(self): + return not self.was_killed.is_set() diff --git a/miniconda3/pkgs/tqdm-4.67.3-py313h7040dfc_1/lib/python3.13/site-packages/tqdm/_tqdm.py b/miniconda3/pkgs/tqdm-4.67.3-py313h7040dfc_1/lib/python3.13/site-packages/tqdm/_tqdm.py new file mode 100644 index 0000000000000000000000000000000000000000..7fc4962774a4651db7a739a3f143633b6215a9bd --- /dev/null +++ b/miniconda3/pkgs/tqdm-4.67.3-py313h7040dfc_1/lib/python3.13/site-packages/tqdm/_tqdm.py @@ -0,0 +1,9 @@ +from warnings import warn + +from .std import * # NOQA +from .std import __all__ # NOQA +from .std import TqdmDeprecationWarning + +warn("This function will be removed in tqdm==5.0.0\n" + "Please use `tqdm.std.*` instead of `tqdm._tqdm.*`", + TqdmDeprecationWarning, stacklevel=2) diff --git a/miniconda3/pkgs/tqdm-4.67.3-py313h7040dfc_1/lib/python3.13/site-packages/tqdm/_tqdm_gui.py b/miniconda3/pkgs/tqdm-4.67.3-py313h7040dfc_1/lib/python3.13/site-packages/tqdm/_tqdm_gui.py new file mode 100644 index 0000000000000000000000000000000000000000..f32aa894f54b3a5b47a0fbf4263c2fd20df56c9d --- /dev/null +++ b/miniconda3/pkgs/tqdm-4.67.3-py313h7040dfc_1/lib/python3.13/site-packages/tqdm/_tqdm_gui.py @@ -0,0 +1,9 @@ +from warnings import warn + +from .gui import * # NOQA +from .gui import __all__ # NOQA +from .std import TqdmDeprecationWarning + +warn("This function will be removed in tqdm==5.0.0\n" + "Please use `tqdm.gui.*` instead of `tqdm._tqdm_gui.*`", + TqdmDeprecationWarning, stacklevel=2) diff --git a/miniconda3/pkgs/tqdm-4.67.3-py313h7040dfc_1/lib/python3.13/site-packages/tqdm/_tqdm_notebook.py b/miniconda3/pkgs/tqdm-4.67.3-py313h7040dfc_1/lib/python3.13/site-packages/tqdm/_tqdm_notebook.py new file mode 100644 index 0000000000000000000000000000000000000000..f225fbf5b52d04987ccf68f4d5ee4b735e3158b0 --- /dev/null +++ b/miniconda3/pkgs/tqdm-4.67.3-py313h7040dfc_1/lib/python3.13/site-packages/tqdm/_tqdm_notebook.py @@ -0,0 +1,9 @@ +from warnings import warn + +from .notebook import * # NOQA +from .notebook import __all__ # NOQA +from .std import TqdmDeprecationWarning + +warn("This function will be removed in tqdm==5.0.0\n" + "Please use `tqdm.notebook.*` instead of `tqdm._tqdm_notebook.*`", + TqdmDeprecationWarning, stacklevel=2) diff --git a/miniconda3/pkgs/tqdm-4.67.3-py313h7040dfc_1/lib/python3.13/site-packages/tqdm/_tqdm_pandas.py b/miniconda3/pkgs/tqdm-4.67.3-py313h7040dfc_1/lib/python3.13/site-packages/tqdm/_tqdm_pandas.py new file mode 100644 index 0000000000000000000000000000000000000000..c4fe6efdc603579e7f8acfa27ac10dccdf3e94ce --- /dev/null +++ b/miniconda3/pkgs/tqdm-4.67.3-py313h7040dfc_1/lib/python3.13/site-packages/tqdm/_tqdm_pandas.py @@ -0,0 +1,24 @@ +import sys + +__author__ = "github.com/casperdcl" +__all__ = ['tqdm_pandas'] + + +def tqdm_pandas(tclass, **tqdm_kwargs): + """ + Registers the given `tqdm` instance with + `pandas.core.groupby.DataFrameGroupBy.progress_apply`. + """ + from tqdm import TqdmDeprecationWarning + + if isinstance(tclass, type) or (getattr(tclass, '__name__', '').startswith( + 'tqdm_')): # delayed adapter case + TqdmDeprecationWarning( + "Please use `tqdm.pandas(...)` instead of `tqdm_pandas(tqdm, ...)`.", + fp_write=getattr(tqdm_kwargs.get('file', None), 'write', sys.stderr.write)) + tclass.pandas(**tqdm_kwargs) + else: + TqdmDeprecationWarning( + "Please use `tqdm.pandas(...)` instead of `tqdm_pandas(tqdm(...))`.", + fp_write=getattr(tclass.fp, 'write', sys.stderr.write)) + type(tclass).pandas(deprecated_t=tclass) diff --git a/miniconda3/pkgs/tqdm-4.67.3-py313h7040dfc_1/lib/python3.13/site-packages/tqdm/_utils.py b/miniconda3/pkgs/tqdm-4.67.3-py313h7040dfc_1/lib/python3.13/site-packages/tqdm/_utils.py new file mode 100644 index 0000000000000000000000000000000000000000..385e849e106d1319fe21045f14eb0aa6552fb153 --- /dev/null +++ b/miniconda3/pkgs/tqdm-4.67.3-py313h7040dfc_1/lib/python3.13/site-packages/tqdm/_utils.py @@ -0,0 +1,11 @@ +from warnings import warn + +from .std import TqdmDeprecationWarning +from .utils import ( # NOQA, pylint: disable=unused-import + CUR_OS, IS_NIX, IS_WIN, RE_ANSI, Comparable, FormatReplace, SimpleTextIOWrapper, + _environ_cols_wrapper, _is_ascii, _is_utf, _screen_shape_linux, _screen_shape_tput, + _screen_shape_windows, _screen_shape_wrapper, _supports_unicode, _term_move_up, colorama) + +warn("This function will be removed in tqdm==5.0.0\n" + "Please use `tqdm.utils.*` instead of `tqdm._utils.*`", + TqdmDeprecationWarning, stacklevel=2) diff --git a/miniconda3/pkgs/tqdm-4.67.3-py313h7040dfc_1/lib/python3.13/site-packages/tqdm/asyncio.py b/miniconda3/pkgs/tqdm-4.67.3-py313h7040dfc_1/lib/python3.13/site-packages/tqdm/asyncio.py new file mode 100644 index 0000000000000000000000000000000000000000..2d00a0a2e755f36068d079ccc12ca84d86ff42be --- /dev/null +++ b/miniconda3/pkgs/tqdm-4.67.3-py313h7040dfc_1/lib/python3.13/site-packages/tqdm/asyncio.py @@ -0,0 +1,93 @@ +""" +Asynchronous progressbar decorator for iterators. +Includes a default `range` iterator printing to `stderr`. + +Usage: +>>> from tqdm.asyncio import trange, tqdm +>>> async for i in trange(10): +... ... +""" +import asyncio +from sys import version_info + +from .std import tqdm as std_tqdm + +__author__ = {"github.com/": ["casperdcl"]} +__all__ = ['tqdm_asyncio', 'tarange', 'tqdm', 'trange'] + + +class tqdm_asyncio(std_tqdm): + """ + Asynchronous-friendly version of tqdm. + """ + def __init__(self, iterable=None, *args, **kwargs): + super().__init__(iterable, *args, **kwargs) + self.iterable_awaitable = False + if iterable is not None: + if hasattr(iterable, "__anext__"): + self.iterable_next = iterable.__anext__ + self.iterable_awaitable = True + elif hasattr(iterable, "__next__"): + self.iterable_next = iterable.__next__ + else: + self.iterable_iterator = iter(iterable) + self.iterable_next = self.iterable_iterator.__next__ + + def __aiter__(self): + return self + + async def __anext__(self): + try: + if self.iterable_awaitable: + res = await self.iterable_next() + else: + res = self.iterable_next() + self.update() + return res + except StopIteration: + self.close() + raise StopAsyncIteration + except BaseException: + self.close() + raise + + def send(self, *args, **kwargs): + return self.iterable.send(*args, **kwargs) + + @classmethod + def as_completed(cls, fs, *, loop=None, timeout=None, total=None, **tqdm_kwargs): + """ + Wrapper for `asyncio.as_completed`. + """ + if total is None: + total = len(fs) + kwargs = {} + if version_info[:2] < (3, 10): + kwargs['loop'] = loop + yield from cls(asyncio.as_completed(fs, timeout=timeout, **kwargs), + total=total, **tqdm_kwargs) + + @classmethod + async def gather(cls, *fs, loop=None, timeout=None, total=None, **tqdm_kwargs): + """ + Wrapper for `asyncio.gather`. + """ + async def wrap_awaitable(i, f): + return i, await f + + ifs = [wrap_awaitable(i, f) for i, f in enumerate(fs)] + res = [await f for f in cls.as_completed(ifs, loop=loop, timeout=timeout, + total=total, **tqdm_kwargs)] + return [i for _, i in sorted(res)] + + +def tarange(*args, **kwargs): + """ + A shortcut for `tqdm.asyncio.tqdm(range(*args), **kwargs)`. + """ + return tqdm_asyncio(range(*args), **kwargs) + + +# Aliases +tqdm = tqdm_asyncio +trange = tarange diff --git a/miniconda3/pkgs/tqdm-4.67.3-py313h7040dfc_1/lib/python3.13/site-packages/tqdm/auto.py b/miniconda3/pkgs/tqdm-4.67.3-py313h7040dfc_1/lib/python3.13/site-packages/tqdm/auto.py new file mode 100644 index 0000000000000000000000000000000000000000..206c4409d5269594bdbab3a092ef6e09e7c01947 --- /dev/null +++ b/miniconda3/pkgs/tqdm-4.67.3-py313h7040dfc_1/lib/python3.13/site-packages/tqdm/auto.py @@ -0,0 +1,40 @@ +""" +Enables multiple commonly used features. + +Method resolution order: + +- `tqdm.autonotebook` without import warnings +- `tqdm.asyncio` +- `tqdm.std` base class + +Usage: +>>> from tqdm.auto import trange, tqdm +>>> for i in trange(10): +... ... +""" +import warnings + +from .std import TqdmExperimentalWarning + +with warnings.catch_warnings(): + warnings.simplefilter("ignore", category=TqdmExperimentalWarning) + from .autonotebook import tqdm as notebook_tqdm + +from .asyncio import tqdm as asyncio_tqdm +from .std import tqdm as std_tqdm + +if notebook_tqdm != std_tqdm: + class tqdm(notebook_tqdm, asyncio_tqdm): # pylint: disable=inconsistent-mro + pass +else: + tqdm = asyncio_tqdm + + +def trange(*args, **kwargs): + """ + A shortcut for `tqdm.auto.tqdm(range(*args), **kwargs)`. + """ + return tqdm(range(*args), **kwargs) + + +__all__ = ["tqdm", "trange"] diff --git a/miniconda3/pkgs/tqdm-4.67.3-py313h7040dfc_1/lib/python3.13/site-packages/tqdm/autonotebook.py b/miniconda3/pkgs/tqdm-4.67.3-py313h7040dfc_1/lib/python3.13/site-packages/tqdm/autonotebook.py new file mode 100644 index 0000000000000000000000000000000000000000..a09f2ec4b8c95f12b8c7b7774f84d5ec55826334 --- /dev/null +++ b/miniconda3/pkgs/tqdm-4.67.3-py313h7040dfc_1/lib/python3.13/site-packages/tqdm/autonotebook.py @@ -0,0 +1,29 @@ +""" +Automatically choose between `tqdm.notebook` and `tqdm.std`. + +Usage: +>>> from tqdm.autonotebook import trange, tqdm +>>> for i in trange(10): +... ... +""" +import sys +from warnings import warn + +try: + get_ipython = sys.modules['IPython'].get_ipython + if 'IPKernelApp' not in get_ipython().config: # pragma: no cover + raise ImportError("console") + from .notebook import WARN_NOIPYW, IProgress + if IProgress is None: + from .std import TqdmWarning + warn(WARN_NOIPYW, TqdmWarning, stacklevel=2) + raise ImportError('ipywidgets') +except Exception: + from .std import tqdm, trange +else: # pragma: no cover + from .notebook import tqdm, trange + from .std import TqdmExperimentalWarning + warn("Using `tqdm.autonotebook.tqdm` in notebook mode." + " Use `tqdm.tqdm` instead to force console mode" + " (e.g. in jupyter console)", TqdmExperimentalWarning, stacklevel=2) +__all__ = ["tqdm", "trange"] diff --git a/miniconda3/pkgs/tqdm-4.67.3-py313h7040dfc_1/lib/python3.13/site-packages/tqdm/cli.py b/miniconda3/pkgs/tqdm-4.67.3-py313h7040dfc_1/lib/python3.13/site-packages/tqdm/cli.py new file mode 100644 index 0000000000000000000000000000000000000000..1dd08f6053b992274dc8242a4e81ec7e66ddd937 --- /dev/null +++ b/miniconda3/pkgs/tqdm-4.67.3-py313h7040dfc_1/lib/python3.13/site-packages/tqdm/cli.py @@ -0,0 +1,324 @@ +""" +Module version for monitoring CLI pipes (`... | python -m tqdm | ...`). +""" +import logging +import re +import sys +from ast import literal_eval as numeric +from textwrap import indent + +from .std import TqdmKeyError, TqdmTypeError, tqdm +from .version import __version__ + +__all__ = ["main"] +log = logging.getLogger(__name__) + + +def cast(val, typ): + log.debug((val, typ)) + if " or " in typ: + for t in typ.split(" or "): + try: + return cast(val, t) + except TqdmTypeError: + pass + raise TqdmTypeError(f"{val} : {typ}") + + # sys.stderr.write('\ndebug | `val:type`: `' + val + ':' + typ + '`.\n') + if typ == 'bool': + if (val == 'True') or (val == ''): + return True + if val == 'False': + return False + raise TqdmTypeError(val + ' : ' + typ) + if typ == 'chr': + if len(val) == 1: + return val.encode() + if re.match(r"^\\\w+$", val): + return eval(f'"{val}"').encode() + raise TqdmTypeError(f"{val} : {typ}") + if typ == 'str': + return val + if typ == 'int': + try: + return int(val) + except ValueError as exc: + raise TqdmTypeError(f"{val} : {typ}") from exc + if typ == 'float': + try: + return float(val) + except ValueError as exc: + raise TqdmTypeError(f"{val} : {typ}") from exc + raise TqdmTypeError(f"{val} : {typ}") + + +def posix_pipe(fin, fout, delim=b'\\n', buf_size=256, + callback=lambda float: None, callback_len=True): + """ + Params + ------ + fin : binary file with `read(buf_size : int)` method + fout : binary file with `write` (and optionally `flush`) methods. + callback : function(float), e.g.: `tqdm.update` + callback_len : If (default: True) do `callback(len(buffer))`. + Otherwise, do `callback(data) for data in buffer.split(delim)`. + """ + fp_write = fout.write + + if not delim: + while True: + tmp = fin.read(buf_size) + + # flush at EOF + if not tmp: + getattr(fout, 'flush', lambda: None)() + return + + fp_write(tmp) + callback(len(tmp)) + # return + + buf = b'' + len_delim = len(delim) + # n = 0 + while True: + tmp = fin.read(buf_size) + + # flush at EOF + if not tmp: + if buf: + fp_write(buf) + if callback_len: + # n += 1 + buf.count(delim) + callback(1 + buf.count(delim)) + else: + for i in buf.split(delim): + callback(i) + getattr(fout, 'flush', lambda: None)() + return # n + + while True: + i = tmp.find(delim) + if i < 0: + buf += tmp + break + fp_write(buf + tmp[:i + len(delim)]) + # n += 1 + callback(1 if callback_len else (buf + tmp[:i])) + buf = b'' + tmp = tmp[i + len_delim:] + + +# ((opt, type), ... ) +RE_OPTS = re.compile(r'\n {4}(\S+)\s{2,}:\s*([^,]+)') +# better split method assuming no positional args +RE_SHLEX = re.compile(r'\s*(? : \2', d) + split = RE_OPTS.split(d) + opt_types_desc = zip(split[1::3], split[2::3], split[3::3]) + d = ''.join(('\n --{0} : {2}{3}' if otd[1] == 'bool' else + '\n --{0}=<{1}> : {2}{3}').format( + otd[0].replace('_', '-'), otd[0], *otd[1:]) + for otd in opt_types_desc if otd[0] not in UNSUPPORTED_OPTS) + + help_short = "Usage:\n tqdm [--help | options]\n" + d = help_short + """ +Options: + -h, --help Print this help and exit. + -v, --version Print version and exit. +""" + d.strip('\n') + '\n' + + # opts = docopt(d, version=__version__) + if any(v in argv for v in ('-v', '--version')): + sys.stdout.write(__version__ + '\n') + sys.exit(0) + elif any(v in argv for v in ('-h', '--help')): + sys.stdout.write(d + '\n') + sys.exit(0) + elif argv and argv[0][:2] != '--': + sys.stderr.write(f"Error:Unknown argument:{argv[0]}\n{help_short}") + + argv = RE_SHLEX.split(' '.join(["tqdm"] + argv)) + opts = dict(zip(argv[1::3], argv[3::3])) + + log.debug(opts) + opts.pop('log', True) + + tqdm_args = {'file': fp} + try: + for (o, v) in opts.items(): + o = o.replace('-', '_') + try: + tqdm_args[o] = cast(v, opt_types[o]) + except KeyError as e: + raise TqdmKeyError(str(e)) + log.debug('args:' + str(tqdm_args)) + + delim_per_char = tqdm_args.pop('bytes', False) + update = tqdm_args.pop('update', False) + update_to = tqdm_args.pop('update_to', False) + if sum((delim_per_char, update, update_to)) > 1: + raise TqdmKeyError("Can only have one of --bytes --update --update_to") + except Exception: + fp.write("\nError:\n" + help_short) + stdin, stdout_write = sys.stdin, sys.stdout.write + for i in stdin: + stdout_write(i) + raise + else: + buf_size = tqdm_args.pop('buf_size', 256) + delim = tqdm_args.pop('delim', b'\\n') + tee = tqdm_args.pop('tee', False) + manpath = tqdm_args.pop('manpath', None) + comppath = tqdm_args.pop('comppath', None) + if tqdm_args.pop('null', False): + class stdout: + @staticmethod + def write(_): + pass + else: + stdout = sys.stdout + stdout = getattr(stdout, 'buffer', stdout) + stdin = getattr(sys.stdin, 'buffer', sys.stdin) + if manpath or comppath: + try: # py<3.9 + import importlib_resources as resources + except ImportError: + from importlib import resources + from pathlib import Path + + def cp(name, dst): + """copy resource `name` to `dst`""" + fi = resources.files('tqdm') / name + dst.write_bytes(fi.read_bytes()) + log.info("written:%s", dst) + if manpath is not None: + cp('tqdm.1', Path(manpath) / 'tqdm.1') + if comppath is not None: + cp('completion.sh', Path(comppath) / 'tqdm_completion.sh') + sys.exit(0) + if tee: + stdout_write = stdout.write + fp_write = getattr(fp, 'buffer', fp).write + + class stdout: # pylint: disable=function-redefined + @staticmethod + def write(x): + with tqdm.external_write_mode(file=fp): + fp_write(x) + stdout_write(x) + if delim_per_char: + tqdm_args.setdefault('unit', 'B') + tqdm_args.setdefault('unit_scale', True) + tqdm_args.setdefault('unit_divisor', 1024) + log.debug(tqdm_args) + with tqdm(**tqdm_args) as t: + posix_pipe(stdin, stdout, '', buf_size, t.update) + elif delim == b'\\n': + log.debug(tqdm_args) + write = stdout.write + if update or update_to: + with tqdm(**tqdm_args) as t: + if update: + def callback(i): + t.update(numeric(i.decode())) + else: # update_to + def callback(i): + t.update(numeric(i.decode()) - t.n) + for i in stdin: + write(i) + callback(i) + else: + for i in tqdm(stdin, **tqdm_args): + write(i) + else: + log.debug(tqdm_args) + with tqdm(**tqdm_args) as t: + callback_len = False + if update: + def callback(i): + t.update(numeric(i.decode())) + elif update_to: + def callback(i): + t.update(numeric(i.decode()) - t.n) + else: + callback = t.update + callback_len = True + posix_pipe(stdin, stdout, delim, buf_size, callback, callback_len) diff --git a/miniconda3/pkgs/tqdm-4.67.3-py313h7040dfc_1/lib/python3.13/site-packages/tqdm/completion.sh b/miniconda3/pkgs/tqdm-4.67.3-py313h7040dfc_1/lib/python3.13/site-packages/tqdm/completion.sh new file mode 100644 index 0000000000000000000000000000000000000000..9f61c7f14bb8c1f6099b9eb75dce28ece6a7ae96 --- /dev/null +++ b/miniconda3/pkgs/tqdm-4.67.3-py313h7040dfc_1/lib/python3.13/site-packages/tqdm/completion.sh @@ -0,0 +1,19 @@ +#!/usr/bin/env bash +_tqdm(){ + local cur prv + cur="${COMP_WORDS[COMP_CWORD]}" + prv="${COMP_WORDS[COMP_CWORD - 1]}" + + case ${prv} in + --bar_format|--buf_size|--colour|--comppath|--delay|--delim|--desc|--initial|--lock_args|--manpath|--maxinterval|--mininterval|--miniters|--ncols|--nrows|--position|--postfix|--smoothing|--total|--unit|--unit_divisor) + # await user input + ;; + "--log") + COMPREPLY=($(compgen -W 'CRITICAL FATAL ERROR WARN WARNING INFO DEBUG NOTSET' -- ${cur})) + ;; + *) + COMPREPLY=($(compgen -W '--ascii --bar_format --buf_size --bytes --colour --comppath --delay --delim --desc --disable --dynamic_ncols --help --initial --leave --lock_args --log --manpath --maxinterval --mininterval --miniters --ncols --nrows --null --position --postfix --smoothing --tee --total --unit --unit_divisor --unit_scale --update --update_to --version --write_bytes -h -v' -- ${cur})) + ;; + esac +} +complete -F _tqdm tqdm diff --git a/miniconda3/pkgs/tqdm-4.67.3-py313h7040dfc_1/lib/python3.13/site-packages/tqdm/contrib/__init__.py b/miniconda3/pkgs/tqdm-4.67.3-py313h7040dfc_1/lib/python3.13/site-packages/tqdm/contrib/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..87ec4601fcff138e0882808237375aed93f5ef35 --- /dev/null +++ b/miniconda3/pkgs/tqdm-4.67.3-py313h7040dfc_1/lib/python3.13/site-packages/tqdm/contrib/__init__.py @@ -0,0 +1,91 @@ +""" +Thin wrappers around common functions. + +Subpackages contain potentially unstable extensions. +""" +from warnings import warn + +from ..auto import tqdm as tqdm_auto +from ..std import TqdmDeprecationWarning, tqdm +from ..utils import ObjectWrapper + +__author__ = {"github.com/": ["casperdcl"]} +__all__ = ['tenumerate', 'tzip', 'tmap'] + + +class DummyTqdmFile(ObjectWrapper): + """Dummy file-like that will write to tqdm""" + + def __init__(self, wrapped): + super().__init__(wrapped) + self._buf = [] + + def write(self, x, nolock=False): + nl = b"\n" if isinstance(x, bytes) else "\n" + pre, sep, post = x.rpartition(nl) + if sep: + blank = type(nl)() + tqdm.write(blank.join(self._buf + [pre, sep]), + end=blank, file=self._wrapped, nolock=nolock) + self._buf = [post] + else: + self._buf.append(x) + + def __del__(self): + if self._buf: + blank = type(self._buf[0])() + try: + tqdm.write(blank.join(self._buf), end=blank, file=self._wrapped) + except (OSError, ValueError): + pass + + +def builtin_iterable(func): + """Returns `func`""" + warn("This function has no effect, and will be removed in tqdm==5.0.0", + TqdmDeprecationWarning, stacklevel=2) + return func + + +def tenumerate(iterable, start=0, total=None, tqdm_class=tqdm_auto, **tqdm_kwargs): + """ + Equivalent of `numpy.ndenumerate` or builtin `enumerate`. + + Parameters + ---------- + tqdm_class : [default: tqdm.auto.tqdm]. + """ + try: + import numpy as np + except ImportError: + pass + else: + if isinstance(iterable, np.ndarray): + return tqdm_class(np.ndenumerate(iterable), total=total or iterable.size, + **tqdm_kwargs) + return enumerate(tqdm_class(iterable, total=total, **tqdm_kwargs), start) + + +def tzip(iter1, *iter2plus, **tqdm_kwargs): + """ + Equivalent of builtin `zip`. + + Parameters + ---------- + tqdm_class : [default: tqdm.auto.tqdm]. + """ + kwargs = tqdm_kwargs.copy() + tqdm_class = kwargs.pop("tqdm_class", tqdm_auto) + yield from zip(tqdm_class(iter1, **kwargs), *iter2plus) + + +def tmap(function, *sequences, **tqdm_kwargs): + """ + Equivalent of builtin `map`. + + Parameters + ---------- + tqdm_class : [default: tqdm.auto.tqdm]. + """ + for i in tzip(*sequences, **tqdm_kwargs): + yield function(*i) diff --git a/miniconda3/pkgs/tqdm-4.67.3-py313h7040dfc_1/lib/python3.13/site-packages/tqdm/contrib/bells.py b/miniconda3/pkgs/tqdm-4.67.3-py313h7040dfc_1/lib/python3.13/site-packages/tqdm/contrib/bells.py new file mode 100644 index 0000000000000000000000000000000000000000..5b8f4b9ecd894f1edfaa08d9fe730b8d7c8b93e0 --- /dev/null +++ b/miniconda3/pkgs/tqdm-4.67.3-py313h7040dfc_1/lib/python3.13/site-packages/tqdm/contrib/bells.py @@ -0,0 +1,26 @@ +""" +Even more features than `tqdm.auto` (all the bells & whistles): + +- `tqdm.auto` +- `tqdm.tqdm.pandas` +- `tqdm.contrib.telegram` + + uses `${TQDM_TELEGRAM_TOKEN}` and `${TQDM_TELEGRAM_CHAT_ID}` +- `tqdm.contrib.discord` + + uses `${TQDM_DISCORD_TOKEN}` and `${TQDM_DISCORD_CHANNEL_ID}` +""" +__all__ = ['tqdm', 'trange'] +import warnings +from os import getenv + +if getenv("TQDM_SLACK_TOKEN") and getenv("TQDM_SLACK_CHANNEL"): + from .slack import tqdm, trange +elif getenv("TQDM_TELEGRAM_TOKEN") and getenv("TQDM_TELEGRAM_CHAT_ID"): + from .telegram import tqdm, trange +elif getenv("TQDM_DISCORD_TOKEN") and getenv("TQDM_DISCORD_CHANNEL_ID"): + from .discord import tqdm, trange +else: + from ..auto import tqdm, trange + +with warnings.catch_warnings(): + warnings.simplefilter("ignore", category=FutureWarning) + tqdm.pandas() diff --git a/miniconda3/pkgs/tqdm-4.67.3-py313h7040dfc_1/lib/python3.13/site-packages/tqdm/contrib/concurrent.py b/miniconda3/pkgs/tqdm-4.67.3-py313h7040dfc_1/lib/python3.13/site-packages/tqdm/contrib/concurrent.py new file mode 100644 index 0000000000000000000000000000000000000000..cd81d622a1309df179042159a56cef4f8c309224 --- /dev/null +++ b/miniconda3/pkgs/tqdm-4.67.3-py313h7040dfc_1/lib/python3.13/site-packages/tqdm/contrib/concurrent.py @@ -0,0 +1,105 @@ +""" +Thin wrappers around `concurrent.futures`. +""" +from contextlib import contextmanager +from operator import length_hint +from os import cpu_count + +from ..auto import tqdm as tqdm_auto +from ..std import TqdmWarning + +__author__ = {"github.com/": ["casperdcl"]} +__all__ = ['thread_map', 'process_map'] + + +@contextmanager +def ensure_lock(tqdm_class, lock_name=""): + """get (create if necessary) and then restore `tqdm_class`'s lock""" + old_lock = getattr(tqdm_class, '_lock', None) # don't create a new lock + lock = old_lock or tqdm_class.get_lock() # maybe create a new lock + lock = getattr(lock, lock_name, lock) # maybe subtype + tqdm_class.set_lock(lock) + yield lock + if old_lock is None: + del tqdm_class._lock + else: + tqdm_class.set_lock(old_lock) + + +def _executor_map(PoolExecutor, fn, *iterables, **tqdm_kwargs): + """ + Implementation of `thread_map` and `process_map`. + + Parameters + ---------- + tqdm_class : [default: tqdm.auto.tqdm]. + max_workers : [default: min(32, cpu_count() + 4)]. + chunksize : [default: 1]. + lock_name : [default: "":str]. + """ + kwargs = tqdm_kwargs.copy() + if "total" not in kwargs: + kwargs["total"] = length_hint(iterables[0]) + tqdm_class = kwargs.pop("tqdm_class", tqdm_auto) + max_workers = kwargs.pop("max_workers", min(32, cpu_count() + 4)) + chunksize = kwargs.pop("chunksize", 1) + lock_name = kwargs.pop("lock_name", "") + with ensure_lock(tqdm_class, lock_name=lock_name) as lk: + # share lock in case workers are already using `tqdm` + with PoolExecutor(max_workers=max_workers, initializer=tqdm_class.set_lock, + initargs=(lk,)) as ex: + return list(tqdm_class(ex.map(fn, *iterables, chunksize=chunksize), **kwargs)) + + +def thread_map(fn, *iterables, **tqdm_kwargs): + """ + Equivalent of `list(map(fn, *iterables))` + driven by `concurrent.futures.ThreadPoolExecutor`. + + Parameters + ---------- + tqdm_class : optional + `tqdm` class to use for bars [default: tqdm.auto.tqdm]. + max_workers : int, optional + Maximum number of workers to spawn; passed to + `concurrent.futures.ThreadPoolExecutor.__init__`. + [default: max(32, cpu_count() + 4)]. + """ + from concurrent.futures import ThreadPoolExecutor + return _executor_map(ThreadPoolExecutor, fn, *iterables, **tqdm_kwargs) + + +def process_map(fn, *iterables, **tqdm_kwargs): + """ + Equivalent of `list(map(fn, *iterables))` + driven by `concurrent.futures.ProcessPoolExecutor`. + + Parameters + ---------- + tqdm_class : optional + `tqdm` class to use for bars [default: tqdm.auto.tqdm]. + max_workers : int, optional + Maximum number of workers to spawn; passed to + `concurrent.futures.ProcessPoolExecutor.__init__`. + [default: min(32, cpu_count() + 4)]. + chunksize : int, optional + Size of chunks sent to worker processes; passed to + `concurrent.futures.ProcessPoolExecutor.map`. [default: 1]. + lock_name : str, optional + Member of `tqdm_class.get_lock()` to use [default: mp_lock]. + """ + from concurrent.futures import ProcessPoolExecutor + if iterables and "chunksize" not in tqdm_kwargs: + # default `chunksize=1` has poor performance for large iterables + # (most time spent dispatching items to workers). + longest_iterable_len = max(map(length_hint, iterables)) + if longest_iterable_len > 1000: + from warnings import warn + warn("Iterable length %d > 1000 but `chunksize` is not set." + " This may seriously degrade multiprocess performance." + " Set `chunksize=1` or more." % longest_iterable_len, + TqdmWarning, stacklevel=2) + if "lock_name" not in tqdm_kwargs: + tqdm_kwargs = tqdm_kwargs.copy() + tqdm_kwargs["lock_name"] = "mp_lock" + return _executor_map(ProcessPoolExecutor, fn, *iterables, **tqdm_kwargs) diff --git a/miniconda3/pkgs/tqdm-4.67.3-py313h7040dfc_1/lib/python3.13/site-packages/tqdm/contrib/discord.py b/miniconda3/pkgs/tqdm-4.67.3-py313h7040dfc_1/lib/python3.13/site-packages/tqdm/contrib/discord.py new file mode 100644 index 0000000000000000000000000000000000000000..574baa84bbbeb5afce4a49f23edac894d680ca82 --- /dev/null +++ b/miniconda3/pkgs/tqdm-4.67.3-py313h7040dfc_1/lib/python3.13/site-packages/tqdm/contrib/discord.py @@ -0,0 +1,156 @@ +""" +Sends updates to a Discord bot. + +Usage: +>>> from tqdm.contrib.discord import tqdm, trange +>>> for i in trange(10, token='{token}', channel_id='{channel_id}'): +... ... + +![screenshot](https://tqdm.github.io/img/screenshot-discord.png) +""" +from os import getenv +from warnings import warn + +from requests import Session +from requests.utils import default_user_agent + +from ..auto import tqdm as tqdm_auto +from ..std import TqdmWarning +from ..version import __version__ +from .utils_worker import MonoWorker + +__author__ = {"github.com/": ["casperdcl", "guigoruiz1"]} +__all__ = ['DiscordIO', 'tqdm_discord', 'tdrange', 'tqdm', 'trange'] + + +class DiscordIO(MonoWorker): + """Non-blocking file-like IO using a Discord Bot.""" + API = "https://discord.com/api/v10" + UA = f"tqdm (https://tqdm.github.io, {__version__}) {default_user_agent()}" + + def __init__(self, token, channel_id): + """Creates a new message in the given `channel_id`.""" + super().__init__() + self.token = token + self.channel_id = channel_id + self.session = Session() + self.text = self.__class__.__name__ + self.message_id + + @property + def message_id(self): + if hasattr(self, '_message_id'): + return self._message_id + try: + res = self.session.post( + f'{self.API}/channels/{self.channel_id}/messages', + headers={'Authorization': f'Bot {self.token}', 'User-Agent': self.UA}, + json={'content': f"`{self.text}`"}).json() + except Exception as e: + tqdm_auto.write(str(e)) + else: + if res.get('error_code') == 429: + warn("Creation rate limit: try increasing `mininterval`.", + TqdmWarning, stacklevel=2) + else: + self._message_id = res['id'] + return self._message_id + + def write(self, s): + """Replaces internal `message_id`'s text with `s`.""" + if not s: + s = "..." + s = s.replace('\r', '').strip() + if s == self.text: + return # avoid duplicate message Bot error + message_id = self.message_id + if message_id is None: + return + self.text = s + try: + future = self.submit( + self.session.patch, + f'{self.API}/channels/{self.channel_id}/messages/{message_id}', + headers={'Authorization': f'Bot {self.token}', 'User-Agent': self.UA}, + json={'content': f"`{self.text}`"}) + except Exception as e: + tqdm_auto.write(str(e)) + else: + return future + + def delete(self): + """Deletes internal `message_id`.""" + try: + future = self.submit( + self.session.delete, + f'{self.API}/channels/{self.channel_id}/messages/{self.message_id}', + headers={'Authorization': f'Bot {self.token}', 'User-Agent': self.UA}) + except Exception as e: + tqdm_auto.write(str(e)) + else: + return future + + +class tqdm_discord(tqdm_auto): + """ + Standard `tqdm.auto.tqdm` but also sends updates to a Discord Bot. + May take a few seconds to create (`__init__`). + + - create a discord bot (not public, no requirement of OAuth2 code + grant, only send message permissions) & invite it to a channel: + + - copy the bot `{token}` & `{channel_id}` and paste below + + >>> from tqdm.contrib.discord import tqdm, trange + >>> for i in tqdm(iterable, token='{token}', channel_id='{channel_id}'): + ... ... + """ + def __init__(self, *args, **kwargs): + """ + Parameters + ---------- + token : str, required. Discord bot token + [default: ${TQDM_DISCORD_TOKEN}]. + channel_id : int, required. Discord channel ID + [default: ${TQDM_DISCORD_CHANNEL_ID}]. + + See `tqdm.auto.tqdm.__init__` for other parameters. + """ + if not kwargs.get('disable'): + kwargs = kwargs.copy() + self.dio = DiscordIO( + kwargs.pop('token', getenv('TQDM_DISCORD_TOKEN')), + kwargs.pop('channel_id', getenv('TQDM_DISCORD_CHANNEL_ID'))) + super().__init__(*args, **kwargs) + + def display(self, **kwargs): + super().display(**kwargs) + fmt = self.format_dict + if fmt.get('bar_format', None): + fmt['bar_format'] = fmt['bar_format'].replace( + '', '{bar:10u}').replace('{bar}', '{bar:10u}') + else: + fmt['bar_format'] = '{l_bar}{bar:10u}{r_bar}' + self.dio.write(self.format_meter(**fmt)) + + def clear(self, *args, **kwargs): + super().clear(*args, **kwargs) + if not self.disable: + self.dio.write("") + + def close(self): + if self.disable: + return + super().close() + if not (self.leave or (self.leave is None and self.pos == 0)): + self.dio.delete() + + +def tdrange(*args, **kwargs): + """Shortcut for `tqdm.contrib.discord.tqdm(range(*args), **kwargs)`.""" + return tqdm_discord(range(*args), **kwargs) + + +# Aliases +tqdm = tqdm_discord +trange = tdrange diff --git a/miniconda3/pkgs/tqdm-4.67.3-py313h7040dfc_1/lib/python3.13/site-packages/tqdm/contrib/itertools.py b/miniconda3/pkgs/tqdm-4.67.3-py313h7040dfc_1/lib/python3.13/site-packages/tqdm/contrib/itertools.py new file mode 100644 index 0000000000000000000000000000000000000000..e67651a41a6b8760d9b928ea48239e4611d70315 --- /dev/null +++ b/miniconda3/pkgs/tqdm-4.67.3-py313h7040dfc_1/lib/python3.13/site-packages/tqdm/contrib/itertools.py @@ -0,0 +1,35 @@ +""" +Thin wrappers around `itertools`. +""" +import itertools + +from ..auto import tqdm as tqdm_auto + +__author__ = {"github.com/": ["casperdcl"]} +__all__ = ['product'] + + +def product(*iterables, **tqdm_kwargs): + """ + Equivalent of `itertools.product`. + + Parameters + ---------- + tqdm_class : [default: tqdm.auto.tqdm]. + """ + kwargs = tqdm_kwargs.copy() + tqdm_class = kwargs.pop("tqdm_class", tqdm_auto) + try: + lens = list(map(len, iterables)) + except TypeError: + total = None + else: + total = 1 + for i in lens: + total *= i + kwargs.setdefault("total", total) + with tqdm_class(**kwargs) as t: + it = itertools.product(*iterables) + for i in it: + yield i + t.update() diff --git a/miniconda3/pkgs/tqdm-4.67.3-py313h7040dfc_1/lib/python3.13/site-packages/tqdm/contrib/logging.py b/miniconda3/pkgs/tqdm-4.67.3-py313h7040dfc_1/lib/python3.13/site-packages/tqdm/contrib/logging.py new file mode 100644 index 0000000000000000000000000000000000000000..e06febe37b5d70b5296804c55dca48a397c250e3 --- /dev/null +++ b/miniconda3/pkgs/tqdm-4.67.3-py313h7040dfc_1/lib/python3.13/site-packages/tqdm/contrib/logging.py @@ -0,0 +1,126 @@ +""" +Helper functionality for interoperability with stdlib `logging`. +""" +import logging +import sys +from contextlib import contextmanager + +try: + from typing import Iterator, List, Optional, Type # noqa: F401 +except ImportError: + pass + +from ..std import tqdm as std_tqdm + + +class _TqdmLoggingHandler(logging.StreamHandler): + def __init__( + self, + tqdm_class=std_tqdm # type: Type[std_tqdm] + ): + super().__init__() + self.tqdm_class = tqdm_class + + def emit(self, record): + try: + msg = self.format(record) + self.tqdm_class.write(msg, file=self.stream) + self.flush() + except (KeyboardInterrupt, SystemExit): + raise + except: # noqa pylint: disable=bare-except + self.handleError(record) + + +def _is_console_logging_handler(handler): + return (isinstance(handler, logging.StreamHandler) + and handler.stream in {sys.stdout, sys.stderr}) + + +def _get_first_found_console_logging_handler(handlers): + for handler in handlers: + if _is_console_logging_handler(handler): + return handler + + +@contextmanager +def logging_redirect_tqdm( + loggers=None, # type: Optional[List[logging.Logger]], + tqdm_class=std_tqdm # type: Type[std_tqdm] +): + # type: (...) -> Iterator[None] + """ + Context manager redirecting console logging to `tqdm.write()`, leaving + other logging handlers (e.g. log files) unaffected. + + Parameters + ---------- + loggers : list, optional + Which handlers to redirect (default: [logging.root]). + tqdm_class : optional + + Example + ------- + ```python + import logging + from tqdm import trange + from tqdm.contrib.logging import logging_redirect_tqdm + + LOG = logging.getLogger(__name__) + + if __name__ == '__main__': + logging.basicConfig(level=logging.INFO) + with logging_redirect_tqdm(): + for i in trange(9): + if i == 4: + LOG.info("console logging redirected to `tqdm.write()`") + # logging restored + ``` + """ + if loggers is None: + loggers = [logging.root] + original_handlers_list = [logger.handlers for logger in loggers] + try: + for logger in loggers: + tqdm_handler = _TqdmLoggingHandler(tqdm_class) + orig_handler = _get_first_found_console_logging_handler(logger.handlers) + if orig_handler is not None: + tqdm_handler.setFormatter(orig_handler.formatter) + tqdm_handler.stream = orig_handler.stream + logger.handlers = [ + handler for handler in logger.handlers + if not _is_console_logging_handler(handler)] + [tqdm_handler] + yield + finally: + for logger, original_handlers in zip(loggers, original_handlers_list): + logger.handlers = original_handlers + + +@contextmanager +def tqdm_logging_redirect( + *args, + # loggers=None, # type: Optional[List[logging.Logger]] + # tqdm=None, # type: Optional[Type[tqdm.tqdm]] + **kwargs +): + # type: (...) -> Iterator[None] + """ + Convenience shortcut for: + ```python + with tqdm_class(*args, **tqdm_kwargs) as pbar: + with logging_redirect_tqdm(loggers=loggers, tqdm_class=tqdm_class): + yield pbar + ``` + + Parameters + ---------- + tqdm_class : optional, (default: tqdm.std.tqdm). + loggers : optional, list. + **tqdm_kwargs : passed to `tqdm_class`. + """ + tqdm_kwargs = kwargs.copy() + loggers = tqdm_kwargs.pop('loggers', None) + tqdm_class = tqdm_kwargs.pop('tqdm_class', std_tqdm) + with tqdm_class(*args, **tqdm_kwargs) as pbar: + with logging_redirect_tqdm(loggers=loggers, tqdm_class=tqdm_class): + yield pbar diff --git a/miniconda3/pkgs/tqdm-4.67.3-py313h7040dfc_1/lib/python3.13/site-packages/tqdm/contrib/slack.py b/miniconda3/pkgs/tqdm-4.67.3-py313h7040dfc_1/lib/python3.13/site-packages/tqdm/contrib/slack.py new file mode 100644 index 0000000000000000000000000000000000000000..9bca8ee98904ce869a4f8d6417bbdc4f00b38751 --- /dev/null +++ b/miniconda3/pkgs/tqdm-4.67.3-py313h7040dfc_1/lib/python3.13/site-packages/tqdm/contrib/slack.py @@ -0,0 +1,120 @@ +""" +Sends updates to a Slack app. + +Usage: +>>> from tqdm.contrib.slack import tqdm, trange +>>> for i in trange(10, token='{token}', channel='{channel}'): +... ... + +![screenshot](https://tqdm.github.io/img/screenshot-slack.png) +""" +import logging +from os import getenv + +try: + from slack_sdk import WebClient +except ImportError: + raise ImportError("Please `pip install slack-sdk`") + +from ..auto import tqdm as tqdm_auto +from .utils_worker import MonoWorker + +__author__ = {"github.com/": ["0x2b3bfa0", "casperdcl"]} +__all__ = ['SlackIO', 'tqdm_slack', 'tsrange', 'tqdm', 'trange'] + + +class SlackIO(MonoWorker): + """Non-blocking file-like IO using a Slack app.""" + def __init__(self, token, channel): + """Creates a new message in the given `channel`.""" + super().__init__() + self.client = WebClient(token=token) + self.text = self.__class__.__name__ + try: + self.message = self.client.chat_postMessage(channel=channel, text=self.text) + except Exception as e: + tqdm_auto.write(str(e)) + self.message = None + + def write(self, s): + """Replaces internal `message`'s text with `s`.""" + if not s: + s = "..." + s = s.replace('\r', '').strip() + if s == self.text: + return # skip duplicate message + message = self.message + if message is None: + return + self.text = s + try: + future = self.submit(self.client.chat_update, channel=message['channel'], + ts=message['ts'], text='`' + s + '`') + except Exception as e: + tqdm_auto.write(str(e)) + else: + return future + + +class tqdm_slack(tqdm_auto): + """ + Standard `tqdm.auto.tqdm` but also sends updates to a Slack app. + May take a few seconds to create (`__init__`). + + - create a Slack app with the `chat:write` scope & invite it to a + channel: + - copy the bot `{token}` & `{channel}` and paste below + >>> from tqdm.contrib.slack import tqdm, trange + >>> for i in tqdm(iterable, token='{token}', channel='{channel}'): + ... ... + """ + def __init__(self, *args, **kwargs): + """ + Parameters + ---------- + token : str, required. Slack token + [default: ${TQDM_SLACK_TOKEN}]. + channel : int, required. Slack channel + [default: ${TQDM_SLACK_CHANNEL}]. + mininterval : float, optional. + Minimum of [default: 1.5] to avoid rate limit. + + See `tqdm.auto.tqdm.__init__` for other parameters. + """ + if not kwargs.get('disable'): + kwargs = kwargs.copy() + logging.getLogger("HTTPClient").setLevel(logging.WARNING) + self.sio = SlackIO( + kwargs.pop('token', getenv("TQDM_SLACK_TOKEN")), + kwargs.pop('channel', getenv("TQDM_SLACK_CHANNEL"))) + kwargs['mininterval'] = max(1.5, kwargs.get('mininterval', 1.5)) + super().__init__(*args, **kwargs) + + def display(self, **kwargs): + super().display(**kwargs) + fmt = self.format_dict + if fmt.get('bar_format', None): + fmt['bar_format'] = fmt['bar_format'].replace( + '', '`{bar:10}`').replace('{bar}', '`{bar:10u}`') + else: + fmt['bar_format'] = '{l_bar}`{bar:10}`{r_bar}' + if fmt['ascii'] is False: + fmt['ascii'] = [":black_square:", ":small_blue_diamond:", ":large_blue_diamond:", + ":large_blue_square:"] + fmt['ncols'] = 336 + self.sio.write(self.format_meter(**fmt)) + + def clear(self, *args, **kwargs): + super().clear(*args, **kwargs) + if not self.disable: + self.sio.write("") + + +def tsrange(*args, **kwargs): + """Shortcut for `tqdm.contrib.slack.tqdm(range(*args), **kwargs)`.""" + return tqdm_slack(range(*args), **kwargs) + + +# Aliases +tqdm = tqdm_slack +trange = tsrange diff --git a/miniconda3/pkgs/tqdm-4.67.3-py313h7040dfc_1/lib/python3.13/site-packages/tqdm/contrib/telegram.py b/miniconda3/pkgs/tqdm-4.67.3-py313h7040dfc_1/lib/python3.13/site-packages/tqdm/contrib/telegram.py new file mode 100644 index 0000000000000000000000000000000000000000..019151800bc0c4c4fc543314b6398aa602b0692a --- /dev/null +++ b/miniconda3/pkgs/tqdm-4.67.3-py313h7040dfc_1/lib/python3.13/site-packages/tqdm/contrib/telegram.py @@ -0,0 +1,153 @@ +""" +Sends updates to a Telegram bot. + +Usage: +>>> from tqdm.contrib.telegram import tqdm, trange +>>> for i in trange(10, token='{token}', chat_id='{chat_id}'): +... ... + +![screenshot](https://tqdm.github.io/img/screenshot-telegram.gif) +""" +from os import getenv +from warnings import warn + +from requests import Session + +from ..auto import tqdm as tqdm_auto +from ..std import TqdmWarning +from .utils_worker import MonoWorker + +__author__ = {"github.com/": ["casperdcl"]} +__all__ = ['TelegramIO', 'tqdm_telegram', 'ttgrange', 'tqdm', 'trange'] + + +class TelegramIO(MonoWorker): + """Non-blocking file-like IO using a Telegram Bot.""" + API = 'https://api.telegram.org/bot' + + def __init__(self, token, chat_id): + """Creates a new message in the given `chat_id`.""" + super().__init__() + self.token = token + self.chat_id = chat_id + self.session = Session() + self.text = self.__class__.__name__ + self.message_id + + @property + def message_id(self): + if hasattr(self, '_message_id'): + return self._message_id + try: + res = self.session.post( + self.API + '%s/sendMessage' % self.token, + data={'text': '`' + self.text + '`', 'chat_id': self.chat_id, + 'parse_mode': 'MarkdownV2'}).json() + except Exception as e: + tqdm_auto.write(str(e)) + else: + if res.get('error_code') == 429: + warn("Creation rate limit: try increasing `mininterval`.", + TqdmWarning, stacklevel=2) + else: + self._message_id = res['result']['message_id'] + return self._message_id + + def write(self, s): + """Replaces internal `message_id`'s text with `s`.""" + if not s: + s = "..." + s = s.replace('\r', '').strip() + if s == self.text: + return # avoid duplicate message Bot error + message_id = self.message_id + if message_id is None: + return + self.text = s + try: + future = self.submit( + self.session.post, self.API + '%s/editMessageText' % self.token, + data={'text': '`' + s + '`', 'chat_id': self.chat_id, + 'message_id': message_id, 'parse_mode': 'MarkdownV2'}) + except Exception as e: + tqdm_auto.write(str(e)) + else: + return future + + def delete(self): + """Deletes internal `message_id`.""" + try: + future = self.submit( + self.session.post, self.API + '%s/deleteMessage' % self.token, + data={'chat_id': self.chat_id, 'message_id': self.message_id}) + except Exception as e: + tqdm_auto.write(str(e)) + else: + return future + + +class tqdm_telegram(tqdm_auto): + """ + Standard `tqdm.auto.tqdm` but also sends updates to a Telegram Bot. + May take a few seconds to create (`__init__`). + + - create a bot + - copy its `{token}` + - add the bot to a chat and send it a message such as `/start` + - go to to find out + the `{chat_id}` + - paste the `{token}` & `{chat_id}` below + + >>> from tqdm.contrib.telegram import tqdm, trange + >>> for i in tqdm(iterable, token='{token}', chat_id='{chat_id}'): + ... ... + """ + def __init__(self, *args, **kwargs): + """ + Parameters + ---------- + token : str, required. Telegram token + [default: ${TQDM_TELEGRAM_TOKEN}]. + chat_id : str, required. Telegram chat ID + [default: ${TQDM_TELEGRAM_CHAT_ID}]. + + See `tqdm.auto.tqdm.__init__` for other parameters. + """ + if not kwargs.get('disable'): + kwargs = kwargs.copy() + self.tgio = TelegramIO( + kwargs.pop('token', getenv('TQDM_TELEGRAM_TOKEN')), + kwargs.pop('chat_id', getenv('TQDM_TELEGRAM_CHAT_ID'))) + super().__init__(*args, **kwargs) + + def display(self, **kwargs): + super().display(**kwargs) + fmt = self.format_dict + if fmt.get('bar_format', None): + fmt['bar_format'] = fmt['bar_format'].replace( + '', '{bar:10u}').replace('{bar}', '{bar:10u}') + else: + fmt['bar_format'] = '{l_bar}{bar:10u}{r_bar}' + self.tgio.write(self.format_meter(**fmt)) + + def clear(self, *args, **kwargs): + super().clear(*args, **kwargs) + if not self.disable: + self.tgio.write("") + + def close(self): + if self.disable: + return + super().close() + if not (self.leave or (self.leave is None and self.pos == 0)): + self.tgio.delete() + + +def ttgrange(*args, **kwargs): + """Shortcut for `tqdm.contrib.telegram.tqdm(range(*args), **kwargs)`.""" + return tqdm_telegram(range(*args), **kwargs) + + +# Aliases +tqdm = tqdm_telegram +trange = ttgrange diff --git a/miniconda3/pkgs/tqdm-4.67.3-py313h7040dfc_1/lib/python3.13/site-packages/tqdm/contrib/utils_worker.py b/miniconda3/pkgs/tqdm-4.67.3-py313h7040dfc_1/lib/python3.13/site-packages/tqdm/contrib/utils_worker.py new file mode 100644 index 0000000000000000000000000000000000000000..89fafc8c92f8ed085077b37eb58329f2588bd5d7 --- /dev/null +++ b/miniconda3/pkgs/tqdm-4.67.3-py313h7040dfc_1/lib/python3.13/site-packages/tqdm/contrib/utils_worker.py @@ -0,0 +1,38 @@ +""" +IO/concurrency helpers for `tqdm.contrib`. +""" +from collections import deque +from concurrent.futures import ThreadPoolExecutor + +from ..auto import tqdm as tqdm_auto + +__author__ = {"github.com/": ["casperdcl"]} +__all__ = ['MonoWorker'] + + +class MonoWorker: + """ + Supports one running task and one waiting task. + The waiting task is the most recent submitted (others are discarded). + """ + def __init__(self): + self.pool = ThreadPoolExecutor(max_workers=1) + self.futures = deque([], 2) + + def submit(self, func, *args, **kwargs): + """`func(*args, **kwargs)` may replace currently waiting task.""" + futures = self.futures + if len(futures) == futures.maxlen: + running = futures.popleft() + if not running.done(): + if len(futures): # clear waiting + waiting = futures.pop() + waiting.cancel() + futures.appendleft(running) # re-insert running + try: + waiting = self.pool.submit(func, *args, **kwargs) + except Exception as e: + tqdm_auto.write(str(e)) + else: + futures.append(waiting) + return waiting diff --git a/miniconda3/pkgs/tqdm-4.67.3-py313h7040dfc_1/lib/python3.13/site-packages/tqdm/dask.py b/miniconda3/pkgs/tqdm-4.67.3-py313h7040dfc_1/lib/python3.13/site-packages/tqdm/dask.py new file mode 100644 index 0000000000000000000000000000000000000000..57f1b668f59dc5991019eee34c7df3232a2c2cd7 --- /dev/null +++ b/miniconda3/pkgs/tqdm-4.67.3-py313h7040dfc_1/lib/python3.13/site-packages/tqdm/dask.py @@ -0,0 +1,44 @@ +from functools import partial + +from dask.callbacks import Callback + +from .auto import tqdm as tqdm_auto + +__author__ = {"github.com/": ["casperdcl"]} +__all__ = ['TqdmCallback'] + + +class TqdmCallback(Callback): + """Dask callback for task progress.""" + def __init__(self, start=None, pretask=None, tqdm_class=tqdm_auto, + **tqdm_kwargs): + """ + Parameters + ---------- + tqdm_class : optional + `tqdm` class to use for bars [default: `tqdm.auto.tqdm`]. + tqdm_kwargs : optional + Any other arguments used for all bars. + """ + super().__init__(start=start, pretask=pretask) + if tqdm_kwargs: + tqdm_class = partial(tqdm_class, **tqdm_kwargs) + self.tqdm_class = tqdm_class + + def _start_state(self, _, state): + self.pbar = self.tqdm_class(total=sum( + len(state[k]) for k in ['ready', 'waiting', 'running', 'finished'])) + + def _posttask(self, *_, **__): + self.pbar.update() + + def _finish(self, *_, **__): + self.pbar.close() + + def display(self): + """Displays in the current cell in Notebooks.""" + container = getattr(self.bar, 'container', None) + if container is None: + return + from .notebook import display + display(container) diff --git a/miniconda3/pkgs/tqdm-4.67.3-py313h7040dfc_1/lib/python3.13/site-packages/tqdm/gui.py b/miniconda3/pkgs/tqdm-4.67.3-py313h7040dfc_1/lib/python3.13/site-packages/tqdm/gui.py new file mode 100644 index 0000000000000000000000000000000000000000..cb52fb91a8661f4c73edd352bbc6f21b877dcfee --- /dev/null +++ b/miniconda3/pkgs/tqdm-4.67.3-py313h7040dfc_1/lib/python3.13/site-packages/tqdm/gui.py @@ -0,0 +1,179 @@ +""" +Matplotlib GUI progressbar decorator for iterators. + +Usage: +>>> from tqdm.gui import trange, tqdm +>>> for i in trange(10): +... ... +""" +# future division is important to divide integers and get as +# a result precise floating numbers (instead of truncated int) +import re +from warnings import warn + +# to inherit from the tqdm class +from .std import TqdmExperimentalWarning +from .std import tqdm as std_tqdm + +# import compatibility functions and utilities + +__author__ = {"github.com/": ["casperdcl", "lrq3000"]} +__all__ = ['tqdm_gui', 'tgrange', 'tqdm', 'trange'] + + +class tqdm_gui(std_tqdm): # pragma: no cover + """Experimental Matplotlib GUI version of tqdm!""" + # TODO: @classmethod: write() on GUI? + def __init__(self, *args, **kwargs): + from collections import deque + + import matplotlib as mpl + import matplotlib.pyplot as plt + kwargs = kwargs.copy() + kwargs['gui'] = True + colour = kwargs.pop('colour', 'g') + super().__init__(*args, **kwargs) + + if self.disable: + return + + warn("GUI is experimental/alpha", TqdmExperimentalWarning, stacklevel=2) + self.mpl = mpl + self.plt = plt + + # Remember if external environment uses toolbars + self.toolbar = self.mpl.rcParams['toolbar'] + self.mpl.rcParams['toolbar'] = 'None' + + self.mininterval = max(self.mininterval, 0.5) + self.fig, ax = plt.subplots(figsize=(9, 2.2)) + # self.fig.subplots_adjust(bottom=0.2) + total = self.__len__() # avoids TypeError on None #971 + if total is not None: + self.xdata = [] + self.ydata = [] + self.zdata = [] + else: + self.xdata = deque([]) + self.ydata = deque([]) + self.zdata = deque([]) + self.line1, = ax.plot(self.xdata, self.ydata, color='b') + self.line2, = ax.plot(self.xdata, self.zdata, color='k') + ax.set_ylim(0, 0.001) + if total is not None: + ax.set_xlim(0, 100) + ax.set_xlabel("percent") + self.fig.legend((self.line1, self.line2), ("cur", "est"), + loc='center right') + # progressbar + self.hspan = plt.axhspan(0, 0.001, xmin=0, xmax=0, color=colour) + else: + # ax.set_xlim(-60, 0) + ax.set_xlim(0, 60) + ax.invert_xaxis() + ax.set_xlabel("seconds") + ax.legend(("cur", "est"), loc='lower left') + ax.grid() + # ax.set_xlabel('seconds') + ax.set_ylabel((self.unit if self.unit else "it") + "/s") + if self.unit_scale: + plt.ticklabel_format(style='sci', axis='y', scilimits=(0, 0)) + ax.yaxis.get_offset_text().set_x(-0.15) + + # Remember if external environment is interactive + self.wasion = plt.isinteractive() + plt.ion() + self.ax = ax + + def close(self): + if self.disable: + return + + self.disable = True + + with self.get_lock(): + self._instances.remove(self) + + # Restore toolbars + self.mpl.rcParams['toolbar'] = self.toolbar + # Return to non-interactive mode + if not self.wasion: + self.plt.ioff() + if self.leave: + self.display() + else: + self.plt.close(self.fig) + + def clear(self, *_, **__): + pass + + def display(self, *_, **__): + n = self.n + cur_t = self._time() + elapsed = cur_t - self.start_t + delta_it = n - self.last_print_n + delta_t = cur_t - self.last_print_t + + # Inline due to multiple calls + total = self.total + xdata = self.xdata + ydata = self.ydata + zdata = self.zdata + ax = self.ax + line1 = self.line1 + line2 = self.line2 + hspan = getattr(self, 'hspan', None) + # instantaneous rate + y = delta_it / delta_t + # overall rate + z = n / elapsed + # update line data + xdata.append(n * 100.0 / total if total else cur_t) + ydata.append(y) + zdata.append(z) + + # Discard old values + # xmin, xmax = ax.get_xlim() + # if (not total) and elapsed > xmin * 1.1: + if (not total) and elapsed > 66: + xdata.popleft() + ydata.popleft() + zdata.popleft() + + ymin, ymax = ax.get_ylim() + if y > ymax or z > ymax: + ymax = 1.1 * y + ax.set_ylim(ymin, ymax) + ax.figure.canvas.draw() + + if total: + line1.set_data(xdata, ydata) + line2.set_data(xdata, zdata) + if hspan: + hspan.set_xy((0, ymin)) + hspan.set_height(ymax - ymin) + hspan.set_width(n / total) + else: + t_ago = [cur_t - i for i in xdata] + line1.set_data(t_ago, ydata) + line2.set_data(t_ago, zdata) + + d = self.format_dict + # remove {bar} + d['bar_format'] = (d['bar_format'] or "{l_bar}{r_bar}").replace( + "{bar}", "") + msg = self.format_meter(**d) + if '' in msg: + msg = "".join(re.split(r'\|?\|?', msg, maxsplit=1)) + ax.set_title(msg, fontname="DejaVu Sans Mono", fontsize=11) + self.plt.pause(1e-9) + + +def tgrange(*args, **kwargs): + """Shortcut for `tqdm.gui.tqdm(range(*args), **kwargs)`.""" + return tqdm_gui(range(*args), **kwargs) + + +# Aliases +tqdm = tqdm_gui +trange = tgrange diff --git a/miniconda3/pkgs/tqdm-4.67.3-py313h7040dfc_1/lib/python3.13/site-packages/tqdm/keras.py b/miniconda3/pkgs/tqdm-4.67.3-py313h7040dfc_1/lib/python3.13/site-packages/tqdm/keras.py new file mode 100644 index 0000000000000000000000000000000000000000..cce9467c51a95388aaa502d1da9a42f3ebf0af24 --- /dev/null +++ b/miniconda3/pkgs/tqdm-4.67.3-py313h7040dfc_1/lib/python3.13/site-packages/tqdm/keras.py @@ -0,0 +1,122 @@ +from copy import copy +from functools import partial + +from .auto import tqdm as tqdm_auto + +try: + import keras +except (ImportError, AttributeError) as e: + try: + from tensorflow import keras + except ImportError: + raise e +__author__ = {"github.com/": ["casperdcl"]} +__all__ = ['TqdmCallback'] + + +class TqdmCallback(keras.callbacks.Callback): + """Keras callback for epoch and batch progress.""" + @staticmethod + def bar2callback(bar, pop=None, delta=(lambda logs: 1)): + def callback(_, logs=None): + n = delta(logs) + if logs: + if pop: + logs = copy(logs) + [logs.pop(i, 0) for i in pop] + bar.set_postfix(logs, refresh=False) + bar.update(n) + + return callback + + def __init__(self, epochs=None, data_size=None, batch_size=None, verbose=1, + tqdm_class=tqdm_auto, **tqdm_kwargs): + """ + Parameters + ---------- + epochs : int, optional + data_size : int, optional + Number of training pairs. + batch_size : int, optional + Number of training pairs per batch. + verbose : int + 0: epoch, 1: batch (transient), 2: batch. [default: 1]. + Will be set to `0` unless both `data_size` and `batch_size` + are given. + tqdm_class : optional + `tqdm` class to use for bars [default: `tqdm.auto.tqdm`]. + tqdm_kwargs : optional + Any other arguments used for all bars. + """ + if tqdm_kwargs: + tqdm_class = partial(tqdm_class, **tqdm_kwargs) + self.tqdm_class = tqdm_class + self.epoch_bar = tqdm_class(total=epochs, unit='epoch') + self.on_epoch_end = self.bar2callback(self.epoch_bar) + if data_size and batch_size: + self.batches = batches = (data_size + batch_size - 1) // batch_size + else: + self.batches = batches = None + self.verbose = verbose + if verbose == 1: + self.batch_bar = tqdm_class(total=batches, unit='batch', leave=False) + self.on_batch_end = self.bar2callback( + self.batch_bar, pop=['batch', 'size'], + delta=lambda logs: logs.get('size', 1)) + + def on_train_begin(self, *_, **__): + params = self.params.get + auto_total = params('epochs', params('nb_epoch', None)) + if auto_total is not None and auto_total != self.epoch_bar.total: + self.epoch_bar.reset(total=auto_total) + + def on_epoch_begin(self, epoch, *_, **__): + if self.epoch_bar.n < epoch: + ebar = self.epoch_bar + ebar.n = ebar.last_print_n = ebar.initial = epoch + if self.verbose: + params = self.params.get + total = params('samples', params( + 'nb_sample', params('steps', None))) or self.batches + if self.verbose == 2: + if hasattr(self, 'batch_bar'): + self.batch_bar.close() + self.batch_bar = self.tqdm_class( + total=total, unit='batch', leave=True, + unit_scale=1 / (params('batch_size', 1) or 1)) + self.on_batch_end = self.bar2callback( + self.batch_bar, pop=['batch', 'size'], + delta=lambda logs: logs.get('size', 1)) + elif self.verbose == 1: + self.batch_bar.unit_scale = 1 / (params('batch_size', 1) or 1) + self.batch_bar.reset(total=total) + else: + raise KeyError('Unknown verbosity') + + def on_train_end(self, *_, **__): + if hasattr(self, 'batch_bar'): + self.batch_bar.close() + self.epoch_bar.close() + + def display(self): + """Displays in the current cell in Notebooks.""" + container = getattr(self.epoch_bar, 'container', None) + if container is None: + return + from .notebook import display + display(container) + batch_bar = getattr(self, 'batch_bar', None) + if batch_bar is not None: + display(batch_bar.container) + + @staticmethod + def _implements_train_batch_hooks(): + return True + + @staticmethod + def _implements_test_batch_hooks(): + return True + + @staticmethod + def _implements_predict_batch_hooks(): + return True diff --git a/miniconda3/pkgs/tqdm-4.67.3-py313h7040dfc_1/lib/python3.13/site-packages/tqdm/notebook.py b/miniconda3/pkgs/tqdm-4.67.3-py313h7040dfc_1/lib/python3.13/site-packages/tqdm/notebook.py new file mode 100644 index 0000000000000000000000000000000000000000..83178e981f46c0784a36bee1f9e347022c7678a4 --- /dev/null +++ b/miniconda3/pkgs/tqdm-4.67.3-py313h7040dfc_1/lib/python3.13/site-packages/tqdm/notebook.py @@ -0,0 +1,315 @@ +""" +IPython/Jupyter Notebook progressbar decorator for iterators. +Includes a default `range` iterator printing to `stderr`. + +Usage: +>>> from tqdm.notebook import trange, tqdm +>>> for i in trange(10): +... ... +""" +# import compatibility functions and utilities +import re +import sys +from html import escape +from weakref import proxy + +# to inherit from the tqdm class +from .std import tqdm as std_tqdm + +if True: # pragma: no cover + # import IPython/Jupyter base widget and display utilities + IPY = 0 + try: # IPython 4.x + import ipywidgets + IPY = 4 + except ImportError: # IPython 3.x / 2.x + IPY = 32 + import warnings + with warnings.catch_warnings(): + warnings.filterwarnings( + 'ignore', message=".*The `IPython.html` package has been deprecated.*") + try: + import IPython.html.widgets as ipywidgets # NOQA: F401 + except ImportError: + pass + + try: # IPython 4.x / 3.x + if IPY == 32: + from IPython.html.widgets import HTML + from IPython.html.widgets import FloatProgress as IProgress + from IPython.html.widgets import HBox + IPY = 3 + else: + from ipywidgets import HTML + from ipywidgets import FloatProgress as IProgress + from ipywidgets import HBox + except ImportError: + try: # IPython 2.x + from IPython.html.widgets import HTML + from IPython.html.widgets import ContainerWidget as HBox + from IPython.html.widgets import FloatProgressWidget as IProgress + IPY = 2 + except ImportError: + IPY = 0 + IProgress = None + HBox = object + + try: + from IPython.display import display # , clear_output + except ImportError: + pass + +__author__ = {"github.com/": ["lrq3000", "casperdcl", "alexanderkuk"]} +__all__ = ['tqdm_notebook', 'tnrange', 'tqdm', 'trange'] +WARN_NOIPYW = ("IProgress not found. Please update jupyter and ipywidgets." + " See https://ipywidgets.readthedocs.io/en/stable" + "/user_install.html") + + +class TqdmHBox(HBox): + """`ipywidgets.HBox` with a pretty representation""" + def _json_(self, pretty=None): + pbar = getattr(self, 'pbar', None) + if pbar is None: + return {} + d = pbar.format_dict + if pretty is not None: + d["ascii"] = not pretty + return d + + def __repr__(self, pretty=False): + pbar = getattr(self, 'pbar', None) + if pbar is None: + return super().__repr__() + return pbar.format_meter(**self._json_(pretty)) + + def _repr_pretty_(self, pp, *_, **__): + pp.text(self.__repr__(True)) + + +class tqdm_notebook(std_tqdm): + """ + Experimental IPython/Jupyter Notebook widget using tqdm! + """ + @staticmethod + def status_printer(_, total=None, desc=None, ncols=None): + """ + Manage the printing of an IPython/Jupyter Notebook progress bar widget. + """ + # Fallback to text bar if there's no total + # DEPRECATED: replaced with an 'info' style bar + # if not total: + # return super(tqdm_notebook, tqdm_notebook).status_printer(file) + + # fp = file + + # Prepare IPython progress bar + if IProgress is None: # #187 #451 #558 #872 + raise ImportError(WARN_NOIPYW) + if total: + pbar = IProgress(min=0, max=total) + else: # No total? Show info style bar with no progress tqdm status + pbar = IProgress(min=0, max=1) + pbar.value = 1 + pbar.bar_style = 'info' + if ncols is None: + pbar.layout.width = "20px" + + ltext = HTML() + rtext = HTML() + if desc: + ltext.value = desc + container = TqdmHBox(children=[ltext, pbar, rtext]) + # Prepare layout + if ncols is not None: # use default style of ipywidgets + # ncols could be 100, "100px", "100%" + ncols = str(ncols) # ipywidgets only accepts string + try: + if int(ncols) > 0: # isnumeric and positive + ncols += 'px' + except ValueError: + pass + pbar.layout.flex = '2' + container.layout.width = ncols + container.layout.display = 'inline-flex' + container.layout.flex_flow = 'row wrap' + + return container + + def display(self, msg=None, pos=None, + # additional signals + close=False, bar_style=None, check_delay=True): + # Note: contrary to native tqdm, msg='' does NOT clear bar + # goal is to keep all infos if error happens so user knows + # at which iteration the loop failed. + + # Clear previous output (really necessary?) + # clear_output(wait=1) + + if not msg and not close: + d = self.format_dict + # remove {bar} + d['bar_format'] = (d['bar_format'] or "{l_bar}{r_bar}").replace( + "{bar}", "") + msg = self.format_meter(**d) + + ltext, pbar, rtext = self.container.children + pbar.value = self.n + + if msg: + msg = msg.replace(' ', '\u2007') # fix html space padding + # html escape special characters (like '&') + if '' in msg: + left, right = map(escape, re.split(r'\|?\|?', msg, maxsplit=1)) + else: + left, right = '', escape(msg) + + # Update description + ltext.value = left + # never clear the bar (signal: msg='') + if right: + rtext.value = right + + # Change bar style + if bar_style: + # Hack-ish way to avoid the danger bar_style being overridden by + # success because the bar gets closed after the error... + if pbar.bar_style != 'danger' or bar_style != 'success': + pbar.bar_style = bar_style + + # Special signal to close the bar + if close and pbar.bar_style != 'danger': # hide only if no error + try: + self.container.close() + except AttributeError: + self.container.visible = False + self.container.layout.visibility = 'hidden' # IPYW>=8 + + if check_delay and self.delay > 0 and not self.displayed: + display(self.container) + self.displayed = True + + @property + def colour(self): + if hasattr(self, 'container'): + return self.container.children[-2].style.bar_color + + @colour.setter + def colour(self, bar_color): + if hasattr(self, 'container'): + self.container.children[-2].style.bar_color = bar_color + + def __init__(self, *args, **kwargs): + """ + Supports the usual `tqdm.tqdm` parameters as well as those listed below. + + Parameters + ---------- + display : Whether to call `display(self.container)` immediately + [default: True]. + """ + kwargs = kwargs.copy() + # Setup default output + file_kwarg = kwargs.get('file', sys.stderr) + if file_kwarg is sys.stderr or file_kwarg is None: + kwargs['file'] = sys.stdout # avoid the red block in IPython + + # Initialize parent class + avoid printing by using gui=True + kwargs['gui'] = True + # convert disable = None to False + kwargs['disable'] = bool(kwargs.get('disable', False)) + colour = kwargs.pop('colour', None) + display_here = kwargs.pop('display', True) + super().__init__(*args, **kwargs) + if self.disable or not kwargs['gui']: + self.disp = lambda *_, **__: None + return + + # Get bar width + self.ncols = '100%' if self.dynamic_ncols else kwargs.get("ncols", None) + + # Replace with IPython progress bar display (with correct total) + unit_scale = 1 if self.unit_scale is True else self.unit_scale or 1 + total = self.total * unit_scale if self.total else self.total + self.container = self.status_printer(self.fp, total, self.desc, self.ncols) + self.container.pbar = proxy(self) + self.displayed = False + if display_here and self.delay <= 0: + display(self.container) + self.displayed = True + self.disp = self.display + self.colour = colour + + # Print initial bar state + if not self.disable: + self.display(check_delay=False) + + def __iter__(self): + try: + it = super().__iter__() + yield from it + # NB: except ... [ as ...] breaks IPython async KeyboardInterrupt + except: # NOQA + self.disp(bar_style='danger') + raise + # NB: don't `finally: close()` + # since this could be a shared bar which the user will `reset()` + + def update(self, n=1): + try: + return super().update(n=n) + # NB: except ... [ as ...] breaks IPython async KeyboardInterrupt + except: # NOQA + # cannot catch KeyboardInterrupt when using manual tqdm + # as the interrupt will most likely happen on another statement + self.disp(bar_style='danger') + raise + # NB: don't `finally: close()` + # since this could be a shared bar which the user will `reset()` + + def close(self): + if self.disable: + return + super().close() + # Try to detect if there was an error or KeyboardInterrupt + # in manual mode: if n < total, things probably got wrong + if self.total and self.n < self.total: + self.disp(bar_style='danger', check_delay=False) + else: + if self.leave: + self.disp(bar_style='success', check_delay=False) + else: + self.disp(close=True, check_delay=False) + + def clear(self, *_, **__): + pass + + def reset(self, total=None): + """ + Resets to 0 iterations for repeated use. + + Consider combining with `leave=True`. + + Parameters + ---------- + total : int or float, optional. Total to use for the new bar. + """ + if self.disable: + return super().reset(total=total) + _, pbar, _ = self.container.children + pbar.bar_style = '' + if total is not None: + pbar.max = total + if not self.total and self.ncols is None: # no longer unknown total + pbar.layout.width = None # reset width + return super().reset(total=total) + + +def tnrange(*args, **kwargs): + """Shortcut for `tqdm.notebook.tqdm(range(*args), **kwargs)`.""" + return tqdm_notebook(range(*args), **kwargs) + + +# Aliases +tqdm = tqdm_notebook +trange = tnrange diff --git a/miniconda3/pkgs/tqdm-4.67.3-py313h7040dfc_1/lib/python3.13/site-packages/tqdm/rich.py b/miniconda3/pkgs/tqdm-4.67.3-py313h7040dfc_1/lib/python3.13/site-packages/tqdm/rich.py new file mode 100644 index 0000000000000000000000000000000000000000..3d392edaf115a93f7c145de52cbe8978dcf1ede8 --- /dev/null +++ b/miniconda3/pkgs/tqdm-4.67.3-py313h7040dfc_1/lib/python3.13/site-packages/tqdm/rich.py @@ -0,0 +1,151 @@ +""" +`rich.progress` decorator for iterators. + +Usage: +>>> from tqdm.rich import trange, tqdm +>>> for i in trange(10): +... ... +""" +from warnings import warn + +from rich.progress import ( + BarColumn, Progress, ProgressColumn, Text, TimeElapsedColumn, TimeRemainingColumn, filesize) + +from .std import TqdmExperimentalWarning +from .std import tqdm as std_tqdm + +__author__ = {"github.com/": ["casperdcl"]} +__all__ = ['tqdm_rich', 'trrange', 'tqdm', 'trange'] + + +class FractionColumn(ProgressColumn): + """Renders completed/total, e.g. '0.5/2.3 G'.""" + def __init__(self, unit_scale=False, unit_divisor=1000): + self.unit_scale = unit_scale + self.unit_divisor = unit_divisor + super().__init__() + + def render(self, task): + """Calculate common unit for completed and total.""" + completed = int(task.completed) + total = int(task.total) + if self.unit_scale: + unit, suffix = filesize.pick_unit_and_suffix( + total, + ["", "K", "M", "G", "T", "P", "E", "Z", "Y"], + self.unit_divisor, + ) + else: + unit, suffix = filesize.pick_unit_and_suffix(total, [""], 1) + precision = 0 if unit == 1 else 1 + return Text( + f"{completed/unit:,.{precision}f}/{total/unit:,.{precision}f} {suffix}", + style="progress.download") + + +class RateColumn(ProgressColumn): + """Renders human readable transfer speed.""" + def __init__(self, unit="", unit_scale=False, unit_divisor=1000): + self.unit = unit + self.unit_scale = unit_scale + self.unit_divisor = unit_divisor + super().__init__() + + def render(self, task): + """Show data transfer speed.""" + speed = task.speed + if speed is None: + return Text(f"? {self.unit}/s", style="progress.data.speed") + if self.unit_scale: + unit, suffix = filesize.pick_unit_and_suffix( + speed, + ["", "K", "M", "G", "T", "P", "E", "Z", "Y"], + self.unit_divisor, + ) + else: + unit, suffix = filesize.pick_unit_and_suffix(speed, [""], 1) + precision = 0 if unit == 1 else 1 + return Text(f"{speed/unit:,.{precision}f} {suffix}{self.unit}/s", + style="progress.data.speed") + + +class tqdm_rich(std_tqdm): # pragma: no cover + """Experimental rich.progress GUI version of tqdm!""" + # TODO: @classmethod: write()? + def __init__(self, *args, **kwargs): + """ + This class accepts the following parameters *in addition* to + the parameters accepted by `tqdm`. + + Parameters + ---------- + progress : tuple, optional + arguments for `rich.progress.Progress()`. + options : dict, optional + keyword arguments for `rich.progress.Progress()`. + """ + kwargs = kwargs.copy() + kwargs['gui'] = True + # convert disable = None to False + kwargs['disable'] = bool(kwargs.get('disable', False)) + progress = kwargs.pop('progress', None) + options = kwargs.pop('options', {}).copy() + super().__init__(*args, **kwargs) + + if self.disable: + return + + warn("rich is experimental/alpha", TqdmExperimentalWarning, stacklevel=2) + d = self.format_dict + if progress is None: + progress = ( + "[progress.description]{task.description}" + "[progress.percentage]{task.percentage:>4.0f}%", + BarColumn(bar_width=None), + FractionColumn( + unit_scale=d['unit_scale'], unit_divisor=d['unit_divisor']), + "[", TimeElapsedColumn(), "<", TimeRemainingColumn(), + ",", RateColumn(unit=d['unit'], unit_scale=d['unit_scale'], + unit_divisor=d['unit_divisor']), "]" + ) + options.setdefault('transient', not self.leave) + self._prog = Progress(*progress, **options) + self._prog.__enter__() + self._task_id = self._prog.add_task(self.desc or "", **d) + + def close(self): + if self.disable: + return + self.display() # print 100%, vis #1306 + super().close() + self._prog.__exit__(None, None, None) + + def clear(self, *_, **__): + pass + + def display(self, *_, **__): + if not hasattr(self, '_prog'): + return + self._prog.update(self._task_id, completed=self.n, description=self.desc) + + def reset(self, total=None): + """ + Resets to 0 iterations for repeated use. + + Parameters + ---------- + total : int or float, optional. Total to use for the new bar. + """ + if hasattr(self, '_prog'): + self._prog.reset(total=total) + super().reset(total=total) + + +def trrange(*args, **kwargs): + """Shortcut for `tqdm.rich.tqdm(range(*args), **kwargs)`.""" + return tqdm_rich(range(*args), **kwargs) + + +# Aliases +tqdm = tqdm_rich +trange = trrange diff --git a/miniconda3/pkgs/tqdm-4.67.3-py313h7040dfc_1/lib/python3.13/site-packages/tqdm/std.py b/miniconda3/pkgs/tqdm-4.67.3-py313h7040dfc_1/lib/python3.13/site-packages/tqdm/std.py new file mode 100644 index 0000000000000000000000000000000000000000..14b0c1963156d9aea344889d8c72603ae0265e59 --- /dev/null +++ b/miniconda3/pkgs/tqdm-4.67.3-py313h7040dfc_1/lib/python3.13/site-packages/tqdm/std.py @@ -0,0 +1,1524 @@ +""" +Customisable progressbar decorator for iterators. +Includes a default `range` iterator printing to `stderr`. + +Usage: +>>> from tqdm import trange, tqdm +>>> for i in trange(10): +... ... +""" +import sys +from collections import OrderedDict, defaultdict +from contextlib import contextmanager +from datetime import datetime, timedelta, timezone +from numbers import Number +from time import time +from warnings import warn +from weakref import WeakSet + +from ._monitor import TMonitor +from .utils import ( + CallbackIOWrapper, Comparable, DisableOnWriteError, FormatReplace, SimpleTextIOWrapper, + _is_ascii, _screen_shape_wrapper, _supports_unicode, _term_move_up, disp_len, disp_trim, + envwrap) + +__author__ = "https://github.com/tqdm/tqdm#contributions" +__all__ = ['tqdm', 'trange', + 'TqdmTypeError', 'TqdmKeyError', 'TqdmWarning', + 'TqdmExperimentalWarning', 'TqdmDeprecationWarning', + 'TqdmMonitorWarning'] + + +class TqdmTypeError(TypeError): + pass + + +class TqdmKeyError(KeyError): + pass + + +class TqdmWarning(Warning): + """base class for all tqdm warnings. + + Used for non-external-code-breaking errors, such as garbled printing. + """ + def __init__(self, msg, fp_write=None): # noqa: B042 + if fp_write is not None: + fp_write("\n" + self.__class__.__name__ + ": " + str(msg).rstrip() + '\n') + else: + super().__init__(msg) + + +class TqdmExperimentalWarning(TqdmWarning, FutureWarning): + """beta feature, unstable API and behaviour""" + pass + + +class TqdmDeprecationWarning(TqdmWarning, DeprecationWarning): + # not suppressed if raised + pass + + +class TqdmMonitorWarning(TqdmWarning, RuntimeWarning): + """tqdm monitor errors which do not affect external functionality""" + pass + + +def TRLock(*args, **kwargs): + """threading RLock""" + try: + from threading import RLock + return RLock(*args, **kwargs) + except (ImportError, OSError): # pragma: no cover + pass + + +class TqdmDefaultWriteLock: + """ + Provide a default write lock for thread and multiprocessing safety. + Works only on platforms supporting `fork` (so Windows is excluded). + You must initialise a `tqdm` or `TqdmDefaultWriteLock` instance + before forking in order for the write lock to work. + On Windows, you need to supply the lock from the parent to the children as + an argument to joblib or the parallelism lib you use. + """ + # global thread lock so no setup required for multithreading. + # NB: Do not create multiprocessing lock as it sets the multiprocessing + # context, disallowing `spawn()`/`forkserver()` + th_lock = TRLock() + + def __init__(self): + # Create global parallelism locks to avoid racing issues with parallel + # bars works only if fork available (Linux/MacOSX, but not Windows) + cls = type(self) + root_lock = cls.th_lock + if root_lock is not None: + root_lock.acquire() + cls.create_mp_lock() + self.locks = [lk for lk in [cls.mp_lock, cls.th_lock] if lk is not None] + if root_lock is not None: + root_lock.release() + + def acquire(self, *a, **k): + for lock in self.locks: + lock.acquire(*a, **k) + + def release(self): + for lock in self.locks[::-1]: # Release in inverse order of acquisition + lock.release() + + def __enter__(self): + self.acquire() + + def __exit__(self, *exc): + self.release() + + @classmethod + def create_mp_lock(cls): + if not hasattr(cls, 'mp_lock'): + try: + from multiprocessing import RLock + cls.mp_lock = RLock() + except (ImportError, OSError): # pragma: no cover + cls.mp_lock = None + + @classmethod + def create_th_lock(cls): + assert hasattr(cls, 'th_lock') + warn("create_th_lock not needed anymore", TqdmDeprecationWarning, stacklevel=2) + + +class Bar: + """ + `str.format`-able bar with format specifiers: `[width][type]` + + - `width` + + unspecified (default): use `self.default_len` + + `int >= 0`: overrides `self.default_len` + + `int < 0`: subtract from `self.default_len` + - `type` + + `a`: ascii (`charset=self.ASCII` override) + + `u`: unicode (`charset=self.UTF` override) + + `b`: blank (`charset=" "` override) + """ + ASCII = " 123456789#" + UTF = " " + ''.join(map(chr, range(0x258F, 0x2587, -1))) + BLANK = " " + COLOUR_RESET = '\x1b[0m' + COLOUR_RGB = '\x1b[38;2;%d;%d;%dm' + COLOURS = {'BLACK': '\x1b[30m', 'RED': '\x1b[31m', 'GREEN': '\x1b[32m', + 'YELLOW': '\x1b[33m', 'BLUE': '\x1b[34m', 'MAGENTA': '\x1b[35m', + 'CYAN': '\x1b[36m', 'WHITE': '\x1b[37m'} + + def __init__(self, frac, default_len=10, charset=UTF, colour=None): + if not 0 <= frac <= 1: + warn("clamping frac to range [0, 1]", TqdmWarning, stacklevel=2) + frac = max(0, min(1, frac)) + assert default_len > 0 + self.frac = frac + self.default_len = default_len + self.charset = charset + self.colour = colour + + @property + def colour(self): + return self._colour + + @colour.setter + def colour(self, value): + if not value: + self._colour = None + return + try: + if value.upper() in self.COLOURS: + self._colour = self.COLOURS[value.upper()] + elif value[0] == '#' and len(value) == 7: + self._colour = self.COLOUR_RGB % tuple( + int(i, 16) for i in (value[1:3], value[3:5], value[5:7])) + else: + raise KeyError + except (KeyError, AttributeError): + warn(f"Unknown colour ({value}); valid choices:" + f" [hex (#00ff00), {', '.join(self.COLOURS)}]", TqdmWarning, stacklevel=2) + self._colour = None + + def __format__(self, format_spec): + if format_spec: + _type = format_spec[-1].lower() + try: + charset = {'a': self.ASCII, 'u': self.UTF, 'b': self.BLANK}[_type] + except KeyError: + charset = self.charset + else: + format_spec = format_spec[:-1] + if format_spec: + N_BARS = int(format_spec) + if N_BARS < 0: + N_BARS += self.default_len + else: + N_BARS = self.default_len + else: + charset = self.charset + N_BARS = self.default_len + + nsyms = len(charset) - 1 + bar_length, frac_bar_length = divmod(int(self.frac * N_BARS * nsyms), nsyms) + + res = charset[-1] * bar_length + if bar_length < N_BARS: # whitespace padding + res = res + charset[frac_bar_length] + charset[0] * (N_BARS - bar_length - 1) + return self.colour + res + self.COLOUR_RESET if self.colour else res + + +class EMA: + """ + Exponential moving average: smoothing to give progressively lower + weights to older values. + + Parameters + ---------- + smoothing : float, optional + Smoothing factor in range [0, 1], [default: 0.3]. + Increase to give more weight to recent values. + Ranges from 0 (yields old value) to 1 (yields new value). + """ + def __init__(self, smoothing=0.3): + self.alpha = smoothing + self.last = 0 + self.calls = 0 + + def __call__(self, x=None): + """ + Parameters + ---------- + x : float + New value to include in EMA. + """ + beta = 1 - self.alpha + if x is not None: + self.last = self.alpha * x + beta * self.last + self.calls += 1 + return self.last / (1 - beta ** self.calls) if self.calls else self.last + + +class tqdm(Comparable): + """ + Decorate an iterable object, returning an iterator which acts exactly + like the original iterable, but prints a dynamically updating + progressbar every time a value is requested. + + Parameters + ---------- + iterable : iterable, optional + Iterable to decorate with a progressbar. + Leave blank to manually manage the updates. + desc : str, optional + Prefix for the progressbar. + total : int or float, optional + The number of expected iterations. If unspecified, + len(iterable) is used if possible. If float("inf") or as a last + resort, only basic progress statistics are displayed + (no ETA, no progressbar). + If `gui` is True and this parameter needs subsequent updating, + specify an initial arbitrary large positive number, + e.g. 9e9. + leave : bool, optional + If [default: True], keeps all traces of the progressbar + upon termination of iteration. + If `None`, will leave only if `position` is `0`. + file : `io.TextIOWrapper` or `io.StringIO`, optional + Specifies where to output the progress messages + (default: sys.stderr). Uses `file.write(str)` and `file.flush()` + methods. For encoding, see `write_bytes`. + ncols : int, optional + The width of the entire output message. If specified, + dynamically resizes the progressbar to stay within this bound. + If unspecified, attempts to use environment width. The + fallback is a meter width of 10 and no limit for the counter and + statistics. If 0, will not print any meter (only stats). + mininterval : float, optional + Minimum progress display update interval [default: 0.1] seconds. + maxinterval : float, optional + Maximum progress display update interval [default: 10] seconds. + Automatically adjusts `miniters` to correspond to `mininterval` + after long display update lag. Only works if `dynamic_miniters` + or monitor thread is enabled. + miniters : int or float, optional + Minimum progress display update interval, in iterations. + If 0 and `dynamic_miniters`, will automatically adjust to equal + `mininterval` (more CPU efficient, good for tight loops). + If > 0, will skip display of specified number of iterations. + Tweak this and `mininterval` to get very efficient loops. + If your progress is erratic with both fast and slow iterations + (network, skipping items, etc) you should set miniters=1. + ascii : bool or str, optional + If unspecified or False, use unicode (smooth blocks) to fill + the meter. The fallback is to use ASCII characters " 123456789#". + disable : bool, optional + Whether to disable the entire progressbar wrapper + [default: False]. If set to None, disable on non-TTY. + unit : str, optional + String that will be used to define the unit of each iteration + [default: it]. + unit_scale : bool or int or float, optional + If 1 or True, the number of iterations will be reduced/scaled + automatically and a metric prefix following the + International System of Units standard will be added + (kilo, mega, etc.) [default: False]. If any other non-zero + number, will scale `total` and `n`. + dynamic_ncols : bool, optional + If set, constantly alters `ncols` and `nrows` to the + environment (allowing for window resizes) [default: False]. + smoothing : float, optional + Exponential moving average smoothing factor for speed estimates + (ignored in GUI mode). Ranges from 0 (average speed) to 1 + (current/instantaneous speed) [default: 0.3]. + bar_format : str, optional + Specify a custom bar string formatting. May impact performance. + [default: '{l_bar}{bar}{r_bar}'], where + l_bar='{desc}: {percentage:3.0f}%|' and + r_bar='| {n_fmt}/{total_fmt} [{elapsed}<{remaining}, ' + '{rate_fmt}{postfix}]' + Possible vars: l_bar, bar, r_bar, n, n_fmt, total, total_fmt, + percentage, elapsed, elapsed_s, ncols, nrows, desc, unit, + rate, rate_fmt, rate_noinv, rate_noinv_fmt, + rate_inv, rate_inv_fmt, postfix, unit_divisor, + remaining, remaining_s, eta. + Note that a trailing ": " is automatically removed after {desc} + if the latter is empty. + initial : int or float, optional + The initial counter value. Useful when restarting a progress + bar [default: 0]. If using float, consider specifying `{n:.3f}` + or similar in `bar_format`, or specifying `unit_scale`. + position : int, optional + Specify the line offset to print this bar (starting from 0) + Automatic if unspecified. + Useful to manage multiple bars at once (eg, from threads). + postfix : dict or *, optional + Specify additional stats to display at the end of the bar. + Calls `set_postfix(**postfix)` if possible (dict). + unit_divisor : float, optional + [default: 1000], ignored unless `unit_scale` is True. + write_bytes : bool, optional + Whether to write bytes. If (default: False) will write unicode. + lock_args : tuple, optional + Passed to `refresh` for intermediate output + (initialisation, iterating, and updating). + nrows : int, optional + The screen height. If specified, hides nested bars outside this + bound. If unspecified, attempts to use environment height. + The fallback is 20. + colour : str, optional + Bar colour (e.g. 'green', '#00ff00'). + delay : float, optional + Don't display until [default: 0] seconds have elapsed. + gui : bool, optional + WARNING: internal parameter - do not use. + Use tqdm.gui.tqdm(...) instead. If set, will attempt to use + matplotlib animations for a graphical output [default: False]. + + Returns + ------- + out : decorated iterator. + """ + + monitor_interval = 10 # set to 0 to disable the thread + monitor = None + _instances = WeakSet() + + @staticmethod + def format_sizeof(num, suffix='', divisor=1000): + """ + Formats a number (greater than unity) with SI Order of Magnitude + prefixes. + + Parameters + ---------- + num : float + Number ( >= 1) to format. + suffix : str, optional + Post-postfix [default: '']. + divisor : float, optional + Divisor between prefixes [default: 1000]. + + Returns + ------- + out : str + Number with Order of Magnitude SI unit postfix. + """ + for unit in ['', 'k', 'M', 'G', 'T', 'P', 'E', 'Z']: + if abs(num) < 999.5: + if abs(num) < 99.95: + if abs(num) < 9.995: + return f'{num:1.2f}{unit}{suffix}' + return f'{num:2.1f}{unit}{suffix}' + return f'{num:3.0f}{unit}{suffix}' + num /= divisor + return f'{num:3.1f}Y{suffix}' + + @staticmethod + def format_interval(t): + """ + Formats a number of seconds as a clock time, [H:]MM:SS + + Parameters + ---------- + t : int + Number of seconds. + + Returns + ------- + out : str + [H:]MM:SS + """ + sign = '-' if t < 0 else '' + mins, s = divmod(abs(int(t)), 60) + h, m = divmod(mins, 60) + return f'{sign}{h:d}:{m:02d}:{s:02d}' if h else f'{sign}{m:02d}:{s:02d}' + + @staticmethod + def format_num(n): + """ + Intelligent scientific notation (.3g). + + Parameters + ---------- + n : int or float or Numeric + A Number. + + Returns + ------- + out : str + Formatted number. + """ + f = f'{n:.3g}'.replace('e+0', 'e+').replace('e-0', 'e-') + n = str(n) + return f if len(f) < len(n) else n + + @staticmethod + def status_printer(file): + """ + Manage the printing and in-place updating of a line of characters. + Note that if the string is longer than a line, then in-place + updating may not work (it will print a new line at each refresh). + """ + fp = file + fp_flush = getattr(fp, 'flush', lambda: None) # pragma: no cover + if fp in (sys.stderr, sys.stdout): + getattr(sys.stderr, 'flush', lambda: None)() + getattr(sys.stdout, 'flush', lambda: None)() + + def fp_write(s): + fp.write(str(s)) + fp_flush() + + last_len = [0] + + def print_status(s): + len_s = disp_len(s) + fp_write('\r' + s + (' ' * max(last_len[0] - len_s, 0))) + last_len[0] = len_s + + return print_status + + @staticmethod + def format_meter(n, total, elapsed, ncols=None, prefix='', ascii=False, unit='it', + unit_scale=False, rate=None, bar_format=None, postfix=None, + unit_divisor=1000, initial=0, colour=None, **extra_kwargs): + """ + Return a string-based progress bar given some parameters + + Parameters + ---------- + n : int or float + Number of finished iterations. + total : int or float + The expected total number of iterations. If meaningless (None), + only basic progress statistics are displayed (no ETA). + elapsed : float + Number of seconds passed since start. + ncols : int, optional + The width of the entire output message. If specified, + dynamically resizes `{bar}` to stay within this bound + [default: None]. If `0`, will not print any bar (only stats). + The fallback is `{bar:10}`. + prefix : str, optional + Prefix message (included in total width) [default: '']. + Use as {desc} in bar_format string. + ascii : bool, optional or str, optional + If not set, use unicode (smooth blocks) to fill the meter + [default: False]. The fallback is to use ASCII characters + " 123456789#". + unit : str, optional + The iteration unit [default: 'it']. + unit_scale : bool or int or float, optional + If 1 or True, the number of iterations will be printed with an + appropriate SI metric prefix (k = 10^3, M = 10^6, etc.) + [default: False]. If any other non-zero number, will scale + `total` and `n`. + rate : float, optional + Manual override for iteration rate. + If [default: None], uses n/elapsed. + bar_format : str, optional + Specify a custom bar string formatting. May impact performance. + [default: '{l_bar}{bar}{r_bar}'], where + l_bar='{desc}: {percentage:3.0f}%|' and + r_bar='| {n_fmt}/{total_fmt} [{elapsed}<{remaining}, ' + '{rate_fmt}{postfix}]' + Possible vars: l_bar, bar, r_bar, n, n_fmt, total, total_fmt, + percentage, elapsed, elapsed_s, ncols, nrows, desc, unit, + rate, rate_fmt, rate_noinv, rate_noinv_fmt, + rate_inv, rate_inv_fmt, postfix, unit_divisor, + remaining, remaining_s, eta. + Note that a trailing ": " is automatically removed after {desc} + if the latter is empty. + postfix : *, optional + Similar to `prefix`, but placed at the end + (e.g. for additional stats). + Note: postfix is usually a string (not a dict) for this method, + and will if possible be set to postfix = ', ' + postfix. + However other types are supported (#382). + unit_divisor : float, optional + [default: 1000], ignored unless `unit_scale` is True. + initial : int or float, optional + The initial counter value [default: 0]. + colour : str, optional + Bar colour (e.g. 'green', '#00ff00'). + + Returns + ------- + out : Formatted meter and stats, ready to display. + """ + + # sanity check: total + if total and n >= (total + 0.5): # allow float imprecision (#849) + total = None + + # apply custom scale if necessary + if unit_scale and unit_scale not in (True, 1): + if total: + total *= unit_scale + n *= unit_scale + if rate: + rate *= unit_scale # by default rate = self.avg_dn / self.avg_dt + unit_scale = False + + elapsed_str = tqdm.format_interval(elapsed) + + # if unspecified, attempt to use rate = average speed + # (we allow manual override since predicting time is an arcane art) + if rate is None and elapsed: + rate = (n - initial) / elapsed + inv_rate = 1 / rate if rate else None + format_sizeof = tqdm.format_sizeof + rate_noinv_fmt = ((format_sizeof(rate) if unit_scale else f'{rate:5.2f}') + if rate else '?') + unit + '/s' + rate_inv_fmt = ( + (format_sizeof(inv_rate) if unit_scale else f'{inv_rate:5.2f}') + if inv_rate else '?') + 's/' + unit + rate_fmt = rate_inv_fmt if inv_rate and inv_rate > 1 else rate_noinv_fmt + + if unit_scale: + n_fmt = format_sizeof(n, divisor=unit_divisor) + total_fmt = format_sizeof(total, divisor=unit_divisor) if total is not None else '?' + else: + n_fmt = str(n) + total_fmt = str(total) if total is not None else '?' + + try: + postfix = ', ' + postfix if postfix else '' + except TypeError: + pass + + remaining = (total - n) / rate if rate and total else 0 + remaining_str = tqdm.format_interval(remaining) if rate else '?' + try: + eta_dt = (datetime.now() + timedelta(seconds=remaining) + if rate and total else datetime.fromtimestamp(0, timezone.utc)) + except OverflowError: + eta_dt = datetime.max + + # format the stats displayed to the left and right sides of the bar + if prefix: + # old prefix setup work around + bool_prefix_colon_already = (prefix[-2:] == ": ") + l_bar = prefix if bool_prefix_colon_already else prefix + ": " + else: + l_bar = '' + + r_bar = f'| {n_fmt}/{total_fmt} [{elapsed_str}<{remaining_str}, {rate_fmt}{postfix}]' + + # Custom bar formatting + # Populate a dict with all available progress indicators + format_dict = { + # slight extension of self.format_dict + 'n': n, 'n_fmt': n_fmt, 'total': total, 'total_fmt': total_fmt, + 'elapsed': elapsed_str, 'elapsed_s': elapsed, + 'ncols': ncols, 'desc': prefix or '', 'unit': unit, + 'rate': inv_rate if inv_rate and inv_rate > 1 else rate, + 'rate_fmt': rate_fmt, 'rate_noinv': rate, + 'rate_noinv_fmt': rate_noinv_fmt, 'rate_inv': inv_rate, + 'rate_inv_fmt': rate_inv_fmt, + 'postfix': postfix, 'unit_divisor': unit_divisor, + 'colour': colour, + # plus more useful definitions + 'remaining': remaining_str, 'remaining_s': remaining, + 'l_bar': l_bar, 'r_bar': r_bar, 'eta': eta_dt, + **extra_kwargs} + + # total is known: we can predict some stats + if total: + # fractional and percentage progress + frac = n / total + percentage = frac * 100 + + l_bar += f'{percentage:3.0f}%|' + + if ncols == 0: + return l_bar[:-1] + r_bar[1:] + + format_dict.update(l_bar=l_bar) + if bar_format: + format_dict.update(percentage=percentage) + + # auto-remove colon for empty `{desc}` + if not prefix: + bar_format = bar_format.replace("{desc}: ", '') + else: + bar_format = "{l_bar}{bar}{r_bar}" + + full_bar = FormatReplace() + nobar = bar_format.format(bar=full_bar, **format_dict) + if not full_bar.format_called: + return nobar # no `{bar}`; nothing else to do + + # Formatting progress bar space available for bar's display + full_bar = Bar(frac, + max(1, ncols - disp_len(nobar)) if ncols else 10, + charset=Bar.ASCII if ascii is True else ascii or Bar.UTF, + colour=colour) + if not _is_ascii(full_bar.charset) and _is_ascii(bar_format): + bar_format = str(bar_format) + res = bar_format.format(bar=full_bar, **format_dict) + return disp_trim(res, ncols) if ncols else res + + elif bar_format: + # user-specified bar_format but no total + l_bar += '|' + format_dict.update(l_bar=l_bar, percentage=0) + full_bar = FormatReplace() + nobar = bar_format.format(bar=full_bar, **format_dict) + if not full_bar.format_called: + return nobar + full_bar = Bar(0, + max(1, ncols - disp_len(nobar)) if ncols else 10, + charset=Bar.BLANK, colour=colour) + res = bar_format.format(bar=full_bar, **format_dict) + return disp_trim(res, ncols) if ncols else res + else: + # no total: no progressbar, ETA, just progress stats + return (f'{(prefix + ": ") if prefix else ""}' + f'{n_fmt}{unit} [{elapsed_str}, {rate_fmt}{postfix}]') + + def __new__(cls, *_, **__): + instance = object.__new__(cls) + with cls.get_lock(): # also constructs lock if non-existent + cls._instances.add(instance) + # create monitoring thread + if cls.monitor_interval and (cls.monitor is None + or not cls.monitor.report()): + try: + cls.monitor = TMonitor(cls, cls.monitor_interval) + except Exception as e: # pragma: nocover + warn("tqdm:disabling monitor support" + " (monitor_interval = 0) due to:\n" + str(e), + TqdmMonitorWarning, stacklevel=2) + cls.monitor_interval = 0 + return instance + + @classmethod + def _get_free_pos(cls, instance=None): + """Skips specified instance.""" + positions = {abs(inst.pos) for inst in cls._instances + if inst is not instance and hasattr(inst, "pos")} + return min(set(range(len(positions) + 1)).difference(positions)) + + @classmethod + def _decr_instances(cls, instance): + """ + Remove from list and reposition another unfixed bar + to fill the new gap. + + This means that by default (where all nested bars are unfixed), + order is not maintained but screen flicker/blank space is minimised. + (tqdm<=4.44.1 moved ALL subsequent unfixed bars up.) + """ + with cls._lock: + try: + cls._instances.remove(instance) + except KeyError: + # if not instance.gui: # pragma: no cover + # raise + pass # py2: maybe magically removed already + # else: + if not instance.gui: + last = (instance.nrows or 20) - 1 + # find unfixed (`pos >= 0`) overflow (`pos >= nrows - 1`) + instances = list(filter( + lambda i: hasattr(i, "pos") and last <= i.pos, + cls._instances)) + # set first found to current `pos` + if instances: + inst = min(instances, key=lambda i: i.pos) + inst.clear(nolock=True) + inst.pos = abs(instance.pos) + + @classmethod + def write(cls, s, file=None, end="\n", nolock=False): + """Print a message via tqdm (without overlap with bars).""" + fp = file if file is not None else sys.stdout + with cls.external_write_mode(file=file, nolock=nolock): + # Write the message + fp.write(s) + fp.write(end) + + @classmethod + @contextmanager + def external_write_mode(cls, file=None, nolock=False): + """ + Disable tqdm within context and refresh tqdm when exits. + Useful when writing to standard output stream + """ + fp = file if file is not None else sys.stdout + + try: + if not nolock: + cls.get_lock().acquire() + # Clear all bars + inst_cleared = [] + for inst in getattr(cls, '_instances', []): + # Clear instance if in the target output file + # or if write output + tqdm output are both either + # sys.stdout or sys.stderr (because both are mixed in terminal) + if hasattr(inst, "start_t") and (inst.fp == fp or all( + f in (sys.stdout, sys.stderr) for f in (fp, inst.fp))): + inst.clear(nolock=True) + inst_cleared.append(inst) + yield + # Force refresh display of bars we cleared + for inst in inst_cleared: + inst.refresh(nolock=True) + finally: + if not nolock: + cls._lock.release() + + @classmethod + def set_lock(cls, lock): + """Set the global lock.""" + cls._lock = lock + + @classmethod + def get_lock(cls): + """Get the global lock. Construct it if it does not exist.""" + if not hasattr(cls, '_lock'): + cls._lock = TqdmDefaultWriteLock() + return cls._lock + + @classmethod + def pandas(cls, **tqdm_kwargs): + """ + Registers the current `tqdm` class with + pandas.core. + ( frame.DataFrame + | series.Series + | groupby.(generic.)DataFrameGroupBy + | groupby.(generic.)SeriesGroupBy + ).progress_apply + + A new instance will be created every time `progress_apply` is called, + and each instance will automatically `close()` upon completion. + + Parameters + ---------- + tqdm_kwargs : arguments for the tqdm instance + + Examples + -------- + >>> import pandas as pd + >>> import numpy as np + >>> from tqdm import tqdm + >>> from tqdm.gui import tqdm as tqdm_gui + >>> + >>> df = pd.DataFrame(np.random.randint(0, 100, (100000, 6))) + >>> tqdm.pandas(ncols=50) # can use tqdm_gui, optional kwargs, etc + >>> # Now you can use `progress_apply` instead of `apply` + >>> df.groupby(0).progress_apply(lambda x: x**2) + + References + ---------- + + """ + from warnings import catch_warnings, simplefilter + + from pandas.core.frame import DataFrame + from pandas.core.series import Series + try: + with catch_warnings(): + simplefilter("ignore", category=FutureWarning) + from pandas import Panel + except ImportError: # pandas>=1.2.0 + Panel = None + Rolling, Expanding = None, None + try: # pandas>=1.0.0 + from pandas.core.window.rolling import _Rolling_and_Expanding + except ImportError: + try: # pandas>=0.18.0 + from pandas.core.window import _Rolling_and_Expanding + except ImportError: # pandas>=1.2.0 + try: # pandas>=1.2.0 + from pandas.core.window.expanding import Expanding + from pandas.core.window.rolling import Rolling + _Rolling_and_Expanding = Rolling, Expanding + except ImportError: # pragma: no cover + _Rolling_and_Expanding = None + try: # pandas>=0.25.0 + from pandas.core.groupby.generic import SeriesGroupBy # , NDFrameGroupBy + from pandas.core.groupby.generic import DataFrameGroupBy + except ImportError: # pragma: no cover + try: # pandas>=0.23.0 + from pandas.core.groupby.groupby import DataFrameGroupBy, SeriesGroupBy + except ImportError: + from pandas.core.groupby import DataFrameGroupBy, SeriesGroupBy + try: # pandas>=0.23.0 + from pandas.core.groupby.groupby import GroupBy + except ImportError: # pragma: no cover + from pandas.core.groupby import GroupBy + + try: # pandas>=0.23.0 + from pandas.core.groupby.groupby import PanelGroupBy + except ImportError: + try: + from pandas.core.groupby import PanelGroupBy + except ImportError: # pandas>=0.25.0 + PanelGroupBy = None + + tqdm_kwargs = tqdm_kwargs.copy() + deprecated_t = [tqdm_kwargs.pop('deprecated_t', None)] + + def inner_generator(df_function='apply'): + def inner(df, func, *args, **kwargs): + """ + Parameters + ---------- + df : (DataFrame|Series)[GroupBy] + Data (may be grouped). + func : function + To be applied on the (grouped) data. + **kwargs : optional + Transmitted to `df.apply()`. + """ + + # Precompute total iterations + total = tqdm_kwargs.pop("total", getattr(df, 'ngroups', None)) + if total is None: # not grouped + if df_function == 'applymap': + total = df.size + elif isinstance(df, Series): + total = len(df) + elif (_Rolling_and_Expanding is None or + not isinstance(df, _Rolling_and_Expanding)): + # DataFrame or Panel + axis = kwargs.get('axis', 0) + if axis == 'index': + axis = 0 + elif axis == 'columns': + axis = 1 + # when axis=0, total is shape[axis1] + total = df.size // df.shape[axis] + + # Init bar + if deprecated_t[0] is not None: + t = deprecated_t[0] + deprecated_t[0] = None + else: + t = cls(total=total, **tqdm_kwargs) + + if len(args) > 0: + # *args intentionally not supported (see #244, #299) + TqdmDeprecationWarning( + "Except func, normal arguments are intentionally" + + " not supported by" + + " `(DataFrame|Series|GroupBy).progress_apply`." + + " Use keyword arguments instead.", + fp_write=getattr(t.fp, 'write', sys.stderr.write)) + + try: # pandas>=1.3.0,<3.0 + from pandas.core.common import is_builtin_func + except ImportError: # pandas<1.3.0 + is_builtin_func = getattr(df, '_is_builtin_func', lambda f: f) + try: + func = is_builtin_func(func) + except TypeError: + pass + + # Define bar updating wrapper + def wrapper(*args, **kwargs): + # update tbar correctly + # it seems `pandas apply` calls `func` twice + # on the first column/row to decide whether it can + # take a fast or slow code path; so stop when t.total==t.n + t.update(n=1 if not t.total or t.n < t.total else 0) + return func(*args, **kwargs) + + # Apply the provided function (in **kwargs) + # on the df using our wrapper (which provides bar updating) + try: + return getattr(df, df_function)(wrapper, **kwargs) + finally: + t.close() + + return inner + + # Monkeypatch pandas to provide easy methods + # Enable custom tqdm progress in pandas! + Series.progress_apply = inner_generator() + SeriesGroupBy.progress_apply = inner_generator() + Series.progress_map = inner_generator('map') + SeriesGroupBy.progress_map = inner_generator('map') + + DataFrame.progress_apply = inner_generator() + DataFrameGroupBy.progress_apply = inner_generator() + DataFrame.progress_applymap = inner_generator('applymap') + DataFrame.progress_map = inner_generator('map') + DataFrameGroupBy.progress_map = inner_generator('map') + + if Panel is not None: + Panel.progress_apply = inner_generator() + if PanelGroupBy is not None: + PanelGroupBy.progress_apply = inner_generator() + + GroupBy.progress_apply = inner_generator() + GroupBy.progress_aggregate = inner_generator('aggregate') + GroupBy.progress_transform = inner_generator('transform') + + if Rolling is not None and Expanding is not None: + Rolling.progress_apply = inner_generator() + Expanding.progress_apply = inner_generator() + elif _Rolling_and_Expanding is not None: + _Rolling_and_Expanding.progress_apply = inner_generator() + + # override defaults via env vars + @envwrap("TQDM_", is_method=True, types={'total': float, 'ncols': int, 'miniters': float, + 'position': int, 'nrows': int}) + def __init__(self, iterable=None, desc=None, total=None, leave=True, file=None, + ncols=None, mininterval=0.1, maxinterval=10.0, miniters=None, + ascii=None, disable=False, unit='it', unit_scale=False, + dynamic_ncols=False, smoothing=0.3, bar_format=None, initial=0, + position=None, postfix=None, unit_divisor=1000, write_bytes=False, + lock_args=None, nrows=None, colour=None, delay=0.0, gui=False, + **kwargs): + """see tqdm.tqdm for arguments""" + if file is None: + file = sys.stderr + + if write_bytes: + # Despite coercing unicode into bytes, py2 sys.std* streams + # should have bytes written to them. + file = SimpleTextIOWrapper( + file, encoding=getattr(file, 'encoding', None) or 'utf-8') + + file = DisableOnWriteError(file, tqdm_instance=self) + + if disable is None and hasattr(file, "isatty") and not file.isatty(): + disable = True + + if total is None and iterable is not None: + try: + total = len(iterable) + except (TypeError, AttributeError): + total = None + if total == float("inf"): + # Infinite iterations, behave same as unknown + total = None + + if disable: + self.iterable = iterable + self.disable = disable + with self._lock: + self.pos = self._get_free_pos(self) + self._instances.remove(self) + self.n = initial + self.total = total + self.leave = leave + return + + if kwargs: + self.disable = True + with self._lock: + self.pos = self._get_free_pos(self) + self._instances.remove(self) + raise ( + TqdmDeprecationWarning( + "`nested` is deprecated and automated.\n" + "Use `position` instead for manual control.\n", + fp_write=getattr(file, 'write', sys.stderr.write)) + if "nested" in kwargs else + TqdmKeyError("Unknown argument(s): " + str(kwargs))) + + # Preprocess the arguments + if ( + (ncols is None or nrows is None) and (file in (sys.stderr, sys.stdout)) + ) or dynamic_ncols: # pragma: no cover + if dynamic_ncols: + dynamic_ncols = _screen_shape_wrapper() + if dynamic_ncols: + ncols, nrows = dynamic_ncols(file) + else: + _dynamic_ncols = _screen_shape_wrapper() + if _dynamic_ncols: + _ncols, _nrows = _dynamic_ncols(file) + if ncols is None: + ncols = _ncols + if nrows is None: + nrows = _nrows + + if miniters is None: + miniters = 0 + dynamic_miniters = True + else: + dynamic_miniters = False + + if mininterval is None: + mininterval = 0 + + if maxinterval is None: + maxinterval = 0 + + if ascii is None: + ascii = not _supports_unicode(file) + + if bar_format and ascii is not True and not _is_ascii(ascii): + # Convert bar format into unicode since terminal uses unicode + bar_format = str(bar_format) + + if smoothing is None: + smoothing = 0 + + # Store the arguments + self.iterable = iterable + self.desc = desc or '' + self.total = total + self.leave = leave + self.fp = file + self.ncols = ncols + self.nrows = nrows + self.mininterval = mininterval + self.maxinterval = maxinterval + self.miniters = miniters + self.dynamic_miniters = dynamic_miniters + self.ascii = ascii + self.disable = disable + self.unit = unit + self.unit_scale = unit_scale + self.unit_divisor = unit_divisor + self.initial = initial + self.lock_args = lock_args + self.delay = delay + self.gui = gui + self.dynamic_ncols = dynamic_ncols + self.smoothing = smoothing + self._ema_dn = EMA(smoothing) + self._ema_dt = EMA(smoothing) + self._ema_miniters = EMA(smoothing) + self.bar_format = bar_format + self.postfix = None + self.colour = colour + self._time = time + if postfix: + try: + self.set_postfix(refresh=False, **postfix) + except TypeError: + self.postfix = postfix + + # Init the iterations counters + self.last_print_n = initial + self.n = initial + + # if nested, at initial sp() call we replace '\r' by '\n' to + # not overwrite the outer progress bar + with self._lock: + # mark fixed positions as negative + self.pos = self._get_free_pos(self) if position is None else -position + + if not gui: + # Initialize the screen printer + self.sp = self.status_printer(self.fp) + if delay <= 0: + self.refresh(lock_args=self.lock_args) + + # Init the time counter + self.last_print_t = self._time() + # NB: Avoid race conditions by setting start_t at the very end of init + self.start_t = self.last_print_t + + def __bool__(self): + if self.total is not None: + return self.total > 0 + if self.iterable is None: + raise TypeError('bool() undefined when iterable == total == None') + return bool(self.iterable) + + def __len__(self): + return ( + self.total if self.iterable is None + else self.iterable.shape[0] if hasattr(self.iterable, "shape") + else len(self.iterable) if hasattr(self.iterable, "__len__") + else self.iterable.__length_hint__() if hasattr(self.iterable, "__length_hint__") + else getattr(self, "total", None)) + + def __reversed__(self): + try: + orig = self.iterable + except AttributeError: + raise TypeError("'tqdm' object is not reversible") + else: + self.iterable = reversed(self.iterable) + return self.__iter__() + finally: + self.iterable = orig + + def __contains__(self, item): + contains = getattr(self.iterable, '__contains__', None) + return contains(item) if contains is not None else item in self.__iter__() + + def __enter__(self): + return self + + def __exit__(self, exc_type, exc_value, traceback): + try: + self.close() + except AttributeError: + # maybe eager thread cleanup upon external error + if (exc_type, exc_value, traceback) == (None, None, None): + raise + warn("AttributeError ignored", TqdmWarning, stacklevel=2) + + def __del__(self): + self.close() + + def __str__(self): + return self.format_meter(**self.format_dict) + + @property + def _comparable(self): + return abs(getattr(self, "pos", 1 << 31)) + + def __hash__(self): + return id(self) + + def __iter__(self): + """Backward-compatibility to use: for x in tqdm(iterable)""" + + # Inlining instance variables as locals (speed optimisation) + iterable = self.iterable + + # If the bar is disabled, then just walk the iterable + # (note: keep this check outside the loop for performance) + if self.disable: + for obj in iterable: + yield obj + return + + mininterval = self.mininterval + last_print_t = self.last_print_t + last_print_n = self.last_print_n + min_start_t = self.start_t + self.delay + n = self.n + time = self._time + + try: + for obj in iterable: + yield obj + # Update and possibly print the progressbar. + # Note: does not call self.update(1) for speed optimisation. + n += 1 + + if n - last_print_n >= self.miniters: + cur_t = time() + dt = cur_t - last_print_t + if dt >= mininterval and cur_t >= min_start_t: + self.update(n - last_print_n) + last_print_n = self.last_print_n + last_print_t = self.last_print_t + finally: + self.n = n + self.close() + + def update(self, n=1): + """ + Manually update the progress bar, useful for streams + such as reading files. + E.g.: + >>> t = tqdm(total=filesize) # Initialise + >>> for current_buffer in stream: + ... ... + ... t.update(len(current_buffer)) + >>> t.close() + The last line is highly recommended, but possibly not necessary if + `t.update()` will be called in such a way that `filesize` will be + exactly reached and printed. + + Parameters + ---------- + n : int or float, optional + Increment to add to the internal counter of iterations + [default: 1]. If using float, consider specifying `{n:.3f}` + or similar in `bar_format`, or specifying `unit_scale`. + + Returns + ------- + out : bool or None + True if a `display()` was triggered. + """ + if self.disable: + return + + if n < 0: + self.last_print_n += n # for auto-refresh logic to work + self.n += n + + # check counter first to reduce calls to time() + if self.n - self.last_print_n >= self.miniters: + cur_t = self._time() + dt = cur_t - self.last_print_t + if dt >= self.mininterval and cur_t >= self.start_t + self.delay: + cur_t = self._time() + dn = self.n - self.last_print_n # >= n + if self.smoothing and dt and dn: + # EMA (not just overall average) + self._ema_dn(dn) + self._ema_dt(dt) + self.refresh(lock_args=self.lock_args) + if self.dynamic_miniters: + # If no `miniters` was specified, adjust automatically to the + # maximum iteration rate seen so far between two prints. + # e.g.: After running `tqdm.update(5)`, subsequent + # calls to `tqdm.update()` will only cause an update after + # at least 5 more iterations. + if self.maxinterval and dt >= self.maxinterval: + self.miniters = dn * (self.mininterval or self.maxinterval) / dt + elif self.smoothing: + # EMA miniters update + self.miniters = self._ema_miniters( + dn * (self.mininterval / dt if self.mininterval and dt + else 1)) + else: + # max iters between two prints + self.miniters = max(self.miniters, dn) + + # Store old values for next call + self.last_print_n = self.n + self.last_print_t = cur_t + return True + + def close(self): + """Cleanup and (if leave=False) close the progressbar.""" + if self.disable: + return + + # Prevent multiple closures + self.disable = True + + # decrement instance pos and remove from internal set + pos = abs(self.pos) + self._decr_instances(self) + + if self.last_print_t < self.start_t + self.delay: + # haven't ever displayed; nothing to clear + return + + # GUI mode + if getattr(self, 'sp', None) is None: + return + + # annoyingly, _supports_unicode isn't good enough + def fp_write(s): + self.fp.write(str(s)) + + try: + fp_write('') + except ValueError as e: + if 'closed' in str(e): + return + raise # pragma: no cover + + leave = pos == 0 if self.leave is None else self.leave + + with self._lock: + if leave: + # stats for overall rate (no weighted average) + self._ema_dt = lambda: None + self.display(pos=0) + fp_write('\n') + else: + # clear previous display + if self.display(msg='', pos=pos) and not pos: + fp_write('\r') + + def clear(self, nolock=False): + """Clear current bar display.""" + if self.disable: + return + + if not nolock: + self._lock.acquire() + pos = abs(self.pos) + if pos < (self.nrows or 20): + self.moveto(pos) + self.sp('') + self.fp.write('\r') # place cursor back at the beginning of line + self.moveto(-pos) + if not nolock: + self._lock.release() + + def refresh(self, nolock=False, lock_args=None): + """ + Force refresh the display of this bar. + + Parameters + ---------- + nolock : bool, optional + If `True`, does not lock. + If [default: `False`]: calls `acquire()` on internal lock. + lock_args : tuple, optional + Passed to internal lock's `acquire()`. + If specified, will only `display()` if `acquire()` returns `True`. + """ + if self.disable: + return + + if not nolock: + if lock_args: + if not self._lock.acquire(*lock_args): + return False + else: + self._lock.acquire() + self.display() + if not nolock: + self._lock.release() + return True + + def unpause(self): + """Restart tqdm timer from last print time.""" + if self.disable: + return + cur_t = self._time() + self.start_t += cur_t - self.last_print_t + self.last_print_t = cur_t + + def reset(self, total=None): + """ + Resets to 0 iterations for repeated use. + + Consider combining with `leave=True`. + + Parameters + ---------- + total : int or float, optional. Total to use for the new bar. + """ + self.n = 0 + if total is not None: + self.total = total + if self.disable: + return + self.last_print_n = 0 + self.last_print_t = self.start_t = self._time() + self._ema_dn = EMA(self.smoothing) + self._ema_dt = EMA(self.smoothing) + self._ema_miniters = EMA(self.smoothing) + self.refresh() + + def set_description(self, desc=None, refresh=True): + """ + Set/modify description of the progress bar. + + Parameters + ---------- + desc : str, optional + refresh : bool, optional + Forces refresh [default: True]. + """ + self.desc = desc + ': ' if desc else '' + if refresh: + self.refresh() + + def set_description_str(self, desc=None, refresh=True): + """Set/modify description without ': ' appended.""" + self.desc = desc or '' + if refresh: + self.refresh() + + def set_postfix(self, ordered_dict=None, refresh=True, **kwargs): + """ + Set/modify postfix (additional stats) + with automatic formatting based on datatype. + + Parameters + ---------- + ordered_dict : dict or OrderedDict, optional + refresh : bool, optional + Forces refresh [default: True]. + kwargs : dict, optional + """ + # Sort in alphabetical order to be more deterministic + postfix = OrderedDict([] if ordered_dict is None else ordered_dict) + for key in sorted(kwargs.keys()): + postfix[key] = kwargs[key] + # Preprocess stats according to datatype + for key in postfix.keys(): + # Number: limit the length of the string + if isinstance(postfix[key], Number): + postfix[key] = self.format_num(postfix[key]) + # Else for any other type, try to get the string conversion + elif not isinstance(postfix[key], str): + postfix[key] = str(postfix[key]) + # Else if it's a string, don't need to preprocess anything + # Stitch together to get the final postfix + self.postfix = ', '.join(key + '=' + postfix[key].strip() + for key in postfix.keys()) + if refresh: + self.refresh() + + def set_postfix_str(self, s='', refresh=True): + """ + Postfix without dictionary expansion, similar to prefix handling. + """ + self.postfix = str(s) + if refresh: + self.refresh() + + def moveto(self, n): + # TODO: private method + self.fp.write('\n' * n + _term_move_up() * -n) + getattr(self.fp, 'flush', lambda: None)() + + @property + def format_dict(self): + """Public API for read-only member access.""" + if self.disable and not hasattr(self, 'unit'): + return defaultdict(lambda: None, { + 'n': self.n, 'total': self.total, 'elapsed': 0, 'unit': 'it'}) + if self.dynamic_ncols: + self.ncols, self.nrows = self.dynamic_ncols(self.fp) + return { + 'n': self.n, 'total': self.total, + 'elapsed': self._time() - self.start_t if hasattr(self, 'start_t') else 0, + 'ncols': self.ncols, 'nrows': self.nrows, 'prefix': self.desc, + 'ascii': self.ascii, 'unit': self.unit, 'unit_scale': self.unit_scale, + 'rate': self._ema_dn() / self._ema_dt() if self._ema_dt() else None, + 'bar_format': self.bar_format, 'postfix': self.postfix, + 'unit_divisor': self.unit_divisor, 'initial': self.initial, + 'colour': self.colour} + + def display(self, msg=None, pos=None): + """ + Use `self.sp` to display `msg` in the specified `pos`. + + Consider overloading this function when inheriting to use e.g.: + `self.some_frontend(**self.format_dict)` instead of `self.sp`. + + Parameters + ---------- + msg : str, optional. What to display (default: `repr(self)`). + pos : int, optional. Position to `moveto` + (default: `abs(self.pos)`). + """ + if pos is None: + pos = abs(self.pos) + + nrows = self.nrows or 20 + if pos >= nrows - 1: + if pos >= nrows: + return False + if msg or msg is None: # override at `nrows - 1` + msg = " ... (more hidden) ..." + + if not hasattr(self, "sp"): + raise TqdmDeprecationWarning( + "Please use `tqdm.gui.tqdm(...)`" + " instead of `tqdm(..., gui=True)`\n", + fp_write=getattr(self.fp, 'write', sys.stderr.write)) + + if pos: + self.moveto(pos) + self.sp(self.__str__() if msg is None else msg) + if pos: + self.moveto(-pos) + return True + + @classmethod + @contextmanager + def wrapattr(cls, stream, method, total=None, bytes=True, **tqdm_kwargs): + """ + stream : file-like object. + method : str, "read" or "write". The result of `read()` and + the first argument of `write()` should have a `len()`. + + >>> with tqdm.wrapattr(file_obj, "read", total=file_obj.size) as fobj: + ... while True: + ... chunk = fobj.read(chunk_size) + ... if not chunk: + ... break + """ + with cls(total=total, **tqdm_kwargs) as t: + if bytes: + t.unit = "B" + t.unit_scale = True + t.unit_divisor = 1024 + yield CallbackIOWrapper(t.update, stream, method) + + +def trange(*args, **kwargs): + """Shortcut for tqdm(range(*args), **kwargs).""" + return tqdm(range(*args), **kwargs) diff --git a/miniconda3/pkgs/tqdm-4.67.3-py313h7040dfc_1/lib/python3.13/site-packages/tqdm/tk.py b/miniconda3/pkgs/tqdm-4.67.3-py313h7040dfc_1/lib/python3.13/site-packages/tqdm/tk.py new file mode 100644 index 0000000000000000000000000000000000000000..788303c8687e007338ce816bf9afeec8581f0188 --- /dev/null +++ b/miniconda3/pkgs/tqdm-4.67.3-py313h7040dfc_1/lib/python3.13/site-packages/tqdm/tk.py @@ -0,0 +1,196 @@ +""" +Tkinter GUI progressbar decorator for iterators. + +Usage: +>>> from tqdm.tk import trange, tqdm +>>> for i in trange(10): +... ... +""" +import re +import sys +import tkinter +import tkinter.ttk as ttk +from warnings import warn + +from .std import TqdmExperimentalWarning, TqdmWarning +from .std import tqdm as std_tqdm + +__author__ = {"github.com/": ["richardsheridan", "casperdcl"]} +__all__ = ['tqdm_tk', 'ttkrange', 'tqdm', 'trange'] + + +class tqdm_tk(std_tqdm): # pragma: no cover + """ + Experimental Tkinter GUI version of tqdm! + + Note: Window interactivity suffers if `tqdm_tk` is not running within + a Tkinter mainloop and values are generated infrequently. In this case, + consider calling `tqdm_tk.refresh()` frequently in the Tk thread. + """ + + # TODO: @classmethod: write()? + + def __init__(self, *args, **kwargs): + """ + This class accepts the following parameters *in addition* to + the parameters accepted by `tqdm`. + + Parameters + ---------- + grab : bool, optional + Grab the input across all windows of the process. + tk_parent : `tkinter.Wm`, optional + Parent Tk window. + cancel_callback : Callable, optional + Create a cancel button and set `cancel_callback` to be called + when the cancel or window close button is clicked. + """ + kwargs = kwargs.copy() + kwargs['gui'] = True + # convert disable = None to False + kwargs['disable'] = bool(kwargs.get('disable', False)) + self._warn_leave = 'leave' in kwargs + grab = kwargs.pop('grab', False) + tk_parent = kwargs.pop('tk_parent', None) + self._cancel_callback = kwargs.pop('cancel_callback', None) + super().__init__(*args, **kwargs) + + if self.disable: + return + + if tk_parent is None: # Discover parent widget + try: + tk_parent = tkinter._default_root + except AttributeError: + raise AttributeError( + "`tk_parent` required when using `tkinter.NoDefaultRoot()`") + if tk_parent is None: # use new default root window as display + self._tk_window = tkinter.Tk() + else: # some other windows already exist + self._tk_window = tkinter.Toplevel() + else: + self._tk_window = tkinter.Toplevel(tk_parent) + + warn("GUI is experimental/alpha", TqdmExperimentalWarning, stacklevel=2) + self._tk_dispatching = self._tk_dispatching_helper() + + self._tk_window.protocol("WM_DELETE_WINDOW", self.cancel) + self._tk_window.wm_title(self.desc) + self._tk_window.wm_attributes("-topmost", 1) + self._tk_window.after(0, lambda: self._tk_window.wm_attributes("-topmost", 0)) + self._tk_n_var = tkinter.DoubleVar(self._tk_window, value=0) + self._tk_text_var = tkinter.StringVar(self._tk_window) + pbar_frame = ttk.Frame(self._tk_window, padding=5) + pbar_frame.pack() + _tk_label = ttk.Label(pbar_frame, textvariable=self._tk_text_var, + wraplength=600, anchor="center", justify="center") + _tk_label.pack() + self._tk_pbar = ttk.Progressbar( + pbar_frame, variable=self._tk_n_var, length=450) + if self.total is not None: + self._tk_pbar.configure(maximum=self.total) + else: + self._tk_pbar.configure(mode="indeterminate") + self._tk_pbar.pack() + if self._cancel_callback is not None: + _tk_button = ttk.Button(pbar_frame, text="Cancel", command=self.cancel) + _tk_button.pack() + if grab: + self._tk_window.grab_set() + + def close(self): + if self.disable: + return + + self.disable = True + + with self.get_lock(): + self._instances.remove(self) + + def _close(): + self._tk_window.after('idle', self._tk_window.destroy) + if not self._tk_dispatching: + self._tk_window.update() + + self._tk_window.protocol("WM_DELETE_WINDOW", _close) + + # if leave is set but we are self-dispatching, the left window is + # totally unresponsive unless the user manually dispatches + if not self.leave: + _close() + elif not self._tk_dispatching: + if self._warn_leave: + warn("leave flag ignored if not in tkinter mainloop", + TqdmWarning, stacklevel=2) + _close() + + def clear(self, *_, **__): + pass + + def display(self, *_, **__): + self._tk_n_var.set(self.n) + d = self.format_dict + # remove {bar} + d['bar_format'] = (d['bar_format'] or "{l_bar}{r_bar}").replace( + "{bar}", "") + msg = self.format_meter(**d) + if '' in msg: + msg = "".join(re.split(r'\|?\|?', msg, maxsplit=1)) + self._tk_text_var.set(msg) + if not self._tk_dispatching: + self._tk_window.update() + + def set_description(self, desc=None, refresh=True): + self.set_description_str(desc, refresh) + + def set_description_str(self, desc=None, refresh=True): + self.desc = desc + if not self.disable: + self._tk_window.wm_title(desc) + if refresh and not self._tk_dispatching: + self._tk_window.update() + + def cancel(self): + """ + `cancel_callback()` followed by `close()` + when close/cancel buttons clicked. + """ + if self._cancel_callback is not None: + self._cancel_callback() + self.close() + + def reset(self, total=None): + """ + Resets to 0 iterations for repeated use. + + Parameters + ---------- + total : int or float, optional. Total to use for the new bar. + """ + if hasattr(self, '_tk_pbar'): + if total is None: + self._tk_pbar.configure(maximum=100, mode="indeterminate") + else: + self._tk_pbar.configure(maximum=total, mode="determinate") + super().reset(total=total) + + @staticmethod + def _tk_dispatching_helper(): + """determine if Tkinter mainloop is dispatching events""" + codes = {tkinter.mainloop.__code__, tkinter.Misc.mainloop.__code__} + for frame in sys._current_frames().values(): + while frame: + if frame.f_code in codes: + return True + frame = frame.f_back + return False + + +def ttkrange(*args, **kwargs): + """Shortcut for `tqdm.tk.tqdm(range(*args), **kwargs)`.""" + return tqdm_tk(range(*args), **kwargs) + + +# Aliases +tqdm = tqdm_tk +trange = ttkrange diff --git a/miniconda3/pkgs/tqdm-4.67.3-py313h7040dfc_1/lib/python3.13/site-packages/tqdm/tqdm.1 b/miniconda3/pkgs/tqdm-4.67.3-py313h7040dfc_1/lib/python3.13/site-packages/tqdm/tqdm.1 new file mode 100644 index 0000000000000000000000000000000000000000..fe29b8a7d503aaada0305707c934086997da2d29 --- /dev/null +++ b/miniconda3/pkgs/tqdm-4.67.3-py313h7040dfc_1/lib/python3.13/site-packages/tqdm/tqdm.1 @@ -0,0 +1,243 @@ +.\" Automatically generated by Pandoc 3.8.3 +.\" +.TH "TQDM" "1" "2015\-2026" "tqdm User Manuals" +.SH NAME +tqdm \- fast, extensible progress bar for Python and CLI +.SH SYNOPSIS +tqdm [\f[I]options\f[R]] +.SH DESCRIPTION +See \c +.UR https://github.com/tqdm/tqdm +.UE \c +\&. +Can be used as a pipe: +.IP +.EX +$ \f[I]# count lines of code\f[R] +$ cat *.py \f[B]|\f[R] tqdm \f[B]|\f[R] wc \-l +327it [00:00, 981773.38it/s] +327 + +$ \f[I]# find all files\f[R] +$ find . \-name \(dq*.py\(dq \f[B]|\f[R] tqdm \f[B]|\f[R] wc \-l +432it [00:00, 833842.30it/s] +432 + +\f[I]# ... and more info\f[R] +$ find . \-name \(aq*.py\(aq \-exec wc \-l \(rs{} \(rs; \(rs + \f[B]|\f[R] tqdm \-\-total 432 \-\-unit files \-\-desc counting \(rs + \f[B]|\f[R] awk \(aq{ sum += $1 }; END { print sum }\(aq +counting: 100%\f[B]|\f[R]ā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆ\f[B]|\f[R] 432/432 [00:00<00:00, 794361.83files/s] +131998 +.EE +.SH OPTIONS +.TP +\-h, \-\-help +Print this help and exit. +.TP +\-v, \-\-version +Print version and exit. +.TP +\-\-desc=\f[I]desc\f[R] +str, optional. +Prefix for the progressbar. +.TP +\-\-total=\f[I]total\f[R] +int or float, optional. +The number of expected iterations. +If unspecified, len(iterable) is used if possible. +If float(\(lqinf\(rq) or as a last resort, only basic progress +statistics are displayed (no ETA, no progressbar). +If \f[CR]gui\f[R] is True and this parameter needs subsequent updating, +specify an initial arbitrary large positive number, e.g.\ 9e9. +.TP +\-\-leave +bool, optional. +If [default: True], keeps all traces of the progressbar upon termination +of iteration. +If \f[CR]None\f[R], will leave only if \f[CR]position\f[R] is +\f[CR]0\f[R]. +.TP +\-\-ncols=\f[I]ncols\f[R] +int, optional. +The width of the entire output message. +If specified, dynamically resizes the progressbar to stay within this +bound. +If unspecified, attempts to use environment width. +The fallback is a meter width of 10 and no limit for the counter and +statistics. +If 0, will not print any meter (only stats). +.TP +\-\-mininterval=\f[I]mininterval\f[R] +float, optional. +Minimum progress display update interval [default: 0.1] seconds. +.TP +\-\-maxinterval=\f[I]maxinterval\f[R] +float, optional. +Maximum progress display update interval [default: 10] seconds. +Automatically adjusts \f[CR]miniters\f[R] to correspond to +\f[CR]mininterval\f[R] after long display update lag. +Only works if \f[CR]dynamic_miniters\f[R] or monitor thread is enabled. +.TP +\-\-miniters=\f[I]miniters\f[R] +int or float, optional. +Minimum progress display update interval, in iterations. +If 0 and \f[CR]dynamic_miniters\f[R], will automatically adjust to equal +\f[CR]mininterval\f[R] (more CPU efficient, good for tight loops). +If > 0, will skip display of specified number of iterations. +Tweak this and \f[CR]mininterval\f[R] to get very efficient loops. +If your progress is erratic with both fast and slow iterations (network, +skipping items, etc) you should set miniters=1. +.TP +\-\-ascii=\f[I]ascii\f[R] +bool or str, optional. +If unspecified or False, use unicode (smooth blocks) to fill the meter. +The fallback is to use ASCII characters \(rq 123456789#\(lq. +.TP +\-\-disable +bool, optional. +Whether to disable the entire progressbar wrapper [default: False]. +If set to None, disable on non\-TTY. +.TP +\-\-unit=\f[I]unit\f[R] +str, optional. +String that will be used to define the unit of each iteration [default: +it]. +.TP +\-\-unit\-scale=\f[I]unit_scale\f[R] +bool or int or float, optional. +If 1 or True, the number of iterations will be reduced/scaled +automatically and a metric prefix following the International System of +Units standard will be added (kilo, mega, etc.) +[default: False]. +If any other non\-zero number, will scale \f[CR]total\f[R] and +\f[CR]n\f[R]. +.TP +\-\-dynamic\-ncols +bool, optional. +If set, constantly alters \f[CR]ncols\f[R] and \f[CR]nrows\f[R] to the +environment (allowing for window resizes) [default: False]. +.TP +\-\-smoothing=\f[I]smoothing\f[R] +float, optional. +Exponential moving average smoothing factor for speed estimates (ignored +in GUI mode). +Ranges from 0 (average speed) to 1 (current/instantaneous speed) +[default: 0.3]. +.TP +\-\-bar\-format=\f[I]bar_format\f[R] +str, optional. +Specify a custom bar string formatting. +May impact performance. +[default: `{l_bar}{bar}{r_bar}'], where l_bar=`{desc}: +{percentage:3.0f}%|' and r_bar=`| {n_fmt}/{total_fmt} +[{elapsed}<{remaining}, \(cq \(cq{rate_fmt}{postfix}]' Possible vars: +l_bar, bar, r_bar, n, n_fmt, total, total_fmt, percentage, elapsed, +elapsed_s, ncols, nrows, desc, unit, rate, rate_fmt, rate_noinv, +rate_noinv_fmt, rate_inv, rate_inv_fmt, postfix, unit_divisor, +remaining, remaining_s, eta. +Note that a trailing \(lq:\(rq is automatically removed after {desc} if +the latter is empty. +.TP +\-\-initial=\f[I]initial\f[R] +int or float, optional. +The initial counter value. +Useful when restarting a progress bar [default: 0]. +If using float, consider specifying \f[CR]{n:.3f}\f[R] or similar in +\f[CR]bar_format\f[R], or specifying \f[CR]unit_scale\f[R]. +.TP +\-\-position=\f[I]position\f[R] +int, optional. +Specify the line offset to print this bar (starting from 0) Automatic if +unspecified. +Useful to manage multiple bars at once (eg, from threads). +.TP +\-\-postfix=\f[I]postfix\f[R] +dict or *, optional. +Specify additional stats to display at the end of the bar. +Calls \f[CR]set_postfix(**postfix)\f[R] if possible (dict). +.TP +\-\-unit\-divisor=\f[I]unit_divisor\f[R] +float, optional. +[default: 1000], ignored unless \f[CR]unit_scale\f[R] is True. +.TP +\-\-write\-bytes +bool, optional. +Whether to write bytes. +If (default: False) will write unicode. +.TP +\-\-lock\-args=\f[I]lock_args\f[R] +tuple, optional. +Passed to \f[CR]refresh\f[R] for intermediate output (initialisation, +iterating, and updating). +.TP +\-\-nrows=\f[I]nrows\f[R] +int, optional. +The screen height. +If specified, hides nested bars outside this bound. +If unspecified, attempts to use environment height. +The fallback is 20. +.TP +\-\-colour=\f[I]colour\f[R] +str, optional. +Bar colour (e.g.\ `green', `#00ff00'). +.TP +\-\-delay=\f[I]delay\f[R] +float, optional. +Don\(cqt display until [default: 0] seconds have elapsed. +.TP +\-\-delim=\f[I]delim\f[R] +chr, optional. +Delimiting character [default: `\(rsn']. +Use `\(rs0' for null. +N.B.: on Windows systems, Python converts `\(rsn' to `\(rsr\(rsn'. +.TP +\-\-buf\-size=\f[I]buf_size\f[R] +int, optional. +String buffer size in bytes [default: 256] used when \f[CR]delim\f[R] is +specified. +.TP +\-\-bytes +bool, optional. +If true, will count bytes, ignore \f[CR]delim\f[R], and default +\f[CR]unit_scale\f[R] to True, \f[CR]unit_divisor\f[R] to 1024, and +\f[CR]unit\f[R] to `B'. +.TP +\-\-tee +bool, optional. +If true, passes \f[CR]stdin\f[R] to both \f[CR]stderr\f[R] and +\f[CR]stdout\f[R]. +.TP +\-\-update +bool, optional. +If true, will treat input as newly elapsed iterations, i.e.\ numbers to +pass to \f[CR]update()\f[R]. +Note that this is slow (\(ti2e5 it/s) since every input must be decoded +as a number. +.TP +\-\-update\-to +bool, optional. +If true, will treat input as total elapsed iterations, i.e.\ numbers to +assign to \f[CR]self.n\f[R]. +Note that this is slow (\(ti2e5 it/s) since every input must be decoded +as a number. +.TP +\-\-null +bool, optional. +If true, will discard input (no stdout). +.TP +\-\-manpath=\f[I]manpath\f[R] +str, optional. +Directory in which to install tqdm man pages. +.TP +\-\-comppath=\f[I]comppath\f[R] +str, optional. +Directory in which to place tqdm completion. +.TP +\-\-log=\f[I]log\f[R] +str, optional. +CRITICAL|FATAL|ERROR|WARN(ING)|[default: `INFO']|DEBUG|NOTSET. +.SH AUTHORS +tqdm developers \c +.UR https://github.com/tqdm +.UE \c. diff --git a/miniconda3/pkgs/tqdm-4.67.3-py313h7040dfc_1/lib/python3.13/site-packages/tqdm/utils.py b/miniconda3/pkgs/tqdm-4.67.3-py313h7040dfc_1/lib/python3.13/site-packages/tqdm/utils.py new file mode 100644 index 0000000000000000000000000000000000000000..ab454de7c2a7f6c8e47dd9f61e5d288351bd143b --- /dev/null +++ b/miniconda3/pkgs/tqdm-4.67.3-py313h7040dfc_1/lib/python3.13/site-packages/tqdm/utils.py @@ -0,0 +1,399 @@ +""" +General helpers required for `tqdm.std`. +""" +import os +import re +import sys +from functools import partial, partialmethod, wraps +from inspect import signature +# TODO consider using wcswidth third-party package for 0-width characters +from unicodedata import east_asian_width +from warnings import warn +from weakref import proxy + +_range, _unich, _unicode, _basestring = range, chr, str, str +CUR_OS = sys.platform +IS_WIN = any(CUR_OS.startswith(i) for i in ['win32', 'cygwin']) +IS_NIX = any(CUR_OS.startswith(i) for i in ['aix', 'linux', 'darwin', 'freebsd']) +RE_ANSI = re.compile(r"\x1b\[[;\d]*[A-Za-z]") + +try: + if IS_WIN: + import colorama + else: + raise ImportError +except ImportError: + colorama = None +else: + try: + colorama.init(strip=False) + except TypeError: + colorama.init() + + +def envwrap(prefix, types=None, is_method=False): + """ + Override parameter defaults via `os.environ[prefix + param_name]`. + Maps UPPER_CASE env vars map to lower_case param names. + camelCase isn't supported (because Windows ignores case). + + Precedence (highest first): + + - call (`foo(a=3)`) + - environ (`FOO_A=2`) + - signature (`def foo(a=1)`) + + Parameters + ---------- + prefix : str + Env var prefix, e.g. "FOO_" + types : dict, optional + Fallback mappings `{'param_name': type, ...}` if types cannot be + inferred from function signature. + Consider using `types=collections.defaultdict(lambda: ast.literal_eval)`. + is_method : bool, optional + Whether to use `functools.partialmethod`. If (default: False) use `functools.partial`. + + Examples + -------- + ``` + $ cat foo.py + from tqdm.utils import envwrap + @envwrap("FOO_") + def test(a=1, b=2, c=3): + print(f"received: a={a}, b={b}, c={c}") + + $ FOO_A=42 FOO_C=1337 python -c 'import foo; foo.test(c=99)' + received: a=42, b=2, c=99 + ``` + """ + if types is None: + types = {} + i = len(prefix) + env_overrides = {k[i:].lower(): v for k, v in os.environ.items() if k.startswith(prefix)} + part = partialmethod if is_method else partial + + def wrap(func): + params = signature(func).parameters + # ignore unknown env vars + overrides = {k: v for k, v in env_overrides.items() if k in params} + # infer overrides' `type`s + for k in overrides: + param = params[k] + if param.annotation is not param.empty: # typehints + for typ in getattr(param.annotation, '__args__', (param.annotation,)): + try: + overrides[k] = typ(overrides[k]) + except Exception: + pass + else: + break + elif param.default is not None: # type of default value + overrides[k] = type(param.default)(overrides[k]) + else: + try: # `types` fallback + overrides[k] = types[k](overrides[k]) + except KeyError: # keep unconverted (`str`) + pass + return part(func, **overrides) + return wrap + + +class FormatReplace: + """ + >>> a = FormatReplace('something') + >>> f"{a:5d}" + 'something' + """ # NOQA: P102 + def __init__(self, replace=''): + self.replace = replace + self.format_called = 0 + + def __format__(self, _): + self.format_called += 1 + return self.replace + + +class Comparable: + """Assumes child has self._comparable attr/@property""" + def __lt__(self, other): + return self._comparable < other._comparable + + def __le__(self, other): + return (self < other) or (self == other) + + def __eq__(self, other): + return self._comparable == other._comparable + + def __ne__(self, other): + return not self == other + + def __gt__(self, other): + return not self <= other + + def __ge__(self, other): + return not self < other + + +class ObjectWrapper: + def __getattr__(self, name): + return getattr(self._wrapped, name) + + def __setattr__(self, name, value): + return setattr(self._wrapped, name, value) + + def wrapper_getattr(self, name): + """Actual `self.getattr` rather than self._wrapped.getattr""" + try: + return object.__getattr__(self, name) + except AttributeError: # py2 + return getattr(self, name) + + def wrapper_setattr(self, name, value): + """Actual `self.setattr` rather than self._wrapped.setattr""" + return object.__setattr__(self, name, value) + + def __init__(self, wrapped): + """ + Thin wrapper around a given object + """ + self.wrapper_setattr('_wrapped', wrapped) + + +class SimpleTextIOWrapper(ObjectWrapper): + """ + Change only `.write()` of the wrapped object by encoding the passed + value and passing the result to the wrapped object's `.write()` method. + """ + # pylint: disable=too-few-public-methods + def __init__(self, wrapped, encoding): + super().__init__(wrapped) + self.wrapper_setattr('encoding', encoding) + + def write(self, s): + """ + Encode `s` and pass to the wrapped object's `.write()` method. + """ + return self._wrapped.write(s.encode(self.wrapper_getattr('encoding'))) + + def __eq__(self, other): + return self._wrapped == getattr(other, '_wrapped', other) + + +class DisableOnWriteError(ObjectWrapper): + """ + Disable the given `tqdm_instance` upon `write()` or `flush()` errors. + """ + @staticmethod + def disable_on_exception(tqdm_instance, func): + """ + Quietly set `tqdm_instance.miniters=inf` if `func` raises `errno=5`. + """ + tqdm_instance = proxy(tqdm_instance) + + def inner(*args, **kwargs): + try: + return func(*args, **kwargs) + except OSError as e: + if e.errno != 5: + raise + try: + tqdm_instance.miniters = float('inf') + except ReferenceError: + pass + except ValueError as e: + if 'closed' not in str(e): + raise + try: + tqdm_instance.miniters = float('inf') + except ReferenceError: + pass + return inner + + def __init__(self, wrapped, tqdm_instance): # noqa: B042 + super().__init__(wrapped) + if hasattr(wrapped, 'write'): + self.wrapper_setattr( + 'write', self.disable_on_exception(tqdm_instance, wrapped.write)) + if hasattr(wrapped, 'flush'): + self.wrapper_setattr( + 'flush', self.disable_on_exception(tqdm_instance, wrapped.flush)) + + def __eq__(self, other): + return self._wrapped == getattr(other, '_wrapped', other) + + +class CallbackIOWrapper(ObjectWrapper): + def __init__(self, callback, stream, method="read"): + """ + Wrap a given `file`-like object's `read()` or `write()` to report + lengths to the given `callback` + """ + super().__init__(stream) + func = getattr(stream, method) + if method == "write": + @wraps(func) + def write(data, *args, **kwargs): + res = func(data, *args, **kwargs) + callback(len(data)) + return res + self.wrapper_setattr('write', write) + elif method == "read": + @wraps(func) + def read(*args, **kwargs): + data = func(*args, **kwargs) + callback(len(data)) + return data + self.wrapper_setattr('read', read) + else: + raise KeyError("Can only wrap read/write methods") + + +def _is_utf(encoding): + try: + '\u2588\u2589'.encode(encoding) + except UnicodeEncodeError: + return False + except Exception: + try: + return encoding.lower().startswith('utf-') or ('U8' == encoding) + except Exception: + return False + else: + return True + + +def _supports_unicode(fp): + try: + return _is_utf(fp.encoding) + except AttributeError: + return False + + +def _is_ascii(s): + if isinstance(s, str): + for c in s: + if ord(c) > 255: + return False + return True + return _supports_unicode(s) + + +def _screen_shape_wrapper(): # pragma: no cover + """ + Return a function which returns console dimensions (width, height). + Supported: linux, osx, windows, cygwin. + """ + _screen_shape = None + if IS_WIN: + _screen_shape = _screen_shape_windows + if _screen_shape is None: + _screen_shape = _screen_shape_tput + if IS_NIX: + _screen_shape = _screen_shape_linux + return _screen_shape + + +def _screen_shape_windows(fp): # pragma: no cover + try: + import struct + from ctypes import create_string_buffer, windll + from sys import stdin, stdout + + io_handle = -12 # assume stderr + if fp == stdin: + io_handle = -10 + elif fp == stdout: + io_handle = -11 + + h = windll.kernel32.GetStdHandle(io_handle) + csbi = create_string_buffer(22) + res = windll.kernel32.GetConsoleScreenBufferInfo(h, csbi) + if res: + (_bufx, _bufy, _curx, _cury, _wattr, left, top, right, bottom, + _maxx, _maxy) = struct.unpack("hhhhHhhhhhh", csbi.raw) + return right - left, bottom - top # +1 + except Exception: # nosec + pass + return None, None + + +def _screen_shape_tput(*_): # pragma: no cover + """cygwin xterm (windows)""" + try: + import shlex + from subprocess import check_call # nosec + return [int(check_call(shlex.split('tput ' + i))) - 1 + for i in ('cols', 'lines')] + except Exception: # nosec + pass + return None, None + + +def _screen_shape_linux(fp): # pragma: no cover + + try: + from array import array + from fcntl import ioctl + from termios import TIOCGWINSZ + except ImportError: + return None, None + else: + try: + rows, cols = array('h', ioctl(fp, TIOCGWINSZ, '\0' * 8))[:2] + return cols, rows + except Exception: + try: + return [int(os.environ[i]) - 1 for i in ("COLUMNS", "LINES")] + except (KeyError, ValueError): + return None, None + + +def _environ_cols_wrapper(): # pragma: no cover + """ + Return a function which returns console width. + Supported: linux, osx, windows, cygwin. + """ + warn("Use `_screen_shape_wrapper()(file)[0]` instead of" + " `_environ_cols_wrapper()(file)`", DeprecationWarning, stacklevel=2) + shape = _screen_shape_wrapper() + if not shape: + return None + + @wraps(shape) + def inner(fp): + return shape(fp)[0] + + return inner + + +def _term_move_up(): # pragma: no cover + return '' if (os.name == 'nt') and (colorama is None) else '\x1b[A' + + +def _text_width(s): + return sum(2 if east_asian_width(ch) in 'FW' else 1 for ch in str(s)) + + +def disp_len(data): + """ + Returns the real on-screen length of a string which may contain + ANSI control codes and wide chars. + """ + return _text_width(RE_ANSI.sub('', data)) + + +def disp_trim(data, length): + """ + Trim a string which may contain ANSI control characters. + """ + if len(data) == disp_len(data): + return data[:length] + + ansi_present = bool(RE_ANSI.search(data)) + while disp_len(data) > length: # carefully delete one char at a time + data = data[:-1] + if ansi_present and bool(RE_ANSI.search(data)): + # assume ANSI reset is required + return data if data.endswith("\033[0m") else data + "\033[0m" + return data diff --git a/miniconda3/pkgs/tqdm-4.67.3-py313h7040dfc_1/lib/python3.13/site-packages/tqdm/version.py b/miniconda3/pkgs/tqdm-4.67.3-py313h7040dfc_1/lib/python3.13/site-packages/tqdm/version.py new file mode 100644 index 0000000000000000000000000000000000000000..9338fb19799fd1d094357bacb91fc7d8aa350ad7 --- /dev/null +++ b/miniconda3/pkgs/tqdm-4.67.3-py313h7040dfc_1/lib/python3.13/site-packages/tqdm/version.py @@ -0,0 +1,10 @@ +"""`tqdm` version detector. Precedence: installed dist, git, 'UNKNOWN'.""" +try: + from importlib.metadata import PackageNotFoundError, version +except ImportError: # py<3.8 + from importlib_metadata import PackageNotFoundError, version + +try: + __version__ = version('tqdm') +except PackageNotFoundError: + __version__ = "UNKNOWN" diff --git a/miniconda3/pkgs/truststore-0.10.1-py313h06a4308_1/info/about.json b/miniconda3/pkgs/truststore-0.10.1-py313h06a4308_1/info/about.json new file mode 100644 index 0000000000000000000000000000000000000000..31af6449139b3fdd977b4f037138174395b89af0 --- /dev/null +++ b/miniconda3/pkgs/truststore-0.10.1-py313h06a4308_1/info/about.json @@ -0,0 +1,160 @@ +{ + "channels": [ + "https://repo.anaconda.com/pkgs/main", + "https://repo.anaconda.com/pkgs/r", + "https://repo.anaconda.com/pkgs/r" + ], + "conda_build_version": "25.1.2", + "conda_version": "25.1.1", + "description": "A library which exposes native system certificate stores (ie \"trust stores\")\nthrough an ssl.SSLContext-like API. This means that Python applications no\nlonger need to rely on certifi as a root certificate store.\n", + "dev_url": "https://github.com/sethmlarson/truststore", + "doc_url": "https://truststore.readthedocs.io", + "env_vars": { + "CIO_TEST": "" + }, + "extra": { + "copy_test_source_files": true, + "final": true, + "recipe-maintainers": [ + "conda-forge/truststore" + ] + }, + "home": "https://github.com/sethmlarson/truststore", + "identifiers": [], + "keywords": [], + "license": "MIT", + "license_family": "MIT", + "license_file": "LICENSE", + "root_pkgs": [ + "_libgcc_mutex 0.1 main", + "ca-certificates 2025.9.9 h06a4308_0", + "ld_impl_linux-64 2.40 h12ee557_0", + "libstdcxx-ng 11.2.0 h1234567_1", + "nlohmann_json 3.11.2 h6a678d5_0", + "pybind11-abi 5 hd3eb1b0_0", + "tzdata 2025a h04d1e81_0", + "libgomp 11.2.0 h1234567_1", + "_openmp_mutex 5.1 1_gnu", + "libgcc-ng 11.2.0 h1234567_1", + "bzip2 1.0.8 h5eee18b_6", + "c-ares 1.19.1 h5eee18b_0", + "cpp-expected 1.1.0 hdb19cb5_0", + "expat 2.6.4 h6a678d5_0", + "fmt 9.1.0 hdb19cb5_1", + "icu 73.1 h6a678d5_0", + "libev 4.33 h7f8727e_1", + "libffi 3.4.4 h6a678d5_1", + "libuuid 1.41.5 h5eee18b_0", + "lz4-c 1.9.4 h6a678d5_1", + "ncurses 6.4 h6a678d5_0", + "liblief 0.12.3 h6a678d5_0", + "reproc 14.2.4 h6a678d5_2", + "simdjson 3.10.1 hdb19cb5_0", + "xz 5.4.6 h5eee18b_1", + "yaml-cpp 0.8.0 h6a678d5_1", + "zlib 1.2.13 h5eee18b_1", + "libedit 3.1.20230828 h5eee18b_0", + "libnghttp2 1.57.0 h2d74bed_0", + "libssh2 1.11.1 h251f7ec_0", + "libxml2 2.13.5 hfdd30dd_0", + "pcre2 10.42 hebb0a14_1", + "readline 8.2 h5eee18b_0", + "reproc-cpp 14.2.4 h6a678d5_2", + "spdlog 1.11.0 hdb19cb5_0", + "tk 8.6.14 h39e8969_0", + "zstd 1.5.6 hc292b87_0", + "krb5 1.20.1 h143b758_1", + "libarchive 3.7.7 hfab0078_0", + "libsolv 0.7.30 he621ea3_1", + "sqlite 3.45.3 h5eee18b_0", + "libcurl 8.11.1 hc9e6f67_0", + "python 3.12.9 h5148396_0", + "libmamba 2.0.5 haf1ee3a_1", + "menuinst 2.2.0 py312h06a4308_1", + "anaconda-anon-usage 0.5.0 py312hfc0e8ea_100", + "annotated-types 0.6.0 py312h06a4308_0", + "archspec 0.2.3 pyhd3eb1b0_0", + "boltons 24.1.0 py312h06a4308_0", + "brotli-python 1.0.9 py312h6a678d5_9", + "charset-normalizer 3.3.2 pyhd3eb1b0_0", + "distro 1.9.0 py312h06a4308_0", + "frozendict 2.4.2 py312h06a4308_0", + "idna 3.7 py312h06a4308_0", + "jsonpointer 2.1 pyhd3eb1b0_0", + "libmambapy 2.0.5 py312hdb19cb5_1", + "mdurl 0.1.0 py312h06a4308_0", + "packaging 24.2 py312h06a4308_0", + "platformdirs 3.10.0 py312h06a4308_0", + "pluggy 1.5.0 py312h06a4308_0", + "pycosat 0.6.6 py312h5eee18b_2", + "pycparser 2.21 pyhd3eb1b0_0", + "pygments 2.15.1 py312h06a4308_1", + "pysocks 1.7.1 py312h06a4308_0", + "ruamel.yaml.clib 0.2.8 py312h5eee18b_0", + "setuptools 75.8.0 py312h06a4308_0", + "tqdm 4.67.1 py312he106c6f_0", + "truststore 0.10.0 py312h06a4308_0", + "typing_extensions 4.12.2 py312h06a4308_0", + "wheel 0.45.1 py312h06a4308_0", + "cffi 1.17.1 py312h1fdaa30_1", + "jsonpatch 1.33 py312h06a4308_1", + "markdown-it-py 2.2.0 py312h06a4308_1", + "pip 25.0 py312h06a4308_0", + "ruamel.yaml 0.18.6 py312h5eee18b_0", + "typing-extensions 4.12.2 py312h06a4308_0", + "urllib3 2.3.0 py312h06a4308_0", + "cryptography 43.0.3 py312h7825ff9_1", + "pydantic-core 2.27.1 py312h4aa5aa6_0", + "requests 2.32.3 py312h06a4308_1", + "rich 13.9.4 py312h06a4308_0", + "zstandard 0.23.0 py312h2c38b39_1", + "conda-content-trust 0.2.0 py312h06a4308_1", + "conda-package-streaming 0.11.0 py312h06a4308_0", + "pydantic 2.10.3 py312h06a4308_0", + "conda-package-handling 2.4.0 py312h06a4308_0", + "conda 25.1.1 py312h06a4308_0", + "conda-anaconda-tos 0.1.2 py312h06a4308_0", + "conda-libmamba-solver 25.1.1 pyhd3eb1b0_0", + "libsodium 1.0.20 heac8642_0", + "openssl 3.0.18 hd6dcaed_0", + "patch 2.8 hb25bd0a_0", + "patchelf 0.17.2 h6a678d5_0", + "yaml 0.2.5 h7b6447c_0", + "argcomplete 3.6.2 py312h06a4308_0", + "attrs 24.3.0 py312h06a4308_0", + "certifi 2025.8.3 py312h06a4308_0", + "chardet 5.2.0 py312h06a4308_0", + "click 8.2.1 py312h06a4308_0", + "filelock 3.17.0 py312h06a4308_0", + "jmespath 1.0.1 py312h06a4308_0", + "markupsafe 3.0.2 py312h5eee18b_0", + "more-itertools 10.3.0 py312h06a4308_0", + "pkginfo 1.12.0 py312h06a4308_0", + "psutil 7.0.0 py312hee96239_0", + "py-lief 0.12.3 py312h6a678d5_0", + "python-libarchive-c 5.1 pyhd3eb1b0_0", + "pytz 2025.2 py312h06a4308_0", + "pyyaml 6.0.2 py312h5eee18b_0", + "rpds-py 0.22.3 py312h4aa5aa6_0", + "six 1.17.0 py312h06a4308_0", + "soupsieve 2.5 py312h06a4308_0", + "tomlkit 0.13.2 py312h06a4308_0", + "xmltodict 0.14.2 py312h06a4308_0", + "jinja2 3.1.6 py312h06a4308_0", + "python-dateutil 2.9.0post0 py312h06a4308_2", + "referencing 0.30.2 py312h06a4308_0", + "yq 3.4.3 py312h06a4308_0", + "beautifulsoup4 4.13.5 py312h06a4308_0", + "botocore 1.37.10 py312h06a4308_0", + "jsonschema-specifications 2023.7.1 py312h06a4308_0", + "pynacl 1.5.0 py312h2630517_2", + "jsonschema 4.25.0 py312h06a4308_0", + "s3transfer 0.11.2 py312h06a4308_0", + "boto3 1.37.10 py312h06a4308_0", + "conda-anaconda-telemetry 0.3.0 pyhd3eb1b0_1", + "conda-index 0.5.0 py312h06a4308_0", + "conda-build 25.1.2 py312h06a4308_0" + ], + "summary": "Verify certificates using native system trust stores", + "tags": [] +} \ No newline at end of file diff --git a/miniconda3/pkgs/truststore-0.10.1-py313h06a4308_1/info/files b/miniconda3/pkgs/truststore-0.10.1-py313h06a4308_1/info/files new file mode 100644 index 0000000000000000000000000000000000000000..3165fe636b9aa0137496f574847aed4761316e37 --- /dev/null +++ b/miniconda3/pkgs/truststore-0.10.1-py313h06a4308_1/info/files @@ -0,0 +1,20 @@ +lib/python3.13/site-packages/truststore-0.10.1.dist-info/INSTALLER +lib/python3.13/site-packages/truststore-0.10.1.dist-info/METADATA +lib/python3.13/site-packages/truststore-0.10.1.dist-info/RECORD +lib/python3.13/site-packages/truststore-0.10.1.dist-info/REQUESTED +lib/python3.13/site-packages/truststore-0.10.1.dist-info/WHEEL +lib/python3.13/site-packages/truststore-0.10.1.dist-info/direct_url.json +lib/python3.13/site-packages/truststore-0.10.1.dist-info/licenses/LICENSE +lib/python3.13/site-packages/truststore/__init__.py +lib/python3.13/site-packages/truststore/__pycache__/__init__.cpython-313.pyc +lib/python3.13/site-packages/truststore/__pycache__/_api.cpython-313.pyc +lib/python3.13/site-packages/truststore/__pycache__/_macos.cpython-313.pyc +lib/python3.13/site-packages/truststore/__pycache__/_openssl.cpython-313.pyc +lib/python3.13/site-packages/truststore/__pycache__/_ssl_constants.cpython-313.pyc +lib/python3.13/site-packages/truststore/__pycache__/_windows.cpython-313.pyc +lib/python3.13/site-packages/truststore/_api.py +lib/python3.13/site-packages/truststore/_macos.py +lib/python3.13/site-packages/truststore/_openssl.py +lib/python3.13/site-packages/truststore/_ssl_constants.py +lib/python3.13/site-packages/truststore/_windows.py +lib/python3.13/site-packages/truststore/py.typed diff --git a/miniconda3/pkgs/truststore-0.10.1-py313h06a4308_1/info/git b/miniconda3/pkgs/truststore-0.10.1-py313h06a4308_1/info/git new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/miniconda3/pkgs/truststore-0.10.1-py313h06a4308_1/info/hash_input.json b/miniconda3/pkgs/truststore-0.10.1-py313h06a4308_1/info/hash_input.json new file mode 100644 index 0000000000000000000000000000000000000000..e1489271625fa4f5548417553f3725447d4df321 --- /dev/null +++ b/miniconda3/pkgs/truststore-0.10.1-py313h06a4308_1/info/hash_input.json @@ -0,0 +1,4 @@ +{ + "channel_targets": "defaults", + "target_platform": "linux-64" +} \ No newline at end of file diff --git a/miniconda3/pkgs/truststore-0.10.1-py313h06a4308_1/info/index.json b/miniconda3/pkgs/truststore-0.10.1-py313h06a4308_1/info/index.json new file mode 100644 index 0000000000000000000000000000000000000000..7d4bbedc6a7e68419457979f7860a23190b0e590 --- /dev/null +++ b/miniconda3/pkgs/truststore-0.10.1-py313h06a4308_1/info/index.json @@ -0,0 +1,16 @@ +{ + "arch": "x86_64", + "build": "py313h06a4308_1", + "build_number": 1, + "depends": [ + "python >=3.13,<3.14.0a0", + "python_abi 3.13.* *_cp313" + ], + "license": "MIT", + "license_family": "MIT", + "name": "truststore", + "platform": "linux", + "subdir": "linux-64", + "timestamp": 1762520921980, + "version": "0.10.1" +} \ No newline at end of file diff --git a/miniconda3/pkgs/truststore-0.10.1-py313h06a4308_1/info/licenses/LICENSE b/miniconda3/pkgs/truststore-0.10.1-py313h06a4308_1/info/licenses/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..7ec568c1136eb8ec86aa05cf7abacfb54c3e5ead --- /dev/null +++ b/miniconda3/pkgs/truststore-0.10.1-py313h06a4308_1/info/licenses/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2022 Seth Michael Larson + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/miniconda3/pkgs/truststore-0.10.1-py313h06a4308_1/info/paths.json b/miniconda3/pkgs/truststore-0.10.1-py313h06a4308_1/info/paths.json new file mode 100644 index 0000000000000000000000000000000000000000..b0cbcdc7387735e54a61304f2d1a7ff3c14a7c94 --- /dev/null +++ b/miniconda3/pkgs/truststore-0.10.1-py313h06a4308_1/info/paths.json @@ -0,0 +1,125 @@ +{ + "paths": [ + { + "_path": "lib/python3.13/site-packages/truststore-0.10.1.dist-info/INSTALLER", + "path_type": "hardlink", + "sha256": "d0edee15f91b406f3f99726e44eb990be6e34fd0345b52b910c568e0eef6a2a8", + "size_in_bytes": 5 + }, + { + "_path": "lib/python3.13/site-packages/truststore-0.10.1.dist-info/METADATA", + "path_type": "hardlink", + "sha256": "d27968f447cd1289f2ddf937d8b3225ac11156432055dbe08f9d55b6006909ed", + "size_in_bytes": 4440 + }, + { + "_path": "lib/python3.13/site-packages/truststore-0.10.1.dist-info/RECORD", + "path_type": "hardlink", + "sha256": "96122596f4788fdb4714a08505291f855b51ccdceb41dca5eab48e2ce710f073", + "size_in_bytes": 1470 + }, + { + "_path": "lib/python3.13/site-packages/truststore-0.10.1.dist-info/REQUESTED", + "path_type": "hardlink", + "sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "size_in_bytes": 0 + }, + { + "_path": "lib/python3.13/site-packages/truststore-0.10.1.dist-info/WHEEL", + "path_type": "hardlink", + "sha256": "1b68144734c4b66791f27add5d425f3620775585718a03d0f9b110ba3a4d88db", + "size_in_bytes": 82 + }, + { + "_path": "lib/python3.13/site-packages/truststore-0.10.1.dist-info/direct_url.json", + "path_type": "hardlink", + "sha256": "c2bb776cacc5ef1dc09c6c211b738a0dd5ed244aa24f7cda1db73c3358ef0802", + "size_in_bytes": 100 + }, + { + "_path": "lib/python3.13/site-packages/truststore-0.10.1.dist-info/licenses/LICENSE", + "path_type": "hardlink", + "sha256": "33be7b7e8fa4fd19b1760e1a8ed8a668bdab852c91b692dd41424bcb725a9fca", + "size_in_bytes": 1086 + }, + { + "_path": "lib/python3.13/site-packages/truststore/__init__.py", + "path_type": "hardlink", + "sha256": "db04525628e34733cb5575335aabdd64b36c10e8437e8a4a2ddd8428060bc0a5", + "size_in_bytes": 1320 + }, + { + "_path": "lib/python3.13/site-packages/truststore/__pycache__/__init__.cpython-313.pyc", + "path_type": "hardlink", + "sha256": "e47ea481795ef1eacdf4f9bca3981b37366419fc4490c95c58ae507ff84e1de8", + "size_in_bytes": 1443 + }, + { + "_path": "lib/python3.13/site-packages/truststore/__pycache__/_api.cpython-313.pyc", + "path_type": "hardlink", + "sha256": "f1c11fb1a634a944f81c7963628432a96a324d2a34a2f5a8eb16ed38b46f3a77", + "size_in_bytes": 17027 + }, + { + "_path": "lib/python3.13/site-packages/truststore/__pycache__/_macos.cpython-313.pyc", + "path_type": "hardlink", + "sha256": "b792ed5c98b85a4e594564d9db36c3663511f6329222b42b0295dff61863ed96", + "size_in_bytes": 19256 + }, + { + "_path": "lib/python3.13/site-packages/truststore/__pycache__/_openssl.cpython-313.pyc", + "path_type": "hardlink", + "sha256": "559004dc5e2bad6f5a26935987d4a7ad591d9147e4dc1fb1b821e15b1c9d007d", + "size_in_bytes": 2243 + }, + { + "_path": "lib/python3.13/site-packages/truststore/__pycache__/_ssl_constants.cpython-313.pyc", + "path_type": "hardlink", + "sha256": "435fe09223a4749dec9a971e0e9f245bd242346e9fa6edb0022628becef2152f", + "size_in_bytes": 1054 + }, + { + "_path": "lib/python3.13/site-packages/truststore/__pycache__/_windows.cpython-313.pyc", + "path_type": "hardlink", + "sha256": "0f579f586b3c4ee62ed638e57e6a3890e9b793cc2265e75b523881200576ab61", + "size_in_bytes": 16200 + }, + { + "_path": "lib/python3.13/site-packages/truststore/_api.py", + "path_type": "hardlink", + "sha256": "ae6a248d508d0b59856593a4ba613e9aba5203e91b8597cf20d779d1bc6d7601", + "size_in_bytes": 11172 + }, + { + "_path": "lib/python3.13/site-packages/truststore/_macos.py", + "path_type": "hardlink", + "sha256": "9d994b90e9accd413483aaf2470055198e423b33f2b9d72c889b4359aacce4b4", + "size_in_bytes": 20503 + }, + { + "_path": "lib/python3.13/site-packages/truststore/_openssl.py", + "path_type": "hardlink", + "sha256": "2cb519ed919a8a8fa2e5da4a2a328249e4ae7e69fa4fca62f650dc167bd2caad", + "size_in_bytes": 2324 + }, + { + "_path": "lib/python3.13/site-packages/truststore/_ssl_constants.py", + "path_type": "hardlink", + "sha256": "3540f87d529d483d36ae2efe75bd2d9ced15a8b3fd687bb3992b5c5bbb40974f", + "size_in_bytes": 1130 + }, + { + "_path": "lib/python3.13/site-packages/truststore/_windows.py", + "path_type": "hardlink", + "sha256": "ac01f22980fc33bb7e6d77c6f1580e55add3a5f85585bb78ad94253b8e58b8ff", + "size_in_bytes": 17993 + }, + { + "_path": "lib/python3.13/site-packages/truststore/py.typed", + "path_type": "hardlink", + "sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "size_in_bytes": 0 + } + ], + "paths_version": 1 +} \ No newline at end of file diff --git a/miniconda3/pkgs/truststore-0.10.1-py313h06a4308_1/info/recipe/conda_build_config.yaml b/miniconda3/pkgs/truststore-0.10.1-py313h06a4308_1/info/recipe/conda_build_config.yaml new file mode 100644 index 0000000000000000000000000000000000000000..2a74a1c415c8d53d61bb6f9ed8255204030cb6b6 --- /dev/null +++ b/miniconda3/pkgs/truststore-0.10.1-py313h06a4308_1/info/recipe/conda_build_config.yaml @@ -0,0 +1,28 @@ +c_compiler: gcc +channel_targets: defaults +cpu_optimization_target: nocona +cran_mirror: https://cran.r-project.org +cxx_compiler: gxx +extend_keys: +- ignore_build_only_deps +- extend_keys +- pin_run_as_build +- ignore_version +fortran_compiler: gfortran +ignore_build_only_deps: +- numpy +- python +lua: '5' +numpy: '1.26' +perl: 5.26.2 +pin_run_as_build: + python: + max_pin: x.x + min_pin: x.x + r-base: + max_pin: x.x + min_pin: x.x +platform: linux-64 +python: '3.13' +r_base: '3.5' +target_platform: linux-64 diff --git a/miniconda3/pkgs/truststore-0.10.1-py313h06a4308_1/info/recipe/meta.yaml b/miniconda3/pkgs/truststore-0.10.1-py313h06a4308_1/info/recipe/meta.yaml new file mode 100644 index 0000000000000000000000000000000000000000..019b77808fd19cdb4f9e5315ab7ad4ef8a691c20 --- /dev/null +++ b/miniconda3/pkgs/truststore-0.10.1-py313h06a4308_1/info/recipe/meta.yaml @@ -0,0 +1,95 @@ +# This file created by conda-build 25.1.2 +# meta.yaml template originally from: +# /home/task_176252074050774/truststore-feedstock/recipe, last modified Fri Nov 7 13:08:12 2025 +# ------------------------------------------------ + +package: + name: truststore + version: 0.10.1 +source: + fn: truststore-0.10.1.tar.gz + sha256: a470d2763875f9b9a148d5726af330d15b65d2a83f70610c262de8888ee94b4e + url: https://github.com/sethmlarson/truststore/archive/refs/tags/v0.10.1.tar.gz +build: + number: '1' + script: /home/task_176252074050774/conda-bld/truststore_1762520903993/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placeh/bin/python + -m pip install . -vv --no-deps --no-build-isolation + string: py313h06a4308_1 +requirements: + host: + - _libgcc_mutex 0.1 main + - _openmp_mutex 5.1 1_gnu + - bzip2 1.0.8 h5eee18b_6 + - ca-certificates 2025.11.4 h06a4308_0 + - expat 2.7.3 h3385a95_0 + - flit-core 3.12.0 py313hee27c6d_1 + - ld_impl_linux-64 2.44 h153f514_2 + - libffi 3.4.4 h6a678d5_1 + - libgcc-ng 11.2.0 h1234567_1 + - libgomp 11.2.0 h1234567_1 + - libmpdec 4.0.0 h5eee18b_0 + - libstdcxx-ng 11.2.0 h1234567_1 + - libuuid 1.41.5 h5eee18b_0 + - libxcb 1.17.0 h9b100fa_0 + - libzlib 1.3.1 hb25bd0a_0 + - ncurses 6.5 h7934f7d_0 + - openssl 3.0.18 hd6dcaed_0 + - pip 25.2 pyhc872135_1 + - pthread-stubs 0.3 h0ce48e5_1 + - python 3.13.9 h7e8bc2b_100_cp313 + - python_abi 3.13 1_cp313 + - readline 8.3 hc2a1206_0 + - setuptools 80.9.0 py313h06a4308_0 + - sqlite 3.50.2 hb25bd0a_1 + - tk 8.6.15 h54e0aa7_0 + - tzdata 2025b h04d1e81_0 + - wheel 0.45.1 py313h06a4308_0 + - xorg-libx11 1.8.12 h9b100fa_1 + - xorg-libxau 1.0.12 h9b100fa_0 + - xorg-libxdmcp 1.1.5 h9b100fa_0 + - xorg-xorgproto 2024.1 h5eee18b_1 + - xz 5.6.4 h5eee18b_1 + - zlib 1.3.1 hb25bd0a_0 + run: + - python >=3.13,<3.14.0a0 + - python_abi 3.13.* *_cp313 +test: + commands: + - pip check + imports: + - truststore + requires: + - aiohttp + - flaky + - httpx + - pip + - pyopenssl + - pytest + - pytest-asyncio + - pytest-httpserver + - requests + - trustme + - urllib3 + source_files: + - tests +about: + description: 'A library which exposes native system certificate stores (ie "trust + stores") + + through an ssl.SSLContext-like API. This means that Python applications no + + longer need to rely on certifi as a root certificate store. + + ' + dev_url: https://github.com/sethmlarson/truststore + doc_url: https://truststore.readthedocs.io + home: https://github.com/sethmlarson/truststore + license: MIT + license_family: MIT + license_file: LICENSE + summary: Verify certificates using native system trust stores +extra: + copy_test_source_files: true + final: true + recipe-maintainers: + - conda-forge/truststore diff --git a/miniconda3/pkgs/truststore-0.10.1-py313h06a4308_1/info/recipe/meta.yaml.template b/miniconda3/pkgs/truststore-0.10.1-py313h06a4308_1/info/recipe/meta.yaml.template new file mode 100644 index 0000000000000000000000000000000000000000..c35e1f7a2455d9ce84fe3c2ee414e9b016690c9f --- /dev/null +++ b/miniconda3/pkgs/truststore-0.10.1-py313h06a4308_1/info/recipe/meta.yaml.template @@ -0,0 +1,63 @@ +{% set name = "truststore" %} +{% set version = "0.10.1" %} + +package: + name: {{ name|lower }} + version: {{ version }} + +source: + url: https://github.com/sethmlarson/{{ name }}/archive/refs/tags/v{{ version }}.tar.gz + fn: {{ name }}-{{ version }}.tar.gz + sha256: a470d2763875f9b9a148d5726af330d15b65d2a83f70610c262de8888ee94b4e + +build: + skip: true # [py<310] + script: {{ PYTHON }} -m pip install . -vv --no-deps --no-build-isolation + number: 1 + +requirements: + host: + - python + - pip + - flit-core >=3.2,<4 + run: + - python + +test: + requires: + - pip + - aiohttp + - pyopenssl + - pytest + - pytest-asyncio + - pytest-httpserver + - urllib3 + - trustme + - requests + - flaky + - httpx + imports: + - truststore + source_files: + - tests + commands: + - pip check + - pytest -k "not (test_failures or test_failure_after_loading_additional_anchors)" tests/ # [win] + - pytest -k 'not (test_failures or test_failure_after_loading_additional_anchors)' tests/ # [osx] + +about: + home: https://github.com/sethmlarson/truststore + summary: Verify certificates using native system trust stores + description: | + A library which exposes native system certificate stores (ie "trust stores") + through an ssl.SSLContext-like API. This means that Python applications no + longer need to rely on certifi as a root certificate store. + license: MIT + license_file: LICENSE + license_family: MIT + doc_url: https://truststore.readthedocs.io + dev_url: https://github.com/sethmlarson/truststore + +extra: + recipe-maintainers: + - conda-forge/truststore diff --git a/miniconda3/pkgs/truststore-0.10.1-py313h06a4308_1/info/repodata_record.json b/miniconda3/pkgs/truststore-0.10.1-py313h06a4308_1/info/repodata_record.json new file mode 100644 index 0000000000000000000000000000000000000000..7d8c3d6ed39f7ae6f3437042e8baae7f70aa8bad --- /dev/null +++ b/miniconda3/pkgs/truststore-0.10.1-py313h06a4308_1/info/repodata_record.json @@ -0,0 +1,23 @@ +{ + "arch": "x86_64", + "build": "py313h06a4308_1", + "build_number": 1, + "channel": "https://repo.anaconda.com/pkgs/main/linux-64/", + "constrains": [], + "depends": [ + "python >=3.13,<3.14.0a0", + "python_abi 3.13.* *_cp313" + ], + "fn": "truststore-0.10.1-py313h06a4308_1.conda", + "license": "MIT", + "license_family": "MIT", + "md5": "f365c6753a35068503a4fba9a29953ff", + "name": "truststore", + "platform": "linux", + "sha256": "5236b0311bb9dc1b8643fed1666c2ff465225d055e14f7730ca43e63258c6257", + "size": 49373, + "subdir": "linux-64", + "timestamp": 1762520921000, + "url": "https://repo.anaconda.com/pkgs/main/linux-64/truststore-0.10.1-py313h06a4308_1.conda", + "version": "0.10.1" +} \ No newline at end of file diff --git a/miniconda3/pkgs/truststore-0.10.1-py313h06a4308_1/info/test/run_test.py b/miniconda3/pkgs/truststore-0.10.1-py313h06a4308_1/info/test/run_test.py new file mode 100644 index 0000000000000000000000000000000000000000..f6da959ac7cd6027dbfdcbe9d542b2ef9cb7d498 --- /dev/null +++ b/miniconda3/pkgs/truststore-0.10.1-py313h06a4308_1/info/test/run_test.py @@ -0,0 +1,3 @@ +print("import: 'truststore'") +import truststore + diff --git a/miniconda3/pkgs/truststore-0.10.1-py313h06a4308_1/info/test/run_test.sh b/miniconda3/pkgs/truststore-0.10.1-py313h06a4308_1/info/test/run_test.sh new file mode 100644 index 0000000000000000000000000000000000000000..1afc6b862fab8658b14cb4cc0345a4ee1f02ad0e --- /dev/null +++ b/miniconda3/pkgs/truststore-0.10.1-py313h06a4308_1/info/test/run_test.sh @@ -0,0 +1,8 @@ + + +set -ex + + + +pip check +exit 0 diff --git a/miniconda3/pkgs/truststore-0.10.1-py313h06a4308_1/info/test/test_time_dependencies.json b/miniconda3/pkgs/truststore-0.10.1-py313h06a4308_1/info/test/test_time_dependencies.json new file mode 100644 index 0000000000000000000000000000000000000000..11e875ff9551d740dea2d9c785387d125b724052 --- /dev/null +++ b/miniconda3/pkgs/truststore-0.10.1-py313h06a4308_1/info/test/test_time_dependencies.json @@ -0,0 +1 @@ +["flaky", "pyopenssl", "aiohttp", "trustme", "requests", "pytest-asyncio", "pip", "pytest-httpserver", "urllib3", "httpx", "pytest"] \ No newline at end of file diff --git a/miniconda3/pkgs/truststore-0.10.1-py313h06a4308_1/info/test/tests/__init__.py b/miniconda3/pkgs/truststore-0.10.1-py313h06a4308_1/info/test/tests/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..4d7fcb4df6650f9cc5f4d22b0c5dcb85c33f918f --- /dev/null +++ b/miniconda3/pkgs/truststore-0.10.1-py313h06a4308_1/info/test/tests/__init__.py @@ -0,0 +1,15 @@ +import requests +import requests.adapters + + +class SSLContextAdapter(requests.adapters.HTTPAdapter): + # HTTPAdapter for Requests that allows for injecting an SSLContext + # into the lower-level urllib3.PoolManager. + def __init__(self, *, ssl_context=None, **kwargs): + self._ssl_context = ssl_context + super().__init__(**kwargs) + + def init_poolmanager(self, *args, **kwargs): + if self._ssl_context is not None: + kwargs.setdefault("ssl_context", self._ssl_context) + return super().init_poolmanager(*args, **kwargs) diff --git a/miniconda3/pkgs/truststore-0.10.1-py313h06a4308_1/info/test/tests/aiohttp_with_inject.py b/miniconda3/pkgs/truststore-0.10.1-py313h06a4308_1/info/test/tests/aiohttp_with_inject.py new file mode 100644 index 0000000000000000000000000000000000000000..a7aec30a3f55e86cf9ea6fab28713bd2064c48c8 --- /dev/null +++ b/miniconda3/pkgs/truststore-0.10.1-py313h06a4308_1/info/test/tests/aiohttp_with_inject.py @@ -0,0 +1,20 @@ +# Used by the test: test_inject.py::test_aiohttp_work_with_inject + +import asyncio +import sys + +import truststore + +truststore.inject_into_ssl() + +import aiohttp # noqa: E402 + + +async def main(): + async with aiohttp.ClientSession() as client: + resp = await client.get("https://localhost:9999") + assert resp.status == 200 + sys.exit(resp.status) + + +asyncio.run(main()) diff --git a/miniconda3/pkgs/truststore-0.10.1-py313h06a4308_1/info/test/tests/conftest.py b/miniconda3/pkgs/truststore-0.10.1-py313h06a4308_1/info/test/tests/conftest.py new file mode 100644 index 0000000000000000000000000000000000000000..4d26af64da9427b6808eab87e0098bbc1f98bc63 --- /dev/null +++ b/miniconda3/pkgs/truststore-0.10.1-py313h06a4308_1/info/test/tests/conftest.py @@ -0,0 +1,175 @@ +import asyncio +import logging +import pathlib +import ssl +import typing +from dataclasses import dataclass +from tempfile import TemporaryDirectory + +import pytest +import pytest_asyncio +from aiohttp import web + +MKCERT_CA_NOT_INSTALLED = b"local CA is not installed in the system trust store" +MKCERT_CA_ALREADY_INSTALLED = b"local CA is now installed in the system trust store" +SUBPROCESS_TIMEOUT = 5 + +# To avoid getting the SSLContext injected by truststore. +original_SSLContext = ssl.SSLContext + + +def decorator_requires_internet(decorator): + """Mark a decorator with the "internet" mark""" + + def wrapper(f): + return pytest.mark.internet(decorator(f)) + + return wrapper + + +successful_hosts = decorator_requires_internet( + pytest.mark.parametrize("host", ["example.com", "1.1.1.1"]) +) + +logger = logging.getLogger("aiohttp.web") + + +@pytest_asyncio.fixture +async def mkcert() -> typing.AsyncIterator[None]: + async def is_mkcert_available() -> bool: + try: + p = await asyncio.create_subprocess_exec( + "mkcert", + "-help", + stdout=asyncio.subprocess.DEVNULL, + stderr=asyncio.subprocess.DEVNULL, + ) + except FileNotFoundError: + return False + await asyncio.wait_for(p.wait(), timeout=SUBPROCESS_TIMEOUT) + return p.returncode == 0 + + # Checks to see if mkcert is available at all. + if not await is_mkcert_available(): + pytest.skip("Install mkcert to run custom CA tests") + + # Now we attempt to install the root certificate + # to the system trust store. Keep track if we should + # call mkcert -uninstall at the end. + should_mkcert_uninstall = False + try: + p = await asyncio.create_subprocess_exec( + "mkcert", + "-install", + stdout=asyncio.subprocess.PIPE, + stderr=asyncio.subprocess.STDOUT, + ) + await p.wait() + assert p.returncode == 0 + + # See if the root cert was installed for the first + # time, if so we want to leave no trace. + stdout, _ = await p.communicate() + should_mkcert_uninstall = MKCERT_CA_ALREADY_INSTALLED in stdout + + yield + + finally: + # Only uninstall mkcert root cert if it wasn't + # installed before our attempt to install. + if should_mkcert_uninstall: + p = await asyncio.create_subprocess_exec( + "mkcert", + "-uninstall", + stdout=asyncio.subprocess.DEVNULL, + stderr=asyncio.subprocess.DEVNULL, + ) + await p.wait() + + +@dataclass +class CertFiles: + key_file: pathlib.Path + cert_file: pathlib.Path + + +@pytest_asyncio.fixture +async def mkcert_certs(mkcert: None) -> typing.AsyncIterator[CertFiles]: + with TemporaryDirectory() as tmp_dir: + # Create the structure we'll eventually return + # as long as mkcert succeeds in creating the certs. + tmpdir_path = pathlib.Path(tmp_dir) + certs = CertFiles( + cert_file=tmpdir_path / "localhost.pem", + key_file=tmpdir_path / "localhost-key.pem", + ) + + cmd = ( + "mkcert" + f" -cert-file {certs.cert_file}" + f" -key-file {certs.key_file}" + " localhost" + ) + p = await asyncio.create_subprocess_shell( + cmd, + stdout=asyncio.subprocess.PIPE, + stderr=asyncio.subprocess.STDOUT, + ) + await asyncio.wait_for(p.wait(), timeout=SUBPROCESS_TIMEOUT) + + # Check for any signs that mkcert wasn't able to issue certs + # or that the CA isn't installed + stdout, _ = await p.communicate() + if MKCERT_CA_NOT_INSTALLED in stdout or p.returncode != 0: + raise RuntimeError( + f"mkcert couldn't issue certificates " + f"(exited with {p.returncode}): {stdout.decode()}" + ) + + yield certs + + +@dataclass +class Server: + host: str + port: int + + @property + def base_url(self) -> str: + return f"https://{self.host}:{self.port}" + + +@pytest_asyncio.fixture(scope="function") +async def server(mkcert_certs: CertFiles) -> typing.AsyncIterator[Server]: + async def handler(request: web.Request) -> web.Response: + # Check the request was served over HTTPS. + assert request.scheme == "https" + + return web.Response(status=200) + + app = web.Application() + app.add_routes([web.get("/", handler)]) + + ctx = original_SSLContext(ssl.PROTOCOL_TLS_SERVER) + + # We use str(pathlib.Path) here because PyPy doesn't accept Path objects. + # TODO: This is a bug in PyPy and should be reported to them, but their + # GitLab instance was offline when we found this bug. :'( + ctx.load_cert_chain( + certfile=str(mkcert_certs.cert_file), + keyfile=str(mkcert_certs.key_file), + ) + + # we need keepalive_timeout=0 + # see https://github.com/aio-libs/aiohttp/issues/5426 + runner = web.AppRunner(app, keepalive_timeout=0) + await runner.setup() + port = 9999 # Arbitrary choice. + site = web.TCPSite(runner, ssl_context=ctx, port=port) + + await site.start() + try: + yield Server(host="localhost", port=port) + finally: + await site.stop() + await runner.cleanup() diff --git a/miniconda3/pkgs/truststore-0.10.1-py313h06a4308_1/info/test/tests/requests_with_inject.py b/miniconda3/pkgs/truststore-0.10.1-py313h06a4308_1/info/test/tests/requests_with_inject.py new file mode 100644 index 0000000000000000000000000000000000000000..febc5347cb793a8974623e8c380486418a129bbc --- /dev/null +++ b/miniconda3/pkgs/truststore-0.10.1-py313h06a4308_1/info/test/tests/requests_with_inject.py @@ -0,0 +1,14 @@ +# Used by the test: test_inject.py::test_requests_work_with_inject + +import sys + +import truststore + +truststore.inject_into_ssl() + +import requests # noqa: E402 + +resp = requests.request("GET", "https://localhost:9999") +assert resp.status_code == 200 + +sys.exit(resp.status_code) diff --git a/miniconda3/pkgs/truststore-0.10.1-py313h06a4308_1/info/test/tests/test_api.py b/miniconda3/pkgs/truststore-0.10.1-py313h06a4308_1/info/test/tests/test_api.py new file mode 100644 index 0000000000000000000000000000000000000000..479db4c95ead5a92418704b118fa67b0ae2128a0 --- /dev/null +++ b/miniconda3/pkgs/truststore-0.10.1-py313h06a4308_1/info/test/tests/test_api.py @@ -0,0 +1,452 @@ +import importlib +import os +import platform +import socket +import ssl +import tempfile +from dataclasses import dataclass +from operator import attrgetter +from unittest import mock + +import aiohttp +import aiohttp.client_exceptions +import pytest +import requests +import urllib3 +import urllib3.exceptions +from pytest_httpserver import HTTPServer + +import truststore +from tests import SSLContextAdapter +from tests.conftest import decorator_requires_internet + +pytestmark = pytest.mark.flaky + +# Make sure the httpserver doesn't hang +# if the client drops the connection due to a cert verification error +socket.setdefaulttimeout(10) + + +successful_hosts = decorator_requires_internet( + pytest.mark.parametrize("host", ["example.com", "1.1.1.1"]) +) + + +@dataclass +class FailureHost: + host: str + error_messages: list[str] + + +wrong_host_failure_host = FailureHost( + host="wrong.host.badssl.com", + error_messages=[ + # OpenSSL + "Hostname mismatch, certificate is not valid for 'wrong.host.badssl.com'", + # macOS + "certificate name does not match", + # macOS with revocation checks + "certificates do not meet pinning requirements", + # macOS 10.13 + "Recoverable trust failure occurred", + # Windows + "The certificate's CN name does not match the passed value.", + ], +) +failure_hosts_list = [ + wrong_host_failure_host, + FailureHost( + host="expired.badssl.com", + error_messages=[ + # OpenSSL + "certificate has expired", + # macOS + "ā€œ*.badssl.comā€ certificate is expired", + # macOS with revocation checks + "certificates do not meet pinning requirements", + # macOS 10.13 + "Recoverable trust failure occurred", + # Windows + ( + "A required certificate is not within its validity period when verifying " + "against the current system clock or the timestamp in the signed file." + ), + ], + ), + FailureHost( + host="self-signed.badssl.com", + error_messages=[ + # OpenSSL + "self-signed certificate", + "self signed certificate", + # macOS + "ā€œ*.badssl.comā€ certificate is not trusted", + # macOS with revocation checks + "certificates do not meet pinning requirements", + # macOS 10.13 + "Recoverable trust failure occurred", + # Windows + ( + "A certificate chain processed, but terminated in a root " + "certificate which is not trusted by the trust provider." + ), + ], + ), + FailureHost( + host="untrusted-root.badssl.com", + error_messages=[ + # OpenSSL + "self-signed certificate in certificate chain", + "self signed certificate in certificate chain", + # macOS + "ā€œBadSSL Untrusted Root Certificate Authorityā€ certificate is not trusted", + # macOS with revocation checks + "certificates do not meet pinning requirements", + # macOS 10.13 + "Recoverable trust failure occurred", + # Windows + ( + "A certificate chain processed, but terminated in a root " + "certificate which is not trusted by the trust provider." + ), + ], + ), + FailureHost( + host="superfish.badssl.com", + error_messages=[ + # OpenSSL + "unable to get local issuer certificate", + # macOS + "ā€œsuperfish.badssl.comā€ certificate is not trusted", + # macOS with revocation checks + "certificates do not meet pinning requirements", + # macOS 10.13 + "Recoverable trust failure occurred", + # Windows + ( + "A certificate chain processed, but terminated in a root " + "certificate which is not trusted by the trust provider." + ), + ], + ), +] + +failure_hosts_no_revocation = decorator_requires_internet( + pytest.mark.parametrize( + "failure", failure_hosts_list.copy(), ids=attrgetter("host") + ) +) + +if platform.system() != "Linux": + failure_hosts_list.append( + FailureHost( + host="revoked.badssl.com", + error_messages=[ + # macOS + "ā€œrevoked.badssl.comā€ certificate is revoked", + # macOS 10.13 + "Fatal trust failure occurred", + # Windows + "The certificate is revoked.", + ], + ) + ) + +failure_hosts = decorator_requires_internet( + pytest.mark.parametrize("failure", failure_hosts_list, ids=attrgetter("host")) +) + +# Fixture which tests both the SecTrustEvaluate (macOS <=10.13) and +# SecTrustEvaluateWithError (macOS >=10.14) APIs +# on macOS versions that support both APIs. +if platform.system() == "Darwin" and tuple( + map(int, platform.mac_ver()[0].split(".")) +) >= (10, 14): + + @pytest.fixture(autouse=True, params=[True, False]) + def mock_macos_version_10_13(request): + import truststore._macos + + prev = truststore._macos._is_macos_version_10_14_or_later + truststore._macos._is_macos_version_10_14_or_later = request.param + try: + yield + finally: + truststore._macos._is_macos_version_10_14_or_later = prev + + +@pytest.fixture +def trustme_ca(): + # 'trustme' is optional to allow testing on Python 3.13 + try: + import trustme + except ImportError: + pytest.skip("Test requires 'trustme' to be installed") + + ca = trustme.CA() + yield ca + + +@pytest.fixture +def httpserver_ssl_context(trustme_ca): + server_context = ssl.SSLContext(ssl.PROTOCOL_TLS_SERVER) + server_cert = trustme_ca.issue_cert("localhost") + server_cert.configure_cert(server_context) + return server_context + + +# Changes pytest-httpserver fixture to be scope='function' instead of 'session'. +@pytest.fixture(scope="function") +def make_httpserver(httpserver_listen_address, httpserver_ssl_context): + host, port = httpserver_listen_address + if not host: + host = HTTPServer.DEFAULT_LISTEN_HOST + if not port: + port = HTTPServer.DEFAULT_LISTEN_PORT + + server = HTTPServer(host=host, port=port, ssl_context=httpserver_ssl_context) + server.start() + yield server + server.clear() + if server.is_running(): + server.stop() + + +def connect_to_host( + host: str, use_server_hostname: bool = True, verify_flags=ssl.VERIFY_CRL_CHECK_CHAIN +): + with socket.create_connection((host, 443)) as sock: + ctx = truststore.SSLContext(ssl.PROTOCOL_TLS_CLIENT) + if verify_flags and platform.system() != "Linux": + ctx.verify_flags |= verify_flags + with ctx.wrap_socket( + sock, server_hostname=host if use_server_hostname else None + ): + pass + + +@successful_hosts +def test_success(host): + connect_to_host(host) + + +@failure_hosts +def test_failures(failure): + with pytest.raises(ssl.SSLCertVerificationError) as e: + connect_to_host(failure.host) + + error_repr = repr(e.value) + assert any(message in error_repr for message in failure.error_messages), error_repr + + +@successful_hosts +def test_success_after_loading_additional_anchors(host, trustme_ca): + with socket.create_connection((host, 443)) as sock: + ctx = truststore.SSLContext(ssl.PROTOCOL_TLS_CLIENT) + + # See if loading additional anchors still uses system anchors. + trustme_ca.configure_trust(ctx) + with ctx.wrap_socket(sock, server_hostname=host): + pass + + +@failure_hosts +def test_failure_after_loading_additional_anchors(failure, trustme_ca): + with ( + pytest.raises(ssl.SSLCertVerificationError) as e, + socket.create_connection((failure.host, 443)) as sock, + ): + ctx = truststore.SSLContext(ssl.PROTOCOL_TLS_CLIENT) + if platform.system() != "Linux": + ctx.verify_flags |= ssl.VERIFY_CRL_CHECK_CHAIN + + # See if loading additional anchors still fails. + trustme_ca.configure_trust(ctx) + with ctx.wrap_socket(sock, server_hostname=failure.host): + pass + + error_repr = repr(e.value) + assert any(message in error_repr for message in failure.error_messages), error_repr + + +@failure_hosts_no_revocation +def test_failures_without_revocation_checks(failure): + # On macOS with revocation checks required, we get a + # "certificates do not meet pinning requirements" + # error for some of the badssl certs. So let's also test + # with revocation checks disabled and make sure we get the + # expected error messages in that case. + with pytest.raises(ssl.SSLCertVerificationError) as e: + connect_to_host(failure.host, verify_flags=None) + + error_repr = repr(e.value) + assert any(message in error_repr for message in failure.error_messages), error_repr + + +@successful_hosts +def test_sslcontext_api_success(host): + if host == "1.1.1.1": + pytest.skip("urllib3 doesn't pass server_hostname for IP addresses") + + ctx = truststore.SSLContext(ssl.PROTOCOL_TLS_CLIENT) + with urllib3.PoolManager(ssl_context=ctx, retries=5) as http: + resp = http.request("GET", f"https://{host}") + # Cloudflare rejects some of our CI requests and + # that's okay because we only care about the TLS handshake. + assert resp.status in (200, 403) + assert len(resp.data) > 0 + + +@successful_hosts +@pytest.mark.filterwarnings("ignore:enable_cleanup_closed ignored.*:DeprecationWarning") +@pytest.mark.asyncio +async def test_sslcontext_api_success_async(host): + ctx = truststore.SSLContext(ssl.PROTOCOL_TLS_CLIENT) + # connector avoids https://github.com/aio-libs/aiohttp/issues/5426 + async with aiohttp.ClientSession( + connector=aiohttp.TCPConnector(force_close=True, enable_cleanup_closed=True) + ) as http: + resp = await http.request("GET", f"https://{host}", ssl=ctx) + + assert resp.status == 200 + assert len(await resp.text()) > 0 + + +@failure_hosts +def test_sslcontext_api_failures(failure): + host = failure.host + ctx = truststore.SSLContext(ssl.PROTOCOL_TLS_CLIENT) + if platform.system() != "Linux": + ctx.verify_flags |= ssl.VERIFY_CRL_CHECK_CHAIN + with urllib3.PoolManager(ssl_context=ctx) as http: + with pytest.raises(urllib3.exceptions.SSLError) as e: + http.request("GET", f"https://{host}", retries=False) + + assert "cert" in repr(e.value).lower() and "verif" in repr(e.value).lower() + + +@failure_hosts +@pytest.mark.filterwarnings("ignore:enable_cleanup_closed ignored.*:DeprecationWarning") +@pytest.mark.asyncio +async def test_sslcontext_api_failures_async(failure): + ctx = truststore.SSLContext(ssl.PROTOCOL_TLS_CLIENT) + if platform.system() != "Linux": + ctx.verify_flags |= ssl.VERIFY_CRL_CHECK_CHAIN + # connector avoids https://github.com/aio-libs/aiohttp/issues/5426 + async with aiohttp.ClientSession( + connector=aiohttp.TCPConnector(force_close=True, enable_cleanup_closed=True) + ) as http: + with pytest.raises( + aiohttp.client_exceptions.ClientConnectorCertificateError + ) as e: + await http.request("GET", f"https://{failure.host}", ssl=ctx) + + assert "cert" in repr(e.value).lower() and "verif" in repr(e.value).lower() + + +@successful_hosts +def test_requests_sslcontext_api_success(host): + if host == "1.1.1.1": + pytest.skip("urllib3 doesn't pass server_hostname for IP addresses") + + ctx = truststore.SSLContext(ssl.PROTOCOL_TLS_CLIENT) + + with requests.Session() as http: + http.mount("https://", SSLContextAdapter(ssl_context=ctx)) + resp = http.request("GET", f"https://{host}") + + assert resp.status_code == 200 + assert len(resp.content) > 0 + + +@failure_hosts +def test_requests_sslcontext_api_failures(failure): + host = failure.host + + ctx = truststore.SSLContext(ssl.PROTOCOL_TLS_CLIENT) + if platform.system() != "Linux": + ctx.verify_flags |= ssl.VERIFY_CRL_CHECK_CHAIN + + with requests.Session() as http: + http.mount("https://", SSLContextAdapter(ssl_context=ctx)) + + with pytest.raises(requests.exceptions.SSLError) as e: + http.request("GET", f"https://{host}") + + assert "cert" in repr(e.value).lower() and "verif" in repr(e.value).lower() + + +@pytest.mark.internet +def test_wrong_host_succeeds_with_hostname_verification_disabled() -> None: + global wrong_host_failure_host + + ctx = truststore.SSLContext(ssl.PROTOCOL_TLS_CLIENT) + ctx.check_hostname = False + assert ctx.check_hostname is False + + with urllib3.PoolManager(ssl_context=ctx, retries=5, assert_hostname=False) as http: + resp = http.request("GET", f"https://{wrong_host_failure_host.host}") + + assert resp.status == 200 + assert len(resp.data) > 0 + assert ctx.check_hostname is False + + +def test_trustme_cert(trustme_ca, httpserver): + ctx = truststore.SSLContext(ssl.PROTOCOL_TLS_CLIENT) + trustme_ca.configure_trust(ctx) + + httpserver.expect_request("/", method="GET").respond_with_json({}) + + with urllib3.PoolManager(ssl_context=ctx) as http: + resp = http.request("GET", httpserver.url_for("/")) + assert resp.status == 200 + assert len(resp.data) > 0 + + +def test_trustme_cert_loaded_via_capath(trustme_ca, httpserver): + from OpenSSL.crypto import X509 + + ctx = truststore.SSLContext(ssl.PROTOCOL_TLS_CLIENT) + with tempfile.TemporaryDirectory() as capath: + with open(f"{capath}/cert.pem", "wb") as certfile: + certfile.write(trustme_ca.cert_pem.bytes()) + cert_hash = X509.from_cryptography(trustme_ca._certificate).subject_name_hash() + os.symlink(f"{capath}/cert.pem", f"{capath}/{cert_hash:x}.0") + assert set(os.listdir(capath)) == {"cert.pem", f"{cert_hash:x}.0"} + + ctx.load_verify_locations(capath=capath) + + httpserver.expect_request("/", method="GET").respond_with_json({}) + + with urllib3.PoolManager(ssl_context=ctx) as http: + resp = http.request("GET", httpserver.url_for("/")) + assert resp.status == 200 + assert len(resp.data) > 0 + + +@pytest.mark.internet +def test_trustme_cert_still_uses_system_certs(trustme_ca): + ctx = truststore.SSLContext(ssl.PROTOCOL_TLS_CLIENT) + trustme_ca.configure_trust(ctx) + + with urllib3.PoolManager(ssl_context=ctx) as http: + resp = http.request("GET", "https://example.com") + assert resp.status == 200 + assert len(resp.data) > 0 + + +def test_macos_10_7_import_error(): + with mock.patch("platform.mac_ver") as mac_ver: + # This isn't the full structure, but the version is the first element. + mac_ver.return_value = ("10.7",) + + with pytest.raises(ImportError) as e: + # We want to force a fresh import, so either we get it on the + # first try because the OS isn't macOS or we get it on + # the call to importlib.reload(...). + import truststore._macos + + importlib.reload(truststore._macos) + + assert str(e.value) == "Only OS X 10.8 and newer are supported, not 10.7" diff --git a/miniconda3/pkgs/truststore-0.10.1-py313h06a4308_1/info/test/tests/test_custom_ca.py b/miniconda3/pkgs/truststore-0.10.1-py313h06a4308_1/info/test/tests/test_custom_ca.py new file mode 100644 index 0000000000000000000000000000000000000000..254a21e0c0e1758285d6818b9c3c6e3d74847cee --- /dev/null +++ b/miniconda3/pkgs/truststore-0.10.1-py313h06a4308_1/info/test/tests/test_custom_ca.py @@ -0,0 +1,44 @@ +import asyncio +import ssl + +import pytest +import requests +import urllib3 +from aiohttp import ClientSession + +import truststore +from tests import SSLContextAdapter +from tests.conftest import Server + + +@pytest.mark.asyncio +async def test_urllib3_custom_ca(server: Server) -> None: + def test_urllib3(): + ctx = truststore.SSLContext(ssl.PROTOCOL_TLS_CLIENT) + with urllib3.PoolManager(ssl_context=ctx) as client: + resp = client.request("GET", server.base_url) + assert resp.status == 200 + + thread = asyncio.to_thread(test_urllib3) + await thread + + +@pytest.mark.asyncio +async def test_aiohttp_custom_ca(server: Server) -> None: + ctx = truststore.SSLContext(ssl.PROTOCOL_TLS_CLIENT) + async with ClientSession() as client: + resp = await client.get(server.base_url, ssl=ctx) + assert resp.status == 200 + + +@pytest.mark.asyncio +async def test_requests_custom_ca(server: Server) -> None: + def test_requests(): + ctx = truststore.SSLContext(ssl.PROTOCOL_TLS_CLIENT) + with requests.Session() as http: + http.mount("https://", SSLContextAdapter(ssl_context=ctx)) + resp = http.request("GET", server.base_url) + assert resp.status_code == 200 + + thread = asyncio.to_thread(test_requests) + await thread diff --git a/miniconda3/pkgs/truststore-0.10.1-py313h06a4308_1/info/test/tests/test_inject.py b/miniconda3/pkgs/truststore-0.10.1-py313h06a4308_1/info/test/tests/test_inject.py new file mode 100644 index 0000000000000000000000000000000000000000..69c4511bd4e0f9d2548ec5945c514022d18ce359 --- /dev/null +++ b/miniconda3/pkgs/truststore-0.10.1-py313h06a4308_1/info/test/tests/test_inject.py @@ -0,0 +1,131 @@ +import asyncio +import pathlib +import ssl +import sys + +import httpx +import pytest +import urllib3 + +import truststore +from tests.conftest import Server, successful_hosts + + +@pytest.fixture(scope="function") +def inject_truststore(): + truststore.inject_into_ssl() + try: + yield + finally: + truststore.extract_from_ssl() + + +def test_inject_and_extract(): + assert ssl.SSLContext is not truststore.SSLContext + try: + original_SSLContext = ssl.SSLContext + + ctx = truststore.SSLContext(ssl.PROTOCOL_TLS_CLIENT) + assert isinstance(ctx._ctx, original_SSLContext) + + truststore.inject_into_ssl() + assert ssl.SSLContext is truststore.SSLContext + assert urllib3.util.ssl_.SSLContext is truststore.SSLContext + + ctx = truststore.SSLContext(ssl.PROTOCOL_TLS_CLIENT) + assert isinstance(ctx._ctx, original_SSLContext) + + ctx = ssl.SSLContext(ssl.PROTOCOL_TLS_CLIENT) + assert isinstance(ctx, truststore.SSLContext) + + ctx = ssl.create_default_context() + assert isinstance(ctx, truststore.SSLContext) + + truststore.extract_from_ssl() + assert ssl.SSLContext is original_SSLContext + assert urllib3.util.ssl_.SSLContext is original_SSLContext + + ctx = truststore.SSLContext(ssl.PROTOCOL_TLS_CLIENT) + assert isinstance(ctx._ctx, original_SSLContext) + + ctx = ssl.SSLContext(ssl.PROTOCOL_TLS_CLIENT) + assert isinstance(ctx, original_SSLContext) + + ctx = ssl.create_default_context() + assert isinstance(ctx, original_SSLContext) + finally: + truststore.extract_from_ssl() + + +@successful_hosts +@pytest.mark.usefixtures("inject_truststore") +def test_success_with_inject(host): + with urllib3.PoolManager() as http: + resp = http.request("GET", f"https://{host}") + assert resp.status == 200 + + +@pytest.mark.usefixtures("inject_truststore") +def test_inject_set_values(): + ctx = ssl.create_default_context() + assert isinstance(ctx, truststore.SSLContext) + + ctx.check_hostname = False + ctx.verify_mode = ssl.CERT_NONE + + assert ctx.check_hostname is False + assert ctx.verify_mode == ssl.CERT_NONE + + +@pytest.mark.asyncio +@pytest.mark.usefixtures("inject_truststore") +async def test_urllib3_works_with_inject(server: Server) -> None: + def test_urllib3(): + with urllib3.PoolManager() as client: + resp = client.request("GET", server.base_url) + assert resp.status == 200 + + thread = asyncio.to_thread(test_urllib3) + await thread + + +@pytest.mark.asyncio +async def test_aiohttp_works_with_inject(server: Server) -> None: + # We completely isolate the requests module because + # pytest or some other part of our test infra is messing + # with the order it's loaded into modules. + script = str(pathlib.Path(__file__).parent / "aiohttp_with_inject.py") + proc = await asyncio.create_subprocess_exec(sys.executable, script) + await proc.wait() + assert proc.returncode == 200 + + +@pytest.mark.asyncio +async def test_requests_works_with_inject(server: Server) -> None: + # We completely isolate the requests module because + # pytest or some other part of our test infra is messing + # with the order it's loaded into modules. + script = str(pathlib.Path(__file__).parent / "requests_with_inject.py") + proc = await asyncio.create_subprocess_exec(sys.executable, script) + await proc.wait() + assert proc.returncode == 200 + + +@pytest.mark.asyncio +@pytest.mark.usefixtures("inject_truststore") +async def test_sync_httpx_works_with_inject(server: Server) -> None: + def test_httpx(): + with httpx.Client() as client: + resp = client.request("GET", server.base_url) + assert resp.status_code == 200 + + thread = asyncio.to_thread(test_httpx) + await thread + + +@pytest.mark.usefixtures("inject_truststore") +@pytest.mark.asyncio +async def test_async_httpx_works_with_inject(server: Server) -> None: + async with httpx.AsyncClient() as client: + resp = await client.request("GET", server.base_url) + assert resp.status_code == 200 diff --git a/miniconda3/pkgs/truststore-0.10.1-py313h06a4308_1/info/test/tests/test_sslcontext.py b/miniconda3/pkgs/truststore-0.10.1-py313h06a4308_1/info/test/tests/test_sslcontext.py new file mode 100644 index 0000000000000000000000000000000000000000..25f430efaf24638f556fdc7544521efba6deff72 --- /dev/null +++ b/miniconda3/pkgs/truststore-0.10.1-py313h06a4308_1/info/test/tests/test_sslcontext.py @@ -0,0 +1,57 @@ +import json +import ssl + +import pytest +import urllib3 +from urllib3.exceptions import InsecureRequestWarning, SSLError + +import truststore + + +@pytest.mark.internet +def test_minimum_maximum_version(): + ctx = truststore.SSLContext(ssl.PROTOCOL_TLS_CLIENT) + ctx.maximum_version = ssl.TLSVersion.TLSv1_2 + + with urllib3.PoolManager(ssl_context=ctx) as http: + resp = http.request("GET", "https://howsmyssl.com/a/check") + data = json.loads(resp.data) + assert data["tls_version"] == "TLS 1.2" + + assert ctx.minimum_version in ( + ssl.TLSVersion.TLSv1_2, + ssl.TLSVersion.MINIMUM_SUPPORTED, + ) + assert ctx.maximum_version == ssl.TLSVersion.TLSv1_2 + + +@pytest.mark.internet +def test_check_hostname_false(): + ctx = truststore.SSLContext(ssl.PROTOCOL_TLS_CLIENT) + assert ctx.check_hostname is True + assert ctx.verify_mode == ssl.CERT_REQUIRED + + with urllib3.PoolManager(ssl_context=ctx, retries=False) as http: + with pytest.raises(SSLError) as e: + http.request("GET", "https://wrong.host.badssl.com/") + assert "match" in str(e.value) + + +@pytest.mark.internet +def test_verify_mode_cert_none(): + ctx = truststore.SSLContext(ssl.PROTOCOL_TLS_CLIENT) + assert ctx.check_hostname is True + assert ctx.verify_mode == ssl.CERT_REQUIRED + + ctx.check_hostname = False + ctx.verify_mode = ssl.CERT_NONE + + assert ctx.check_hostname is False + assert ctx.verify_mode == ssl.CERT_NONE + + with ( + urllib3.PoolManager(ssl_context=ctx) as http, + pytest.warns(InsecureRequestWarning) as w, + ): + http.request("GET", "https://expired.badssl.com/") + assert len(w) == 1 diff --git a/miniconda3/pkgs/truststore-0.10.1-py313h06a4308_1/lib/python3.13/site-packages/truststore-0.10.1.dist-info/INSTALLER b/miniconda3/pkgs/truststore-0.10.1-py313h06a4308_1/lib/python3.13/site-packages/truststore-0.10.1.dist-info/INSTALLER new file mode 100644 index 0000000000000000000000000000000000000000..f79e4cb9aaf0b2d9e8ba78861e2071317b2384b3 --- /dev/null +++ b/miniconda3/pkgs/truststore-0.10.1-py313h06a4308_1/lib/python3.13/site-packages/truststore-0.10.1.dist-info/INSTALLER @@ -0,0 +1 @@ +conda \ No newline at end of file diff --git a/miniconda3/pkgs/truststore-0.10.1-py313h06a4308_1/lib/python3.13/site-packages/truststore-0.10.1.dist-info/METADATA b/miniconda3/pkgs/truststore-0.10.1-py313h06a4308_1/lib/python3.13/site-packages/truststore-0.10.1.dist-info/METADATA new file mode 100644 index 0000000000000000000000000000000000000000..ac7c35fff2293d954e8662b5181475d5e3f04e1a --- /dev/null +++ b/miniconda3/pkgs/truststore-0.10.1-py313h06a4308_1/lib/python3.13/site-packages/truststore-0.10.1.dist-info/METADATA @@ -0,0 +1,108 @@ +Metadata-Version: 2.4 +Name: truststore +Version: 0.10.1 +Summary: Verify certificates using native system trust stores +Author-email: Seth Michael Larson , David Glick +Requires-Python: >= 3.10 +Description-Content-Type: text/markdown +Classifier: Development Status :: 5 - Production/Stable +Classifier: Intended Audience :: Developers +Classifier: License :: OSI Approved :: MIT License +Classifier: Operating System :: MacOS +Classifier: Operating System :: Microsoft +Classifier: Programming Language :: Python :: 3 +Classifier: Programming Language :: Python :: 3 :: Only +Classifier: Programming Language :: Python :: 3.10 +Classifier: Programming Language :: Python :: 3.11 +Classifier: Programming Language :: Python :: 3.12 +Classifier: Programming Language :: Python :: 3.13 +Classifier: Programming Language :: Python :: Implementation :: CPython +Classifier: Programming Language :: Python :: Implementation :: PyPy +License-File: LICENSE +Project-URL: Documentation, https://truststore.readthedocs.io +Project-URL: Source, https://github.com/sethmlarson/truststore + +# Truststore + +[![PyPI](https://img.shields.io/pypi/v/truststore)](https://pypi.org/project/truststore) +[![CI](https://github.com/sethmlarson/truststore/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/sethmlarson/truststore/actions/workflows/ci.yml) + +Truststore is a library which exposes native system certificate stores (ie "trust stores") +through an `ssl.SSLContext`-like API. This means that Python applications no longer need to +rely on certifi as a root certificate store. Native system certificate stores +have many helpful features compared to a static certificate bundle like certifi: + +- Automatically update certificates as new CAs are created and removed +- Fetch missing intermediate certificates +- Check certificates against certificate revocation lists (CRLs) to avoid monster-in-the-middle (MITM) attacks +- Managed per-system rather than per-application by a operations/IT team +- PyPI is no longer a CA distribution channel 🄳 + +Right now truststore is a stand-alone library that can be installed globally in your +application to immediately take advantage of the benefits in Python 3.10+. Truststore +has also been integrated into pip 24.2+ as the default method for verifying HTTPS +certificates (with a fallback to certifi). + +Long-term the hope is to add this functionality into Python itself. Wish us luck! + +## Installation + +Truststore is installed from [PyPI](https://pypi.org/project/truststore) with pip: + +```{code-block} shell +$ python -m pip install truststore +``` + +Truststore **requires Python 3.10 or later** and supports the following platforms: +- macOS 10.8+ via [Security framework](https://developer.apple.com/documentation/security) +- Windows via [CryptoAPI](https://docs.microsoft.com/en-us/windows/win32/seccrypto/cryptography-functions#certificate-verification-functions) +- Linux via OpenSSL + +## User Guide + +> **Warning** +> **PLEASE READ:** `inject_into_ssl()` **must not be used by libraries or packages** as it will cause issues on import time when integrated with other libraries. +> Libraries and packages should instead use `truststore.SSLContext` directly which is detailed below. +> +> The `inject_into_ssl()` function is intended only for use in applications and scripts. + +You can inject `truststore` into the standard library `ssl` module so the functionality is used +by every library by default. To do so use the `truststore.inject_into_ssl()` function: + +```python +import truststore +truststore.inject_into_ssl() + +# Automatically works with urllib3, requests, aiohttp, and more: +import urllib3 +http = urllib3.PoolManager() +resp = http.request("GET", "https://example.com") + +import aiohttp +http = aiohttp.ClientSession() +resp = await http.request("GET", "https://example.com") + +import requests +resp = requests.get("https://example.com") +``` + +If you'd like finer-grained control or you're developing a library or package you can create your own `truststore.SSLContext` instance +and use it anywhere you'd use an `ssl.SSLContext`: + +```python +import ssl +import truststore + +ctx = truststore.SSLContext(ssl.PROTOCOL_TLS_CLIENT) + +import urllib3 +http = urllib3.PoolManager(ssl_context=ctx) +resp = http.request("GET", "https://example.com") +``` + +You can read more in the [user guide in the documentation](https://truststore.readthedocs.io/en/latest/#user-guide). + +## License + +MIT + diff --git a/miniconda3/pkgs/truststore-0.10.1-py313h06a4308_1/lib/python3.13/site-packages/truststore-0.10.1.dist-info/RECORD b/miniconda3/pkgs/truststore-0.10.1-py313h06a4308_1/lib/python3.13/site-packages/truststore-0.10.1.dist-info/RECORD new file mode 100644 index 0000000000000000000000000000000000000000..25ed1f5f0f855cbeae9d3b7be7a859e8b4dab830 --- /dev/null +++ b/miniconda3/pkgs/truststore-0.10.1-py313h06a4308_1/lib/python3.13/site-packages/truststore-0.10.1.dist-info/RECORD @@ -0,0 +1,20 @@ +truststore-0.10.1.dist-info/INSTALLER,sha256=zuuue4knoyJ-UwPPXg8fezS7VCrXJQrAP7zeNuwvFQg,4 +truststore-0.10.1.dist-info/METADATA,sha256=0nlo9EfNEony3fk32LMiWsERVkMgVdvgj51VtgBpCe0,4440 +truststore-0.10.1.dist-info/RECORD,, +truststore-0.10.1.dist-info/REQUESTED,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0 +truststore-0.10.1.dist-info/WHEEL,sha256=G2gURzTEtmeR8nrdXUJfNiB3VYVxigPQ-bEQujpNiNs,82 +truststore-0.10.1.dist-info/direct_url.json,sha256=wrt3bKzF7x3AnGwhG3OKDdXtJEqiT3zaHbc8M1jvCAI,100 +truststore-0.10.1.dist-info/licenses/LICENSE,sha256=M757fo-k_Rmxdg4ajtimaL2rhSyRtpLdQUJLy3Jan8o,1086 +truststore/__init__.py,sha256=2wRSVijjRzPLVXUzWqvdZLNsEOhDfopKLd2EKAYLwKU,1320 +truststore/__pycache__/__init__.cpython-313.pyc,, +truststore/__pycache__/_api.cpython-313.pyc,, +truststore/__pycache__/_macos.cpython-313.pyc,, +truststore/__pycache__/_openssl.cpython-313.pyc,, +truststore/__pycache__/_ssl_constants.cpython-313.pyc,, +truststore/__pycache__/_windows.cpython-313.pyc,, +truststore/_api.py,sha256=rmokjVCNC1mFZZOkumE-mrpSA-kbhZfPINd50bxtdgE,11172 +truststore/_macos.py,sha256=nZlLkOmszUE0g6ryRwBVGY5COzPyudcsiJtDWarM5LQ,20503 +truststore/_openssl.py,sha256=LLUZ7ZGaio-i5dpKKjKCSeSufmn6T8pi9lDcFnvSyq0,2324 +truststore/_ssl_constants.py,sha256=NUD4fVKdSD02ri7-db0tnO0VqLP9aHuzmStcW7tAl08,1130 +truststore/_windows.py,sha256=rAHyKYD8M7t-bXfG8VgOVa3TpfhVhbt4rZQlO45YuP8,17993 +truststore/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0 diff --git a/miniconda3/pkgs/truststore-0.10.1-py313h06a4308_1/lib/python3.13/site-packages/truststore-0.10.1.dist-info/REQUESTED b/miniconda3/pkgs/truststore-0.10.1-py313h06a4308_1/lib/python3.13/site-packages/truststore-0.10.1.dist-info/REQUESTED new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/miniconda3/pkgs/truststore-0.10.1-py313h06a4308_1/lib/python3.13/site-packages/truststore-0.10.1.dist-info/WHEEL b/miniconda3/pkgs/truststore-0.10.1-py313h06a4308_1/lib/python3.13/site-packages/truststore-0.10.1.dist-info/WHEEL new file mode 100644 index 0000000000000000000000000000000000000000..d8b9936dad9ab2513fa6979f411560d3b6b57e37 --- /dev/null +++ b/miniconda3/pkgs/truststore-0.10.1-py313h06a4308_1/lib/python3.13/site-packages/truststore-0.10.1.dist-info/WHEEL @@ -0,0 +1,4 @@ +Wheel-Version: 1.0 +Generator: flit 3.12.0 +Root-Is-Purelib: true +Tag: py3-none-any diff --git a/miniconda3/pkgs/truststore-0.10.1-py313h06a4308_1/lib/python3.13/site-packages/truststore-0.10.1.dist-info/direct_url.json b/miniconda3/pkgs/truststore-0.10.1-py313h06a4308_1/lib/python3.13/site-packages/truststore-0.10.1.dist-info/direct_url.json new file mode 100644 index 0000000000000000000000000000000000000000..9610f0217701df7052b130ef151023b47da329e0 --- /dev/null +++ b/miniconda3/pkgs/truststore-0.10.1-py313h06a4308_1/lib/python3.13/site-packages/truststore-0.10.1.dist-info/direct_url.json @@ -0,0 +1 @@ +{"dir_info": {}, "url": "file:///home/task_176252074050774/conda-bld/truststore_1762520903993/work"} \ No newline at end of file diff --git a/miniconda3/pkgs/truststore-0.10.1-py313h06a4308_1/lib/python3.13/site-packages/truststore-0.10.1.dist-info/licenses/LICENSE b/miniconda3/pkgs/truststore-0.10.1-py313h06a4308_1/lib/python3.13/site-packages/truststore-0.10.1.dist-info/licenses/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..7ec568c1136eb8ec86aa05cf7abacfb54c3e5ead --- /dev/null +++ b/miniconda3/pkgs/truststore-0.10.1-py313h06a4308_1/lib/python3.13/site-packages/truststore-0.10.1.dist-info/licenses/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2022 Seth Michael Larson + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/miniconda3/pkgs/truststore-0.10.1-py313h06a4308_1/lib/python3.13/site-packages/truststore/__init__.py b/miniconda3/pkgs/truststore-0.10.1-py313h06a4308_1/lib/python3.13/site-packages/truststore/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..cdff8143febe66827f390399654b44701db496ae --- /dev/null +++ b/miniconda3/pkgs/truststore-0.10.1-py313h06a4308_1/lib/python3.13/site-packages/truststore/__init__.py @@ -0,0 +1,36 @@ +"""Verify certificates using native system trust stores""" + +import sys as _sys + +if _sys.version_info < (3, 10): + raise ImportError("truststore requires Python 3.10 or later") + +# Detect Python runtimes which don't implement SSLObject.get_unverified_chain() API +# This API only became public in Python 3.13 but was available in CPython and PyPy since 3.10. +if _sys.version_info < (3, 13) and _sys.implementation.name not in ("cpython", "pypy"): + try: + import ssl as _ssl + except ImportError: + raise ImportError("truststore requires the 'ssl' module") + else: + _sslmem = _ssl.MemoryBIO() + _sslobj = _ssl.create_default_context().wrap_bio( + _sslmem, + _sslmem, + ) + try: + while not hasattr(_sslobj, "get_unverified_chain"): + _sslobj = _sslobj._sslobj # type: ignore[attr-defined] + except AttributeError: + raise ImportError( + "truststore requires peer certificate chain APIs to be available" + ) from None + + del _ssl, _sslobj, _sslmem # noqa: F821 + +from ._api import SSLContext, extract_from_ssl, inject_into_ssl # noqa: E402 + +del _api, _sys # type: ignore[name-defined] # noqa: F821 + +__all__ = ["SSLContext", "inject_into_ssl", "extract_from_ssl"] +__version__ = "0.10.1" diff --git a/miniconda3/pkgs/truststore-0.10.1-py313h06a4308_1/lib/python3.13/site-packages/truststore/_api.py b/miniconda3/pkgs/truststore-0.10.1-py313h06a4308_1/lib/python3.13/site-packages/truststore/_api.py new file mode 100644 index 0000000000000000000000000000000000000000..47b7a63aba8940392f414150a197c6e3fb8047ec --- /dev/null +++ b/miniconda3/pkgs/truststore-0.10.1-py313h06a4308_1/lib/python3.13/site-packages/truststore/_api.py @@ -0,0 +1,333 @@ +import os +import platform +import socket +import ssl +import sys +import typing + +import _ssl + +from ._ssl_constants import ( + _original_SSLContext, + _original_super_SSLContext, + _truststore_SSLContext_dunder_class, + _truststore_SSLContext_super_class, +) + +if platform.system() == "Windows": + from ._windows import _configure_context, _verify_peercerts_impl +elif platform.system() == "Darwin": + from ._macos import _configure_context, _verify_peercerts_impl +else: + from ._openssl import _configure_context, _verify_peercerts_impl + +if typing.TYPE_CHECKING: + from typing_extensions import Buffer + +# From typeshed/stdlib/ssl.pyi +_StrOrBytesPath: typing.TypeAlias = str | bytes | os.PathLike[str] | os.PathLike[bytes] +_PasswordType: typing.TypeAlias = str | bytes | typing.Callable[[], str | bytes] + + +def inject_into_ssl() -> None: + """Injects the :class:`truststore.SSLContext` into the ``ssl`` + module by replacing :class:`ssl.SSLContext`. + """ + setattr(ssl, "SSLContext", SSLContext) + # urllib3 holds on to its own reference of ssl.SSLContext + # so we need to replace that reference too. + try: + import urllib3.util.ssl_ as urllib3_ssl + + setattr(urllib3_ssl, "SSLContext", SSLContext) + except ImportError: + pass + + # requests starting with 2.32.0 added a preloaded SSL context to improve concurrent performance; + # this unfortunately leads to a RecursionError, which can be avoided by patching the preloaded SSL context with + # the truststore patched instance + # also see https://github.com/psf/requests/pull/6667 + try: + import requests.adapters + + preloaded_context = getattr(requests.adapters, "_preloaded_ssl_context", None) + if preloaded_context is not None: + setattr( + requests.adapters, + "_preloaded_ssl_context", + SSLContext(ssl.PROTOCOL_TLS_CLIENT), + ) + except ImportError: + pass + + +def extract_from_ssl() -> None: + """Restores the :class:`ssl.SSLContext` class to its original state""" + setattr(ssl, "SSLContext", _original_SSLContext) + try: + import urllib3.util.ssl_ as urllib3_ssl + + urllib3_ssl.SSLContext = _original_SSLContext # type: ignore[assignment] + except ImportError: + pass + + +class SSLContext(_truststore_SSLContext_super_class): # type: ignore[misc] + """SSLContext API that uses system certificates on all platforms""" + + @property # type: ignore[misc] + def __class__(self) -> type: + # Dirty hack to get around isinstance() checks + # for ssl.SSLContext instances in aiohttp/trustme + # when using non-CPython implementations. + return _truststore_SSLContext_dunder_class or SSLContext + + def __init__(self, protocol: int = None) -> None: # type: ignore[assignment] + self._ctx = _original_SSLContext(protocol) + + class TruststoreSSLObject(ssl.SSLObject): + # This object exists because wrap_bio() doesn't + # immediately do the handshake so we need to do + # certificate verifications after SSLObject.do_handshake() + + def do_handshake(self) -> None: + ret = super().do_handshake() + _verify_peercerts(self, server_hostname=self.server_hostname) + return ret + + self._ctx.sslobject_class = TruststoreSSLObject + + def wrap_socket( + self, + sock: socket.socket, + server_side: bool = False, + do_handshake_on_connect: bool = True, + suppress_ragged_eofs: bool = True, + server_hostname: str | None = None, + session: ssl.SSLSession | None = None, + ) -> ssl.SSLSocket: + # Use a context manager here because the + # inner SSLContext holds on to our state + # but also does the actual handshake. + with _configure_context(self._ctx): + ssl_sock = self._ctx.wrap_socket( + sock, + server_side=server_side, + server_hostname=server_hostname, + do_handshake_on_connect=do_handshake_on_connect, + suppress_ragged_eofs=suppress_ragged_eofs, + session=session, + ) + try: + _verify_peercerts(ssl_sock, server_hostname=server_hostname) + except Exception: + ssl_sock.close() + raise + return ssl_sock + + def wrap_bio( + self, + incoming: ssl.MemoryBIO, + outgoing: ssl.MemoryBIO, + server_side: bool = False, + server_hostname: str | None = None, + session: ssl.SSLSession | None = None, + ) -> ssl.SSLObject: + with _configure_context(self._ctx): + ssl_obj = self._ctx.wrap_bio( + incoming, + outgoing, + server_hostname=server_hostname, + server_side=server_side, + session=session, + ) + return ssl_obj + + def load_verify_locations( + self, + cafile: str | bytes | os.PathLike[str] | os.PathLike[bytes] | None = None, + capath: str | bytes | os.PathLike[str] | os.PathLike[bytes] | None = None, + cadata: typing.Union[str, "Buffer", None] = None, + ) -> None: + return self._ctx.load_verify_locations( + cafile=cafile, capath=capath, cadata=cadata + ) + + def load_cert_chain( + self, + certfile: _StrOrBytesPath, + keyfile: _StrOrBytesPath | None = None, + password: _PasswordType | None = None, + ) -> None: + return self._ctx.load_cert_chain( + certfile=certfile, keyfile=keyfile, password=password + ) + + def load_default_certs( + self, purpose: ssl.Purpose = ssl.Purpose.SERVER_AUTH + ) -> None: + return self._ctx.load_default_certs(purpose) + + def set_alpn_protocols(self, alpn_protocols: typing.Iterable[str]) -> None: + return self._ctx.set_alpn_protocols(alpn_protocols) + + def set_npn_protocols(self, npn_protocols: typing.Iterable[str]) -> None: + return self._ctx.set_npn_protocols(npn_protocols) + + def set_ciphers(self, __cipherlist: str) -> None: + return self._ctx.set_ciphers(__cipherlist) + + def get_ciphers(self) -> typing.Any: + return self._ctx.get_ciphers() + + def session_stats(self) -> dict[str, int]: + return self._ctx.session_stats() + + def cert_store_stats(self) -> dict[str, int]: + raise NotImplementedError() + + def set_default_verify_paths(self) -> None: + self._ctx.set_default_verify_paths() + + @typing.overload + def get_ca_certs( + self, binary_form: typing.Literal[False] = ... + ) -> list[typing.Any]: ... + + @typing.overload + def get_ca_certs(self, binary_form: typing.Literal[True] = ...) -> list[bytes]: ... + + @typing.overload + def get_ca_certs(self, binary_form: bool = ...) -> typing.Any: ... + + def get_ca_certs(self, binary_form: bool = False) -> list[typing.Any] | list[bytes]: + raise NotImplementedError() + + @property + def check_hostname(self) -> bool: + return self._ctx.check_hostname + + @check_hostname.setter + def check_hostname(self, value: bool) -> None: + self._ctx.check_hostname = value + + @property + def hostname_checks_common_name(self) -> bool: + return self._ctx.hostname_checks_common_name + + @hostname_checks_common_name.setter + def hostname_checks_common_name(self, value: bool) -> None: + self._ctx.hostname_checks_common_name = value + + @property + def keylog_filename(self) -> str: + return self._ctx.keylog_filename + + @keylog_filename.setter + def keylog_filename(self, value: str) -> None: + self._ctx.keylog_filename = value + + @property + def maximum_version(self) -> ssl.TLSVersion: + return self._ctx.maximum_version + + @maximum_version.setter + def maximum_version(self, value: ssl.TLSVersion) -> None: + _original_super_SSLContext.maximum_version.__set__( # type: ignore[attr-defined] + self._ctx, value + ) + + @property + def minimum_version(self) -> ssl.TLSVersion: + return self._ctx.minimum_version + + @minimum_version.setter + def minimum_version(self, value: ssl.TLSVersion) -> None: + _original_super_SSLContext.minimum_version.__set__( # type: ignore[attr-defined] + self._ctx, value + ) + + @property + def options(self) -> ssl.Options: + return self._ctx.options + + @options.setter + def options(self, value: ssl.Options) -> None: + _original_super_SSLContext.options.__set__( # type: ignore[attr-defined] + self._ctx, value + ) + + @property + def post_handshake_auth(self) -> bool: + return self._ctx.post_handshake_auth + + @post_handshake_auth.setter + def post_handshake_auth(self, value: bool) -> None: + self._ctx.post_handshake_auth = value + + @property + def protocol(self) -> ssl._SSLMethod: + return self._ctx.protocol + + @property + def security_level(self) -> int: + return self._ctx.security_level + + @property + def verify_flags(self) -> ssl.VerifyFlags: + return self._ctx.verify_flags + + @verify_flags.setter + def verify_flags(self, value: ssl.VerifyFlags) -> None: + _original_super_SSLContext.verify_flags.__set__( # type: ignore[attr-defined] + self._ctx, value + ) + + @property + def verify_mode(self) -> ssl.VerifyMode: + return self._ctx.verify_mode + + @verify_mode.setter + def verify_mode(self, value: ssl.VerifyMode) -> None: + _original_super_SSLContext.verify_mode.__set__( # type: ignore[attr-defined] + self._ctx, value + ) + + +# Python 3.13+ makes get_unverified_chain() a public API that only returns DER +# encoded certificates. We detect whether we need to call public_bytes() for 3.10->3.12 +# Pre-3.13 returned None instead of an empty list from get_unverified_chain() +if sys.version_info >= (3, 13): + + def _get_unverified_chain_bytes(sslobj: ssl.SSLObject) -> list[bytes]: + unverified_chain = sslobj.get_unverified_chain() or () # type: ignore[attr-defined] + return [ + cert if isinstance(cert, bytes) else cert.public_bytes(_ssl.ENCODING_DER) + for cert in unverified_chain + ] + +else: + + def _get_unverified_chain_bytes(sslobj: ssl.SSLObject) -> list[bytes]: + unverified_chain = sslobj.get_unverified_chain() or () # type: ignore[attr-defined] + return [cert.public_bytes(_ssl.ENCODING_DER) for cert in unverified_chain] + + +def _verify_peercerts( + sock_or_sslobj: ssl.SSLSocket | ssl.SSLObject, server_hostname: str | None +) -> None: + """ + Verifies the peer certificates from an SSLSocket or SSLObject + against the certificates in the OS trust store. + """ + sslobj: ssl.SSLObject = sock_or_sslobj # type: ignore[assignment] + try: + while not hasattr(sslobj, "get_unverified_chain"): + sslobj = sslobj._sslobj # type: ignore[attr-defined] + except AttributeError: + pass + + cert_bytes = _get_unverified_chain_bytes(sslobj) + _verify_peercerts_impl( + sock_or_sslobj.context, cert_bytes, server_hostname=server_hostname + ) diff --git a/miniconda3/pkgs/truststore-0.10.1-py313h06a4308_1/lib/python3.13/site-packages/truststore/_macos.py b/miniconda3/pkgs/truststore-0.10.1-py313h06a4308_1/lib/python3.13/site-packages/truststore/_macos.py new file mode 100644 index 0000000000000000000000000000000000000000..345030772441102eda1be73661469a5f726d668a --- /dev/null +++ b/miniconda3/pkgs/truststore-0.10.1-py313h06a4308_1/lib/python3.13/site-packages/truststore/_macos.py @@ -0,0 +1,571 @@ +import contextlib +import ctypes +import platform +import ssl +import typing +from ctypes import ( + CDLL, + POINTER, + c_bool, + c_char_p, + c_int32, + c_long, + c_uint32, + c_ulong, + c_void_p, +) +from ctypes.util import find_library + +from ._ssl_constants import _set_ssl_context_verify_mode + +_mac_version = platform.mac_ver()[0] +_mac_version_info = tuple(map(int, _mac_version.split("."))) +if _mac_version_info < (10, 8): + raise ImportError( + f"Only OS X 10.8 and newer are supported, not {_mac_version_info[0]}.{_mac_version_info[1]}" + ) + +_is_macos_version_10_14_or_later = _mac_version_info >= (10, 14) + + +def _load_cdll(name: str, macos10_16_path: str) -> CDLL: + """Loads a CDLL by name, falling back to known path on 10.16+""" + try: + # Big Sur is technically 11 but we use 10.16 due to the Big Sur + # beta being labeled as 10.16. + path: str | None + if _mac_version_info >= (10, 16): + path = macos10_16_path + else: + path = find_library(name) + if not path: + raise OSError # Caught and reraised as 'ImportError' + return CDLL(path, use_errno=True) + except OSError: + raise ImportError(f"The library {name} failed to load") from None + + +Security = _load_cdll( + "Security", "/System/Library/Frameworks/Security.framework/Security" +) +CoreFoundation = _load_cdll( + "CoreFoundation", + "/System/Library/Frameworks/CoreFoundation.framework/CoreFoundation", +) + +Boolean = c_bool +CFIndex = c_long +CFStringEncoding = c_uint32 +CFData = c_void_p +CFString = c_void_p +CFArray = c_void_p +CFMutableArray = c_void_p +CFError = c_void_p +CFType = c_void_p +CFTypeID = c_ulong +CFTypeRef = POINTER(CFType) +CFAllocatorRef = c_void_p + +OSStatus = c_int32 + +CFErrorRef = POINTER(CFError) +CFDataRef = POINTER(CFData) +CFStringRef = POINTER(CFString) +CFArrayRef = POINTER(CFArray) +CFMutableArrayRef = POINTER(CFMutableArray) +CFArrayCallBacks = c_void_p +CFOptionFlags = c_uint32 + +SecCertificateRef = POINTER(c_void_p) +SecPolicyRef = POINTER(c_void_p) +SecTrustRef = POINTER(c_void_p) +SecTrustResultType = c_uint32 +SecTrustOptionFlags = c_uint32 + +try: + Security.SecCertificateCreateWithData.argtypes = [CFAllocatorRef, CFDataRef] + Security.SecCertificateCreateWithData.restype = SecCertificateRef + + Security.SecCertificateCopyData.argtypes = [SecCertificateRef] + Security.SecCertificateCopyData.restype = CFDataRef + + Security.SecCopyErrorMessageString.argtypes = [OSStatus, c_void_p] + Security.SecCopyErrorMessageString.restype = CFStringRef + + Security.SecTrustSetAnchorCertificates.argtypes = [SecTrustRef, CFArrayRef] + Security.SecTrustSetAnchorCertificates.restype = OSStatus + + Security.SecTrustSetAnchorCertificatesOnly.argtypes = [SecTrustRef, Boolean] + Security.SecTrustSetAnchorCertificatesOnly.restype = OSStatus + + Security.SecPolicyCreateRevocation.argtypes = [CFOptionFlags] + Security.SecPolicyCreateRevocation.restype = SecPolicyRef + + Security.SecPolicyCreateSSL.argtypes = [Boolean, CFStringRef] + Security.SecPolicyCreateSSL.restype = SecPolicyRef + + Security.SecTrustCreateWithCertificates.argtypes = [ + CFTypeRef, + CFTypeRef, + POINTER(SecTrustRef), + ] + Security.SecTrustCreateWithCertificates.restype = OSStatus + + Security.SecTrustGetTrustResult.argtypes = [ + SecTrustRef, + POINTER(SecTrustResultType), + ] + Security.SecTrustGetTrustResult.restype = OSStatus + + Security.SecTrustEvaluate.argtypes = [ + SecTrustRef, + POINTER(SecTrustResultType), + ] + Security.SecTrustEvaluate.restype = OSStatus + + Security.SecTrustRef = SecTrustRef # type: ignore[attr-defined] + Security.SecTrustResultType = SecTrustResultType # type: ignore[attr-defined] + Security.OSStatus = OSStatus # type: ignore[attr-defined] + + kSecRevocationUseAnyAvailableMethod = 3 + kSecRevocationRequirePositiveResponse = 8 + + CoreFoundation.CFRelease.argtypes = [CFTypeRef] + CoreFoundation.CFRelease.restype = None + + CoreFoundation.CFGetTypeID.argtypes = [CFTypeRef] + CoreFoundation.CFGetTypeID.restype = CFTypeID + + CoreFoundation.CFStringCreateWithCString.argtypes = [ + CFAllocatorRef, + c_char_p, + CFStringEncoding, + ] + CoreFoundation.CFStringCreateWithCString.restype = CFStringRef + + CoreFoundation.CFStringGetCStringPtr.argtypes = [CFStringRef, CFStringEncoding] + CoreFoundation.CFStringGetCStringPtr.restype = c_char_p + + CoreFoundation.CFStringGetCString.argtypes = [ + CFStringRef, + c_char_p, + CFIndex, + CFStringEncoding, + ] + CoreFoundation.CFStringGetCString.restype = c_bool + + CoreFoundation.CFDataCreate.argtypes = [CFAllocatorRef, c_char_p, CFIndex] + CoreFoundation.CFDataCreate.restype = CFDataRef + + CoreFoundation.CFDataGetLength.argtypes = [CFDataRef] + CoreFoundation.CFDataGetLength.restype = CFIndex + + CoreFoundation.CFDataGetBytePtr.argtypes = [CFDataRef] + CoreFoundation.CFDataGetBytePtr.restype = c_void_p + + CoreFoundation.CFArrayCreate.argtypes = [ + CFAllocatorRef, + POINTER(CFTypeRef), + CFIndex, + CFArrayCallBacks, + ] + CoreFoundation.CFArrayCreate.restype = CFArrayRef + + CoreFoundation.CFArrayCreateMutable.argtypes = [ + CFAllocatorRef, + CFIndex, + CFArrayCallBacks, + ] + CoreFoundation.CFArrayCreateMutable.restype = CFMutableArrayRef + + CoreFoundation.CFArrayAppendValue.argtypes = [CFMutableArrayRef, c_void_p] + CoreFoundation.CFArrayAppendValue.restype = None + + CoreFoundation.CFArrayGetCount.argtypes = [CFArrayRef] + CoreFoundation.CFArrayGetCount.restype = CFIndex + + CoreFoundation.CFArrayGetValueAtIndex.argtypes = [CFArrayRef, CFIndex] + CoreFoundation.CFArrayGetValueAtIndex.restype = c_void_p + + CoreFoundation.CFErrorGetCode.argtypes = [CFErrorRef] + CoreFoundation.CFErrorGetCode.restype = CFIndex + + CoreFoundation.CFErrorCopyDescription.argtypes = [CFErrorRef] + CoreFoundation.CFErrorCopyDescription.restype = CFStringRef + + CoreFoundation.kCFAllocatorDefault = CFAllocatorRef.in_dll( # type: ignore[attr-defined] + CoreFoundation, "kCFAllocatorDefault" + ) + CoreFoundation.kCFTypeArrayCallBacks = c_void_p.in_dll( # type: ignore[attr-defined] + CoreFoundation, "kCFTypeArrayCallBacks" + ) + + CoreFoundation.CFTypeRef = CFTypeRef # type: ignore[attr-defined] + CoreFoundation.CFArrayRef = CFArrayRef # type: ignore[attr-defined] + CoreFoundation.CFStringRef = CFStringRef # type: ignore[attr-defined] + CoreFoundation.CFErrorRef = CFErrorRef # type: ignore[attr-defined] + +except AttributeError as e: + raise ImportError(f"Error initializing ctypes: {e}") from None + +# SecTrustEvaluateWithError is macOS 10.14+ +if _is_macos_version_10_14_or_later: + try: + Security.SecTrustEvaluateWithError.argtypes = [ + SecTrustRef, + POINTER(CFErrorRef), + ] + Security.SecTrustEvaluateWithError.restype = c_bool + except AttributeError as e: + raise ImportError(f"Error initializing ctypes: {e}") from None + + +def _handle_osstatus(result: OSStatus, _: typing.Any, args: typing.Any) -> typing.Any: + """ + Raises an error if the OSStatus value is non-zero. + """ + if int(result) == 0: + return args + + # Returns a CFString which we need to transform + # into a UTF-8 Python string. + error_message_cfstring = None + try: + error_message_cfstring = Security.SecCopyErrorMessageString(result, None) + + # First step is convert the CFString into a C string pointer. + # We try the fast no-copy way first. + error_message_cfstring_c_void_p = ctypes.cast( + error_message_cfstring, ctypes.POINTER(ctypes.c_void_p) + ) + message = CoreFoundation.CFStringGetCStringPtr( + error_message_cfstring_c_void_p, CFConst.kCFStringEncodingUTF8 + ) + + # Quoting the Apple dev docs: + # + # "A pointer to a C string or NULL if the internal + # storage of theString does not allow this to be + # returned efficiently." + # + # So we need to get our hands dirty. + if message is None: + buffer = ctypes.create_string_buffer(1024) + result = CoreFoundation.CFStringGetCString( + error_message_cfstring_c_void_p, + buffer, + 1024, + CFConst.kCFStringEncodingUTF8, + ) + if not result: + raise OSError("Error copying C string from CFStringRef") + message = buffer.value + + finally: + if error_message_cfstring is not None: + CoreFoundation.CFRelease(error_message_cfstring) + + # If no message can be found for this status we come + # up with a generic one that forwards the status code. + if message is None or message == "": + message = f"SecureTransport operation returned a non-zero OSStatus: {result}" + + raise ssl.SSLError(message) + + +Security.SecTrustCreateWithCertificates.errcheck = _handle_osstatus # type: ignore[assignment] +Security.SecTrustSetAnchorCertificates.errcheck = _handle_osstatus # type: ignore[assignment] +Security.SecTrustSetAnchorCertificatesOnly.errcheck = _handle_osstatus # type: ignore[assignment] +Security.SecTrustGetTrustResult.errcheck = _handle_osstatus # type: ignore[assignment] +Security.SecTrustEvaluate.errcheck = _handle_osstatus # type: ignore[assignment] + + +class CFConst: + """CoreFoundation constants""" + + kCFStringEncodingUTF8 = CFStringEncoding(0x08000100) + + errSecIncompleteCertRevocationCheck = -67635 + errSecHostNameMismatch = -67602 + errSecCertificateExpired = -67818 + errSecNotTrusted = -67843 + + +def _bytes_to_cf_data_ref(value: bytes) -> CFDataRef: # type: ignore[valid-type] + return CoreFoundation.CFDataCreate( # type: ignore[no-any-return] + CoreFoundation.kCFAllocatorDefault, value, len(value) + ) + + +def _bytes_to_cf_string(value: bytes) -> CFString: + """ + Given a Python binary data, create a CFString. + The string must be CFReleased by the caller. + """ + c_str = ctypes.c_char_p(value) + cf_str = CoreFoundation.CFStringCreateWithCString( + CoreFoundation.kCFAllocatorDefault, + c_str, + CFConst.kCFStringEncodingUTF8, + ) + return cf_str # type: ignore[no-any-return] + + +def _cf_string_ref_to_str(cf_string_ref: CFStringRef) -> str | None: # type: ignore[valid-type] + """ + Creates a Unicode string from a CFString object. Used entirely for error + reporting. + Yes, it annoys me quite a lot that this function is this complex. + """ + + string = CoreFoundation.CFStringGetCStringPtr( + cf_string_ref, CFConst.kCFStringEncodingUTF8 + ) + if string is None: + buffer = ctypes.create_string_buffer(1024) + result = CoreFoundation.CFStringGetCString( + cf_string_ref, buffer, 1024, CFConst.kCFStringEncodingUTF8 + ) + if not result: + raise OSError("Error copying C string from CFStringRef") + string = buffer.value + if string is not None: + string = string.decode("utf-8") + return string # type: ignore[no-any-return] + + +def _der_certs_to_cf_cert_array(certs: list[bytes]) -> CFMutableArrayRef: # type: ignore[valid-type] + """Builds a CFArray of SecCertificateRefs from a list of DER-encoded certificates. + Responsibility of the caller to call CoreFoundation.CFRelease on the CFArray. + """ + cf_array = CoreFoundation.CFArrayCreateMutable( + CoreFoundation.kCFAllocatorDefault, + 0, + ctypes.byref(CoreFoundation.kCFTypeArrayCallBacks), + ) + if not cf_array: + raise MemoryError("Unable to allocate memory!") + + for cert_data in certs: + cf_data = None + sec_cert_ref = None + try: + cf_data = _bytes_to_cf_data_ref(cert_data) + sec_cert_ref = Security.SecCertificateCreateWithData( + CoreFoundation.kCFAllocatorDefault, cf_data + ) + CoreFoundation.CFArrayAppendValue(cf_array, sec_cert_ref) + finally: + if cf_data: + CoreFoundation.CFRelease(cf_data) + if sec_cert_ref: + CoreFoundation.CFRelease(sec_cert_ref) + + return cf_array # type: ignore[no-any-return] + + +@contextlib.contextmanager +def _configure_context(ctx: ssl.SSLContext) -> typing.Iterator[None]: + check_hostname = ctx.check_hostname + verify_mode = ctx.verify_mode + ctx.check_hostname = False + _set_ssl_context_verify_mode(ctx, ssl.CERT_NONE) + try: + yield + finally: + ctx.check_hostname = check_hostname + _set_ssl_context_verify_mode(ctx, verify_mode) + + +def _verify_peercerts_impl( + ssl_context: ssl.SSLContext, + cert_chain: list[bytes], + server_hostname: str | None = None, +) -> None: + certs = None + policies = None + trust = None + try: + # Only set a hostname on the policy if we're verifying the hostname + # on the leaf certificate. + if server_hostname is not None and ssl_context.check_hostname: + cf_str_hostname = None + try: + cf_str_hostname = _bytes_to_cf_string(server_hostname.encode("ascii")) + ssl_policy = Security.SecPolicyCreateSSL(True, cf_str_hostname) + finally: + if cf_str_hostname: + CoreFoundation.CFRelease(cf_str_hostname) + else: + ssl_policy = Security.SecPolicyCreateSSL(True, None) + + policies = ssl_policy + if ssl_context.verify_flags & ssl.VERIFY_CRL_CHECK_CHAIN: + # Add explicit policy requiring positive revocation checks + policies = CoreFoundation.CFArrayCreateMutable( + CoreFoundation.kCFAllocatorDefault, + 0, + ctypes.byref(CoreFoundation.kCFTypeArrayCallBacks), + ) + CoreFoundation.CFArrayAppendValue(policies, ssl_policy) + CoreFoundation.CFRelease(ssl_policy) + revocation_policy = Security.SecPolicyCreateRevocation( + kSecRevocationUseAnyAvailableMethod + | kSecRevocationRequirePositiveResponse + ) + CoreFoundation.CFArrayAppendValue(policies, revocation_policy) + CoreFoundation.CFRelease(revocation_policy) + elif ssl_context.verify_flags & ssl.VERIFY_CRL_CHECK_LEAF: + raise NotImplementedError("VERIFY_CRL_CHECK_LEAF not implemented for macOS") + + certs = None + try: + certs = _der_certs_to_cf_cert_array(cert_chain) + + # Now that we have certificates loaded and a SecPolicy + # we can finally create a SecTrust object! + trust = Security.SecTrustRef() + Security.SecTrustCreateWithCertificates( + certs, policies, ctypes.byref(trust) + ) + + finally: + # The certs are now being held by SecTrust so we can + # release our handles for the array. + if certs: + CoreFoundation.CFRelease(certs) + + # If there are additional trust anchors to load we need to transform + # the list of DER-encoded certificates into a CFArray. + ctx_ca_certs_der: list[bytes] | None = ssl_context.get_ca_certs( + binary_form=True + ) + if ctx_ca_certs_der: + ctx_ca_certs = None + try: + ctx_ca_certs = _der_certs_to_cf_cert_array(ctx_ca_certs_der) + Security.SecTrustSetAnchorCertificates(trust, ctx_ca_certs) + finally: + if ctx_ca_certs: + CoreFoundation.CFRelease(ctx_ca_certs) + + # We always want system certificates. + Security.SecTrustSetAnchorCertificatesOnly(trust, False) + + # macOS 10.13 and earlier don't support SecTrustEvaluateWithError() + # so we use SecTrustEvaluate() which means we need to construct error + # messages ourselves. + if _is_macos_version_10_14_or_later: + _verify_peercerts_impl_macos_10_14(ssl_context, trust) + else: + _verify_peercerts_impl_macos_10_13(ssl_context, trust) + finally: + if policies: + CoreFoundation.CFRelease(policies) + if trust: + CoreFoundation.CFRelease(trust) + + +def _verify_peercerts_impl_macos_10_13( + ssl_context: ssl.SSLContext, sec_trust_ref: typing.Any +) -> None: + """Verify using 'SecTrustEvaluate' API for macOS 10.13 and earlier. + macOS 10.14 added the 'SecTrustEvaluateWithError' API. + """ + sec_trust_result_type = Security.SecTrustResultType() + Security.SecTrustEvaluate(sec_trust_ref, ctypes.byref(sec_trust_result_type)) + + try: + sec_trust_result_type_as_int = int(sec_trust_result_type.value) + except (ValueError, TypeError): + sec_trust_result_type_as_int = -1 + + # Apple doesn't document these values in their own API docs. + # See: https://github.com/xybp888/iOS-SDKs/blob/master/iPhoneOS13.0.sdk/System/Library/Frameworks/Security.framework/Headers/SecTrust.h#L84 + if ( + ssl_context.verify_mode == ssl.CERT_REQUIRED + and sec_trust_result_type_as_int not in (1, 4) + ): + # Note that we're not able to ignore only hostname errors + # for macOS 10.13 and earlier, so check_hostname=False will + # still return an error. + sec_trust_result_type_to_message = { + 0: "Invalid trust result type", + # 1: "Trust evaluation succeeded", + 2: "User confirmation required", + 3: "User specified that certificate is not trusted", + # 4: "Trust result is unspecified", + 5: "Recoverable trust failure occurred", + 6: "Fatal trust failure occurred", + 7: "Other error occurred, certificate may be revoked", + } + error_message = sec_trust_result_type_to_message.get( + sec_trust_result_type_as_int, + f"Unknown trust result: {sec_trust_result_type_as_int}", + ) + + err = ssl.SSLCertVerificationError(error_message) + err.verify_message = error_message + err.verify_code = sec_trust_result_type_as_int + raise err + + +def _verify_peercerts_impl_macos_10_14( + ssl_context: ssl.SSLContext, sec_trust_ref: typing.Any +) -> None: + """Verify using 'SecTrustEvaluateWithError' API for macOS 10.14+.""" + cf_error = CoreFoundation.CFErrorRef() + sec_trust_eval_result = Security.SecTrustEvaluateWithError( + sec_trust_ref, ctypes.byref(cf_error) + ) + # sec_trust_eval_result is a bool (0 or 1) + # where 1 means that the certs are trusted. + if sec_trust_eval_result == 1: + is_trusted = True + elif sec_trust_eval_result == 0: + is_trusted = False + else: + raise ssl.SSLError( + f"Unknown result from Security.SecTrustEvaluateWithError: {sec_trust_eval_result!r}" + ) + + cf_error_code = 0 + if not is_trusted: + cf_error_code = CoreFoundation.CFErrorGetCode(cf_error) + + # If the error is a known failure that we're + # explicitly okay with from SSLContext configuration + # we can set is_trusted accordingly. + if ssl_context.verify_mode != ssl.CERT_REQUIRED and ( + cf_error_code == CFConst.errSecNotTrusted + or cf_error_code == CFConst.errSecCertificateExpired + ): + is_trusted = True + + # If we're still not trusted then we start to + # construct and raise the SSLCertVerificationError. + if not is_trusted: + cf_error_string_ref = None + try: + cf_error_string_ref = CoreFoundation.CFErrorCopyDescription(cf_error) + + # Can this ever return 'None' if there's a CFError? + cf_error_message = ( + _cf_string_ref_to_str(cf_error_string_ref) + or "Certificate verification failed" + ) + + # TODO: Not sure if we need the SecTrustResultType for anything? + # We only care whether or not it's a success or failure for now. + sec_trust_result_type = Security.SecTrustResultType() + Security.SecTrustGetTrustResult( + sec_trust_ref, ctypes.byref(sec_trust_result_type) + ) + + err = ssl.SSLCertVerificationError(cf_error_message) + err.verify_message = cf_error_message + err.verify_code = cf_error_code + raise err + finally: + if cf_error_string_ref: + CoreFoundation.CFRelease(cf_error_string_ref) diff --git a/miniconda3/pkgs/truststore-0.10.1-py313h06a4308_1/lib/python3.13/site-packages/truststore/_openssl.py b/miniconda3/pkgs/truststore-0.10.1-py313h06a4308_1/lib/python3.13/site-packages/truststore/_openssl.py new file mode 100644 index 0000000000000000000000000000000000000000..9951cf75c404b94c13a0a7b49c011b686aa1ccde --- /dev/null +++ b/miniconda3/pkgs/truststore-0.10.1-py313h06a4308_1/lib/python3.13/site-packages/truststore/_openssl.py @@ -0,0 +1,66 @@ +import contextlib +import os +import re +import ssl +import typing + +# candidates based on https://github.com/tiran/certifi-system-store by Christian Heimes +_CA_FILE_CANDIDATES = [ + # Alpine, Arch, Fedora 34+, OpenWRT, RHEL 9+, BSD + "/etc/ssl/cert.pem", + # Fedora <= 34, RHEL <= 9, CentOS <= 9 + "/etc/pki/tls/cert.pem", + # Debian, Ubuntu (requires ca-certificates) + "/etc/ssl/certs/ca-certificates.crt", + # SUSE + "/etc/ssl/ca-bundle.pem", +] + +_HASHED_CERT_FILENAME_RE = re.compile(r"^[0-9a-fA-F]{8}\.[0-9]$") + + +@contextlib.contextmanager +def _configure_context(ctx: ssl.SSLContext) -> typing.Iterator[None]: + # First, check whether the default locations from OpenSSL + # seem like they will give us a usable set of CA certs. + # ssl.get_default_verify_paths already takes care of: + # - getting cafile from either the SSL_CERT_FILE env var + # or the path configured when OpenSSL was compiled, + # and verifying that that path exists + # - getting capath from either the SSL_CERT_DIR env var + # or the path configured when OpenSSL was compiled, + # and verifying that that path exists + # In addition we'll check whether capath appears to contain certs. + defaults = ssl.get_default_verify_paths() + if defaults.cafile or (defaults.capath and _capath_contains_certs(defaults.capath)): + ctx.set_default_verify_paths() + else: + # cafile from OpenSSL doesn't exist + # and capath from OpenSSL doesn't contain certs. + # Let's search other common locations instead. + for cafile in _CA_FILE_CANDIDATES: + if os.path.isfile(cafile): + ctx.load_verify_locations(cafile=cafile) + break + + yield + + +def _capath_contains_certs(capath: str) -> bool: + """Check whether capath exists and contains certs in the expected format.""" + if not os.path.isdir(capath): + return False + for name in os.listdir(capath): + if _HASHED_CERT_FILENAME_RE.match(name): + return True + return False + + +def _verify_peercerts_impl( + ssl_context: ssl.SSLContext, + cert_chain: list[bytes], + server_hostname: str | None = None, +) -> None: + # This is a no-op because we've enabled SSLContext's built-in + # verification via verify_mode=CERT_REQUIRED, and don't need to repeat it. + pass diff --git a/miniconda3/pkgs/truststore-0.10.1-py313h06a4308_1/lib/python3.13/site-packages/truststore/_ssl_constants.py b/miniconda3/pkgs/truststore-0.10.1-py313h06a4308_1/lib/python3.13/site-packages/truststore/_ssl_constants.py new file mode 100644 index 0000000000000000000000000000000000000000..b1ee7a3cb13a8a3482f2cb8cadef097087e3780b --- /dev/null +++ b/miniconda3/pkgs/truststore-0.10.1-py313h06a4308_1/lib/python3.13/site-packages/truststore/_ssl_constants.py @@ -0,0 +1,31 @@ +import ssl +import sys +import typing + +# Hold on to the original class so we can create it consistently +# even if we inject our own SSLContext into the ssl module. +_original_SSLContext = ssl.SSLContext +_original_super_SSLContext = super(_original_SSLContext, _original_SSLContext) + +# CPython is known to be good, but non-CPython implementations +# may implement SSLContext differently so to be safe we don't +# subclass the SSLContext. + +# This is returned by truststore.SSLContext.__class__() +_truststore_SSLContext_dunder_class: typing.Optional[type] + +# This value is the superclass of truststore.SSLContext. +_truststore_SSLContext_super_class: type + +if sys.implementation.name == "cpython": + _truststore_SSLContext_super_class = _original_SSLContext + _truststore_SSLContext_dunder_class = None +else: + _truststore_SSLContext_super_class = object + _truststore_SSLContext_dunder_class = _original_SSLContext + + +def _set_ssl_context_verify_mode( + ssl_context: ssl.SSLContext, verify_mode: ssl.VerifyMode +) -> None: + _original_super_SSLContext.verify_mode.__set__(ssl_context, verify_mode) # type: ignore[attr-defined] diff --git a/miniconda3/pkgs/truststore-0.10.1-py313h06a4308_1/lib/python3.13/site-packages/truststore/_windows.py b/miniconda3/pkgs/truststore-0.10.1-py313h06a4308_1/lib/python3.13/site-packages/truststore/_windows.py new file mode 100644 index 0000000000000000000000000000000000000000..a9bf9abdfc8ed065a2253af17daa07cce4009022 --- /dev/null +++ b/miniconda3/pkgs/truststore-0.10.1-py313h06a4308_1/lib/python3.13/site-packages/truststore/_windows.py @@ -0,0 +1,567 @@ +import contextlib +import ssl +import typing +from ctypes import WinDLL # type: ignore +from ctypes import WinError # type: ignore +from ctypes import ( + POINTER, + Structure, + c_char_p, + c_ulong, + c_void_p, + c_wchar_p, + cast, + create_unicode_buffer, + pointer, + sizeof, +) +from ctypes.wintypes import ( + BOOL, + DWORD, + HANDLE, + LONG, + LPCSTR, + LPCVOID, + LPCWSTR, + LPFILETIME, + LPSTR, + LPWSTR, +) +from typing import TYPE_CHECKING, Any + +from ._ssl_constants import _set_ssl_context_verify_mode + +HCERTCHAINENGINE = HANDLE +HCERTSTORE = HANDLE +HCRYPTPROV_LEGACY = HANDLE + + +class CERT_CONTEXT(Structure): + _fields_ = ( + ("dwCertEncodingType", DWORD), + ("pbCertEncoded", c_void_p), + ("cbCertEncoded", DWORD), + ("pCertInfo", c_void_p), + ("hCertStore", HCERTSTORE), + ) + + +PCERT_CONTEXT = POINTER(CERT_CONTEXT) +PCCERT_CONTEXT = POINTER(PCERT_CONTEXT) + + +class CERT_ENHKEY_USAGE(Structure): + _fields_ = ( + ("cUsageIdentifier", DWORD), + ("rgpszUsageIdentifier", POINTER(LPSTR)), + ) + + +PCERT_ENHKEY_USAGE = POINTER(CERT_ENHKEY_USAGE) + + +class CERT_USAGE_MATCH(Structure): + _fields_ = ( + ("dwType", DWORD), + ("Usage", CERT_ENHKEY_USAGE), + ) + + +class CERT_CHAIN_PARA(Structure): + _fields_ = ( + ("cbSize", DWORD), + ("RequestedUsage", CERT_USAGE_MATCH), + ("RequestedIssuancePolicy", CERT_USAGE_MATCH), + ("dwUrlRetrievalTimeout", DWORD), + ("fCheckRevocationFreshnessTime", BOOL), + ("dwRevocationFreshnessTime", DWORD), + ("pftCacheResync", LPFILETIME), + ("pStrongSignPara", c_void_p), + ("dwStrongSignFlags", DWORD), + ) + + +if TYPE_CHECKING: + PCERT_CHAIN_PARA = pointer[CERT_CHAIN_PARA] # type: ignore[misc] +else: + PCERT_CHAIN_PARA = POINTER(CERT_CHAIN_PARA) + + +class CERT_TRUST_STATUS(Structure): + _fields_ = ( + ("dwErrorStatus", DWORD), + ("dwInfoStatus", DWORD), + ) + + +class CERT_CHAIN_ELEMENT(Structure): + _fields_ = ( + ("cbSize", DWORD), + ("pCertContext", PCERT_CONTEXT), + ("TrustStatus", CERT_TRUST_STATUS), + ("pRevocationInfo", c_void_p), + ("pIssuanceUsage", PCERT_ENHKEY_USAGE), + ("pApplicationUsage", PCERT_ENHKEY_USAGE), + ("pwszExtendedErrorInfo", LPCWSTR), + ) + + +PCERT_CHAIN_ELEMENT = POINTER(CERT_CHAIN_ELEMENT) + + +class CERT_SIMPLE_CHAIN(Structure): + _fields_ = ( + ("cbSize", DWORD), + ("TrustStatus", CERT_TRUST_STATUS), + ("cElement", DWORD), + ("rgpElement", POINTER(PCERT_CHAIN_ELEMENT)), + ("pTrustListInfo", c_void_p), + ("fHasRevocationFreshnessTime", BOOL), + ("dwRevocationFreshnessTime", DWORD), + ) + + +PCERT_SIMPLE_CHAIN = POINTER(CERT_SIMPLE_CHAIN) + + +class CERT_CHAIN_CONTEXT(Structure): + _fields_ = ( + ("cbSize", DWORD), + ("TrustStatus", CERT_TRUST_STATUS), + ("cChain", DWORD), + ("rgpChain", POINTER(PCERT_SIMPLE_CHAIN)), + ("cLowerQualityChainContext", DWORD), + ("rgpLowerQualityChainContext", c_void_p), + ("fHasRevocationFreshnessTime", BOOL), + ("dwRevocationFreshnessTime", DWORD), + ) + + +PCERT_CHAIN_CONTEXT = POINTER(CERT_CHAIN_CONTEXT) +PCCERT_CHAIN_CONTEXT = POINTER(PCERT_CHAIN_CONTEXT) + + +class SSL_EXTRA_CERT_CHAIN_POLICY_PARA(Structure): + _fields_ = ( + ("cbSize", DWORD), + ("dwAuthType", DWORD), + ("fdwChecks", DWORD), + ("pwszServerName", LPCWSTR), + ) + + +class CERT_CHAIN_POLICY_PARA(Structure): + _fields_ = ( + ("cbSize", DWORD), + ("dwFlags", DWORD), + ("pvExtraPolicyPara", c_void_p), + ) + + +PCERT_CHAIN_POLICY_PARA = POINTER(CERT_CHAIN_POLICY_PARA) + + +class CERT_CHAIN_POLICY_STATUS(Structure): + _fields_ = ( + ("cbSize", DWORD), + ("dwError", DWORD), + ("lChainIndex", LONG), + ("lElementIndex", LONG), + ("pvExtraPolicyStatus", c_void_p), + ) + + +PCERT_CHAIN_POLICY_STATUS = POINTER(CERT_CHAIN_POLICY_STATUS) + + +class CERT_CHAIN_ENGINE_CONFIG(Structure): + _fields_ = ( + ("cbSize", DWORD), + ("hRestrictedRoot", HCERTSTORE), + ("hRestrictedTrust", HCERTSTORE), + ("hRestrictedOther", HCERTSTORE), + ("cAdditionalStore", DWORD), + ("rghAdditionalStore", c_void_p), + ("dwFlags", DWORD), + ("dwUrlRetrievalTimeout", DWORD), + ("MaximumCachedCertificates", DWORD), + ("CycleDetectionModulus", DWORD), + ("hExclusiveRoot", HCERTSTORE), + ("hExclusiveTrustedPeople", HCERTSTORE), + ("dwExclusiveFlags", DWORD), + ) + + +PCERT_CHAIN_ENGINE_CONFIG = POINTER(CERT_CHAIN_ENGINE_CONFIG) +PHCERTCHAINENGINE = POINTER(HCERTCHAINENGINE) + +X509_ASN_ENCODING = 0x00000001 +PKCS_7_ASN_ENCODING = 0x00010000 +CERT_STORE_PROV_MEMORY = b"Memory" +CERT_STORE_ADD_USE_EXISTING = 2 +USAGE_MATCH_TYPE_OR = 1 +OID_PKIX_KP_SERVER_AUTH = c_char_p(b"1.3.6.1.5.5.7.3.1") +CERT_CHAIN_REVOCATION_CHECK_END_CERT = 0x10000000 +CERT_CHAIN_REVOCATION_CHECK_CHAIN = 0x20000000 +CERT_CHAIN_POLICY_IGNORE_ALL_NOT_TIME_VALID_FLAGS = 0x00000007 +CERT_CHAIN_POLICY_IGNORE_INVALID_BASIC_CONSTRAINTS_FLAG = 0x00000008 +CERT_CHAIN_POLICY_ALLOW_UNKNOWN_CA_FLAG = 0x00000010 +CERT_CHAIN_POLICY_IGNORE_INVALID_NAME_FLAG = 0x00000040 +CERT_CHAIN_POLICY_IGNORE_WRONG_USAGE_FLAG = 0x00000020 +CERT_CHAIN_POLICY_IGNORE_INVALID_POLICY_FLAG = 0x00000080 +CERT_CHAIN_POLICY_IGNORE_ALL_REV_UNKNOWN_FLAGS = 0x00000F00 +CERT_CHAIN_POLICY_ALLOW_TESTROOT_FLAG = 0x00008000 +CERT_CHAIN_POLICY_TRUST_TESTROOT_FLAG = 0x00004000 +SECURITY_FLAG_IGNORE_CERT_CN_INVALID = 0x00001000 +AUTHTYPE_SERVER = 2 +CERT_CHAIN_POLICY_SSL = 4 +FORMAT_MESSAGE_FROM_SYSTEM = 0x00001000 +FORMAT_MESSAGE_IGNORE_INSERTS = 0x00000200 + +# Flags to set for SSLContext.verify_mode=CERT_NONE +CERT_CHAIN_POLICY_VERIFY_MODE_NONE_FLAGS = ( + CERT_CHAIN_POLICY_IGNORE_ALL_NOT_TIME_VALID_FLAGS + | CERT_CHAIN_POLICY_IGNORE_INVALID_BASIC_CONSTRAINTS_FLAG + | CERT_CHAIN_POLICY_ALLOW_UNKNOWN_CA_FLAG + | CERT_CHAIN_POLICY_IGNORE_INVALID_NAME_FLAG + | CERT_CHAIN_POLICY_IGNORE_WRONG_USAGE_FLAG + | CERT_CHAIN_POLICY_IGNORE_INVALID_POLICY_FLAG + | CERT_CHAIN_POLICY_IGNORE_ALL_REV_UNKNOWN_FLAGS + | CERT_CHAIN_POLICY_ALLOW_TESTROOT_FLAG + | CERT_CHAIN_POLICY_TRUST_TESTROOT_FLAG +) + +wincrypt = WinDLL("crypt32.dll") +kernel32 = WinDLL("kernel32.dll") + + +def _handle_win_error(result: bool, _: Any, args: Any) -> Any: + if not result: + # Note, actually raises OSError after calling GetLastError and FormatMessage + raise WinError() + return args + + +CertCreateCertificateChainEngine = wincrypt.CertCreateCertificateChainEngine +CertCreateCertificateChainEngine.argtypes = ( + PCERT_CHAIN_ENGINE_CONFIG, + PHCERTCHAINENGINE, +) +CertCreateCertificateChainEngine.errcheck = _handle_win_error + +CertOpenStore = wincrypt.CertOpenStore +CertOpenStore.argtypes = (LPCSTR, DWORD, HCRYPTPROV_LEGACY, DWORD, c_void_p) +CertOpenStore.restype = HCERTSTORE +CertOpenStore.errcheck = _handle_win_error + +CertAddEncodedCertificateToStore = wincrypt.CertAddEncodedCertificateToStore +CertAddEncodedCertificateToStore.argtypes = ( + HCERTSTORE, + DWORD, + c_char_p, + DWORD, + DWORD, + PCCERT_CONTEXT, +) +CertAddEncodedCertificateToStore.restype = BOOL + +CertCreateCertificateContext = wincrypt.CertCreateCertificateContext +CertCreateCertificateContext.argtypes = (DWORD, c_char_p, DWORD) +CertCreateCertificateContext.restype = PCERT_CONTEXT +CertCreateCertificateContext.errcheck = _handle_win_error + +CertGetCertificateChain = wincrypt.CertGetCertificateChain +CertGetCertificateChain.argtypes = ( + HCERTCHAINENGINE, + PCERT_CONTEXT, + LPFILETIME, + HCERTSTORE, + PCERT_CHAIN_PARA, + DWORD, + c_void_p, + PCCERT_CHAIN_CONTEXT, +) +CertGetCertificateChain.restype = BOOL +CertGetCertificateChain.errcheck = _handle_win_error + +CertVerifyCertificateChainPolicy = wincrypt.CertVerifyCertificateChainPolicy +CertVerifyCertificateChainPolicy.argtypes = ( + c_ulong, + PCERT_CHAIN_CONTEXT, + PCERT_CHAIN_POLICY_PARA, + PCERT_CHAIN_POLICY_STATUS, +) +CertVerifyCertificateChainPolicy.restype = BOOL + +CertCloseStore = wincrypt.CertCloseStore +CertCloseStore.argtypes = (HCERTSTORE, DWORD) +CertCloseStore.restype = BOOL +CertCloseStore.errcheck = _handle_win_error + +CertFreeCertificateChain = wincrypt.CertFreeCertificateChain +CertFreeCertificateChain.argtypes = (PCERT_CHAIN_CONTEXT,) + +CertFreeCertificateContext = wincrypt.CertFreeCertificateContext +CertFreeCertificateContext.argtypes = (PCERT_CONTEXT,) + +CertFreeCertificateChainEngine = wincrypt.CertFreeCertificateChainEngine +CertFreeCertificateChainEngine.argtypes = (HCERTCHAINENGINE,) + +FormatMessageW = kernel32.FormatMessageW +FormatMessageW.argtypes = ( + DWORD, + LPCVOID, + DWORD, + DWORD, + LPWSTR, + DWORD, + c_void_p, +) +FormatMessageW.restype = DWORD + + +def _verify_peercerts_impl( + ssl_context: ssl.SSLContext, + cert_chain: list[bytes], + server_hostname: str | None = None, +) -> None: + """Verify the cert_chain from the server using Windows APIs.""" + + # If the peer didn't send any certificates then + # we can't do verification. Raise an error. + if not cert_chain: + raise ssl.SSLCertVerificationError("Peer sent no certificates to verify") + + pCertContext = None + hIntermediateCertStore = CertOpenStore(CERT_STORE_PROV_MEMORY, 0, None, 0, None) + try: + # Add intermediate certs to an in-memory cert store + for cert_bytes in cert_chain[1:]: + CertAddEncodedCertificateToStore( + hIntermediateCertStore, + X509_ASN_ENCODING | PKCS_7_ASN_ENCODING, + cert_bytes, + len(cert_bytes), + CERT_STORE_ADD_USE_EXISTING, + None, + ) + + # Cert context for leaf cert + leaf_cert = cert_chain[0] + pCertContext = CertCreateCertificateContext( + X509_ASN_ENCODING | PKCS_7_ASN_ENCODING, leaf_cert, len(leaf_cert) + ) + + # Chain params to match certs for serverAuth extended usage + cert_enhkey_usage = CERT_ENHKEY_USAGE() + cert_enhkey_usage.cUsageIdentifier = 1 + cert_enhkey_usage.rgpszUsageIdentifier = (c_char_p * 1)(OID_PKIX_KP_SERVER_AUTH) + cert_usage_match = CERT_USAGE_MATCH() + cert_usage_match.Usage = cert_enhkey_usage + chain_params = CERT_CHAIN_PARA() + chain_params.RequestedUsage = cert_usage_match + chain_params.cbSize = sizeof(chain_params) + pChainPara = pointer(chain_params) + + if ssl_context.verify_flags & ssl.VERIFY_CRL_CHECK_CHAIN: + chain_flags = CERT_CHAIN_REVOCATION_CHECK_CHAIN + elif ssl_context.verify_flags & ssl.VERIFY_CRL_CHECK_LEAF: + chain_flags = CERT_CHAIN_REVOCATION_CHECK_END_CERT + else: + chain_flags = 0 + + try: + # First attempt to verify using the default Windows system trust roots + # (default chain engine). + _get_and_verify_cert_chain( + ssl_context, + None, + hIntermediateCertStore, + pCertContext, + pChainPara, + server_hostname, + chain_flags=chain_flags, + ) + except ssl.SSLCertVerificationError as e: + # If that fails but custom CA certs have been added + # to the SSLContext using load_verify_locations, + # try verifying using a custom chain engine + # that trusts the custom CA certs. + custom_ca_certs: list[bytes] | None = ssl_context.get_ca_certs( + binary_form=True + ) + if custom_ca_certs: + try: + _verify_using_custom_ca_certs( + ssl_context, + custom_ca_certs, + hIntermediateCertStore, + pCertContext, + pChainPara, + server_hostname, + chain_flags=chain_flags, + ) + # Raise the original error, not the new error. + except ssl.SSLCertVerificationError: + raise e from None + else: + raise + finally: + CertCloseStore(hIntermediateCertStore, 0) + if pCertContext: + CertFreeCertificateContext(pCertContext) + + +def _get_and_verify_cert_chain( + ssl_context: ssl.SSLContext, + hChainEngine: HCERTCHAINENGINE | None, + hIntermediateCertStore: HCERTSTORE, + pPeerCertContext: c_void_p, + pChainPara: PCERT_CHAIN_PARA, # type: ignore[valid-type] + server_hostname: str | None, + chain_flags: int, +) -> None: + ppChainContext = None + try: + # Get cert chain + ppChainContext = pointer(PCERT_CHAIN_CONTEXT()) + CertGetCertificateChain( + hChainEngine, # chain engine + pPeerCertContext, # leaf cert context + None, # current system time + hIntermediateCertStore, # additional in-memory cert store + pChainPara, # chain-building parameters + chain_flags, + None, # reserved + ppChainContext, # the resulting chain context + ) + pChainContext = ppChainContext.contents + + # Verify cert chain + ssl_extra_cert_chain_policy_para = SSL_EXTRA_CERT_CHAIN_POLICY_PARA() + ssl_extra_cert_chain_policy_para.cbSize = sizeof( + ssl_extra_cert_chain_policy_para + ) + ssl_extra_cert_chain_policy_para.dwAuthType = AUTHTYPE_SERVER + ssl_extra_cert_chain_policy_para.fdwChecks = 0 + if ssl_context.check_hostname is False: + ssl_extra_cert_chain_policy_para.fdwChecks = ( + SECURITY_FLAG_IGNORE_CERT_CN_INVALID + ) + if server_hostname: + ssl_extra_cert_chain_policy_para.pwszServerName = c_wchar_p(server_hostname) + + chain_policy = CERT_CHAIN_POLICY_PARA() + chain_policy.pvExtraPolicyPara = cast( + pointer(ssl_extra_cert_chain_policy_para), c_void_p + ) + if ssl_context.verify_mode == ssl.CERT_NONE: + chain_policy.dwFlags |= CERT_CHAIN_POLICY_VERIFY_MODE_NONE_FLAGS + chain_policy.cbSize = sizeof(chain_policy) + + pPolicyPara = pointer(chain_policy) + policy_status = CERT_CHAIN_POLICY_STATUS() + policy_status.cbSize = sizeof(policy_status) + pPolicyStatus = pointer(policy_status) + CertVerifyCertificateChainPolicy( + CERT_CHAIN_POLICY_SSL, + pChainContext, + pPolicyPara, + pPolicyStatus, + ) + + # Check status + error_code = policy_status.dwError + if error_code: + # Try getting a human readable message for an error code. + error_message_buf = create_unicode_buffer(1024) + error_message_chars = FormatMessageW( + FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS, + None, + error_code, + 0, + error_message_buf, + sizeof(error_message_buf), + None, + ) + + # See if we received a message for the error, + # otherwise we use a generic error with the + # error code and hope that it's search-able. + if error_message_chars <= 0: + error_message = f"Certificate chain policy error {error_code:#x} [{policy_status.lElementIndex}]" + else: + error_message = error_message_buf.value.strip() + + err = ssl.SSLCertVerificationError(error_message) + err.verify_message = error_message + err.verify_code = error_code + raise err from None + finally: + if ppChainContext: + CertFreeCertificateChain(ppChainContext.contents) + + +def _verify_using_custom_ca_certs( + ssl_context: ssl.SSLContext, + custom_ca_certs: list[bytes], + hIntermediateCertStore: HCERTSTORE, + pPeerCertContext: c_void_p, + pChainPara: PCERT_CHAIN_PARA, # type: ignore[valid-type] + server_hostname: str | None, + chain_flags: int, +) -> None: + hChainEngine = None + hRootCertStore = CertOpenStore(CERT_STORE_PROV_MEMORY, 0, None, 0, None) + try: + # Add custom CA certs to an in-memory cert store + for cert_bytes in custom_ca_certs: + CertAddEncodedCertificateToStore( + hRootCertStore, + X509_ASN_ENCODING | PKCS_7_ASN_ENCODING, + cert_bytes, + len(cert_bytes), + CERT_STORE_ADD_USE_EXISTING, + None, + ) + + # Create a custom cert chain engine which exclusively trusts + # certs from our hRootCertStore + cert_chain_engine_config = CERT_CHAIN_ENGINE_CONFIG() + cert_chain_engine_config.cbSize = sizeof(cert_chain_engine_config) + cert_chain_engine_config.hExclusiveRoot = hRootCertStore + pConfig = pointer(cert_chain_engine_config) + phChainEngine = pointer(HCERTCHAINENGINE()) + CertCreateCertificateChainEngine( + pConfig, + phChainEngine, + ) + hChainEngine = phChainEngine.contents + + # Get and verify a cert chain using the custom chain engine + _get_and_verify_cert_chain( + ssl_context, + hChainEngine, + hIntermediateCertStore, + pPeerCertContext, + pChainPara, + server_hostname, + chain_flags, + ) + finally: + if hChainEngine: + CertFreeCertificateChainEngine(hChainEngine) + CertCloseStore(hRootCertStore, 0) + + +@contextlib.contextmanager +def _configure_context(ctx: ssl.SSLContext) -> typing.Iterator[None]: + check_hostname = ctx.check_hostname + verify_mode = ctx.verify_mode + ctx.check_hostname = False + _set_ssl_context_verify_mode(ctx, ssl.CERT_NONE) + try: + yield + finally: + ctx.check_hostname = check_hostname + _set_ssl_context_verify_mode(ctx, verify_mode) diff --git a/miniconda3/pkgs/truststore-0.10.1-py313h06a4308_1/lib/python3.13/site-packages/truststore/py.typed b/miniconda3/pkgs/truststore-0.10.1-py313h06a4308_1/lib/python3.13/site-packages/truststore/py.typed new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/bin/typer b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/bin/typer new file mode 100644 index 0000000000000000000000000000000000000000..0af996faed53df5344796cbbe31ad54f71c7bf43 --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/bin/typer @@ -0,0 +1,11 @@ +#!/home/task_177151289635449/croot/typer-split_1771512981838/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold/bin/python + +# -*- coding: utf-8 -*- +import re +import sys + +from typer.cli import main + +if __name__ == '__main__': + sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '', sys.argv[0]) + sys.exit(main()) diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/about.json b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/about.json new file mode 100644 index 0000000000000000000000000000000000000000..9940a48379d77b4e416cd8b8f48ba1406581031b --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/about.json @@ -0,0 +1,185 @@ +{ + "channels": [ + "https://repo.anaconda.com/pkgs/main", + "https://repo.anaconda.com/pkgs/main" + ], + "conda_build_version": "26.1.0", + "conda_version": "26.1.0", + "description": "Typer is library for building CLI applications that users will love using and developers will love creating. Based on Python 3.6+ type hints.\n\nThe key features are:\n\nIntuitive to write: Great editor support. Completion everywhere. Less time debugging. Designed to be easy to use and learn. Less time reading docs.\nEasy to use: It's easy to use for the final users. Automatic help, and automatic completion for all shells.\nShort: Minimize code duplication. Multiple features from each parameter declaration. Fewer bugs.\nStart simple: The simplest example adds only 2 lines of code to your app: 1 import, 1 function call.\nGrow large: Grow in complexity as much as you want, create arbitrarily complex trees of commands and groups of subcommands, with options and arguments.\n", + "dev_url": "https://github.com/tiangolo/typer", + "doc_url": "https://typer.tiangolo.com", + "env_vars": { + "CIO_TEST": "" + }, + "extra": { + "copy_test_source_files": true, + "final": true, + "parent_recipe": { + "name": "typer-split", + "path": "/home/task_177151289635449/typer-feedstock/recipe", + "version": "0.20.0" + }, + "pbp_graph_uuid": "0198d78c-2340-4355-b284-2b231860ccae", + "recipe-maintainers": [ + "dfornika", + "bollwyvl" + ], + "remote_url": "https://github.com/AnacondaRecipes/typer-feedstock", + "sha": "51969b3c726d7cd624839468e48345c93facda2d", + "task_id": "aFaBrfW3SqmiOYsWOdyonA", + "task_run_id": "0" + }, + "home": "https://github.com/tiangolo/typer", + "identifiers": [], + "keywords": [], + "license": "MIT", + "license_family": "MIT", + "license_file": "typer/LICENSE", + "root_pkgs": [ + "_libgcc_mutex 0.1 main", + "ca-certificates 2025.12.2 h06a4308_0", + "ld_impl_linux-64 2.40 h12ee557_0", + "libstdcxx-ng 11.2.0 h1234567_1", + "nlohmann_json 3.11.2 h6a678d5_0", + "pybind11-abi 5 hd3eb1b0_0", + "tzdata 2025b h04d1e81_0", + "libgomp 11.2.0 h1234567_1", + "_openmp_mutex 5.1 1_gnu", + "libgcc-ng 11.2.0 h1234567_1", + "bzip2 1.0.8 h5eee18b_6", + "c-ares 1.19.1 h5eee18b_0", + "cpp-expected 1.1.0 hdb19cb5_0", + "expat 2.7.1 h6a678d5_0", + "fmt 9.1.0 hdb19cb5_1", + "icu 73.1 h6a678d5_0", + "libev 4.33 h7f8727e_1", + "libffi 3.4.4 h6a678d5_1", + "libuuid 1.41.5 h5eee18b_0", + "lz4-c 1.9.4 h6a678d5_1", + "ncurses 6.4 h6a678d5_0", + "libiconv 1.16 h5eee18b_3", + "pthread-stubs 0.3 h0ce48e5_1", + "reproc 14.2.4 h6a678d5_2", + "simdjson 3.10.1 hdb19cb5_0", + "xorg-libxau 1.0.12 h9b100fa_0", + "xorg-libxdmcp 1.1.5 h9b100fa_0", + "xorg-xorgproto 2024.1 h5eee18b_1", + "xz 5.6.4 h5eee18b_1", + "yaml-cpp 0.8.0 h6a678d5_1", + "zlib 1.2.13 h5eee18b_1", + "libedit 3.1.20230828 h5eee18b_0", + "libnghttp2 1.57.0 h2d74bed_0", + "libssh2 1.11.1 h251f7ec_0", + "libxcb 1.17.0 h9b100fa_0", + "libxml2 2.13.8 hfdd30dd_0", + "pcre2 10.42 hebb0a14_1", + "readline 8.2 h5eee18b_0", + "reproc-cpp 14.2.4 h6a678d5_2", + "spdlog 1.11.0 hdb19cb5_0", + "zstd 1.5.6 hc292b87_0", + "krb5 1.21.3 h8a1dbc1_1", + "libarchive 3.7.7 hfab0078_0", + "libsolv 0.7.30 he621ea3_1", + "sqlite 3.50.2 hb25bd0a_1", + "xorg-libx11 1.8.12 h9b100fa_1", + "patch 2.8 hb25bd0a_0", + "libmamba 2.0.5 haf1ee3a_1", + "python 3.12.11 h22baa00_0", + "menuinst 2.3.0 py312h06a4308_0", + "anaconda-anon-usage 0.7.1 py312hfc0e8ea_100", + "annotated-types 0.6.0 py312h06a4308_0", + "archspec 0.2.3 pyhd3eb1b0_0", + "boltons 25.0.0 py312h06a4308_0", + "charset-normalizer 3.3.2 pyhd3eb1b0_0", + "distro 1.9.0 py312h06a4308_0", + "frozendict 2.4.2 py312h06a4308_0", + "idna 3.7 py312h06a4308_0", + "jsonpointer 2.1 pyhd3eb1b0_0", + "libmambapy 2.0.5 py312hdb19cb5_1", + "mdurl 0.1.0 py312h06a4308_0", + "packaging 24.2 py312h06a4308_0", + "platformdirs 4.3.7 py312h06a4308_0", + "pluggy 1.5.0 py312h06a4308_0", + "pycosat 0.6.6 py312h5eee18b_2", + "pycparser 2.21 pyhd3eb1b0_0", + "pygments 2.19.1 py312h06a4308_0", + "pysocks 1.7.1 py312h06a4308_0", + "ruamel.yaml.clib 0.2.12 py312h5eee18b_0", + "setuptools 78.1.1 py312h06a4308_0", + "tqdm 4.67.1 py312he106c6f_0", + "truststore 0.10.0 py312h06a4308_0", + "typing_extensions 4.12.2 py312h06a4308_0", + "wheel 0.45.1 py312h06a4308_0", + "cffi 1.17.1 py312h1fdaa30_1", + "jsonpatch 1.33 py312h06a4308_1", + "markdown-it-py 2.2.0 py312h06a4308_1", + "pip 25.1 pyhc872135_2", + "ruamel.yaml 0.18.10 py312h5eee18b_0", + "typing-extensions 4.12.2 py312h06a4308_0", + "typing-inspection 0.4.0 py312h06a4308_0", + "brotlicffi 1.0.9.2 py312h6a678d5_1", + "cryptography 45.0.3 py312h2ccb017_0", + "pydantic-core 2.33.2 py312hc6f7160_0", + "rich 13.9.4 py312h06a4308_0", + "zstandard 0.23.0 py312h2c38b39_1", + "conda-content-trust 0.2.0 py312h06a4308_1", + "pydantic 2.11.7 py312h06a4308_0", + "urllib3 2.5.0 py312h06a4308_0", + "requests 2.32.4 py312h06a4308_0", + "conda-package-streaming 0.12.0 py312h06a4308_0", + "conda-package-handling 2.4.0 py312h06a4308_0", + "conda-anaconda-tos 0.2.1 py312h06a4308_0", + "libsodium 1.0.20 heac8642_0", + "libunistring 1.3 hb25bd0a_0", + "mbedtls 3.5.1 h6a678d5_1", + "openssl 3.0.18 hd6dcaed_0", + "patchelf 0.17.2 h6a678d5_0", + "perl 5.40.2 0_h5eee18b_perl5", + "yaml 0.2.5 h7b6447c_0", + "liblief 0.16.4 h6a678d5_0", + "gettext 0.21.0 hedfda30_2", + "libidn2 2.3.8 hf80d704_0", + "tk 8.6.15 h54e0aa7_0", + "libcurl 8.16.0 heebcbe5_0", + "git 2.51.0 pl5382h000ed5b_0", + "argcomplete 3.6.2 py312h06a4308_0", + "attrs 25.4.0 py312h06a4308_2", + "certifi 2026.01.04 py312h06a4308_0", + "chardet 5.2.0 py312h06a4308_0", + "click 8.2.1 py312h06a4308_1", + "evalidate 2.0.3 py312h06a4308_0", + "filelock 3.20.3 py312h06a4308_0", + "jmespath 1.1.0 py312h06a4308_0", + "markupsafe 3.0.2 py312h5eee18b_0", + "msgpack-python 1.1.1 py312h6a678d5_0", + "pkginfo 1.12.1.2 py312h06a4308_0", + "psutil 7.0.0 py312hee96239_1", + "py-lief 0.16.4 py312h6a678d5_0", + "python-libarchive-c 5.3 py312h06a4308_0", + "pytz 2025.2 py312h06a4308_0", + "pyyaml 6.0.2 py312h5eee18b_0", + "rpds-py 0.28.0 py312h498d7c9_0", + "six 1.17.0 py312h06a4308_0", + "soupsieve 2.5 py312h06a4308_0", + "tomlkit 0.13.3 py312h06a4308_0", + "xmltodict 1.0.2 py312h06a4308_0", + "jinja2 3.1.6 py312h06a4308_0", + "python-dateutil 2.9.0post0 py312h06a4308_2", + "referencing 0.37.0 py312h06a4308_0", + "yq 3.4.3 py312h06a4308_0", + "beautifulsoup4 4.14.3 py312h06a4308_0", + "jsonschema-specifications 2025.9.1 py312h06a4308_0", + "pynacl 1.6.0 py312h2630517_0", + "jsonschema 4.25.1 py312h06a4308_0", + "botocore 1.42.34 py312h06a4308_0", + "s3transfer 0.16.0 py312h06a4308_0", + "boto3 1.42.34 py312h06a4308_0", + "conda 26.1.0 py312h06a4308_0", + "conda-anaconda-telemetry 0.3.0 pyhd3eb1b0_1", + "conda-index 0.7.0 py312h06a4308_1", + "conda-libmamba-solver 25.11.0 pyhdf14ebd_0", + "conda-build 26.1.0 py312h76456e7_0" + ], + "summary": "A library for building CLI applications", + "tags": [] +} \ No newline at end of file diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/files b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/files new file mode 100644 index 0000000000000000000000000000000000000000..b8af195204a1429c4608bc5c6fdadf00c47b107d --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/files @@ -0,0 +1,41 @@ +bin/typer +lib/python3.13/site-packages/typer-0.20.0.dist-info/INSTALLER +lib/python3.13/site-packages/typer-0.20.0.dist-info/METADATA +lib/python3.13/site-packages/typer-0.20.0.dist-info/RECORD +lib/python3.13/site-packages/typer-0.20.0.dist-info/REQUESTED +lib/python3.13/site-packages/typer-0.20.0.dist-info/WHEEL +lib/python3.13/site-packages/typer-0.20.0.dist-info/entry_points.txt +lib/python3.13/site-packages/typer-0.20.0.dist-info/licenses/LICENSE +lib/python3.13/site-packages/typer/__init__.py +lib/python3.13/site-packages/typer/__main__.py +lib/python3.13/site-packages/typer/__pycache__/__init__.cpython-313.pyc +lib/python3.13/site-packages/typer/__pycache__/__main__.cpython-313.pyc +lib/python3.13/site-packages/typer/__pycache__/_completion_classes.cpython-313.pyc +lib/python3.13/site-packages/typer/__pycache__/_completion_shared.cpython-313.pyc +lib/python3.13/site-packages/typer/__pycache__/_types.cpython-313.pyc +lib/python3.13/site-packages/typer/__pycache__/_typing.cpython-313.pyc +lib/python3.13/site-packages/typer/__pycache__/cli.cpython-313.pyc +lib/python3.13/site-packages/typer/__pycache__/colors.cpython-313.pyc +lib/python3.13/site-packages/typer/__pycache__/completion.cpython-313.pyc +lib/python3.13/site-packages/typer/__pycache__/core.cpython-313.pyc +lib/python3.13/site-packages/typer/__pycache__/main.cpython-313.pyc +lib/python3.13/site-packages/typer/__pycache__/models.cpython-313.pyc +lib/python3.13/site-packages/typer/__pycache__/params.cpython-313.pyc +lib/python3.13/site-packages/typer/__pycache__/rich_utils.cpython-313.pyc +lib/python3.13/site-packages/typer/__pycache__/testing.cpython-313.pyc +lib/python3.13/site-packages/typer/__pycache__/utils.cpython-313.pyc +lib/python3.13/site-packages/typer/_completion_classes.py +lib/python3.13/site-packages/typer/_completion_shared.py +lib/python3.13/site-packages/typer/_types.py +lib/python3.13/site-packages/typer/_typing.py +lib/python3.13/site-packages/typer/cli.py +lib/python3.13/site-packages/typer/colors.py +lib/python3.13/site-packages/typer/completion.py +lib/python3.13/site-packages/typer/core.py +lib/python3.13/site-packages/typer/main.py +lib/python3.13/site-packages/typer/models.py +lib/python3.13/site-packages/typer/params.py +lib/python3.13/site-packages/typer/py.typed +lib/python3.13/site-packages/typer/rich_utils.py +lib/python3.13/site-packages/typer/testing.py +lib/python3.13/site-packages/typer/utils.py diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/git b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/git new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/has_prefix b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/has_prefix new file mode 100644 index 0000000000000000000000000000000000000000..282e072a8b366536b907b0254e32fc17fb43a818 --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/has_prefix @@ -0,0 +1 @@ +/home/task_177151289635449/croot/typer-split_1771512981838/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold text bin/typer diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/hash_input.json b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/hash_input.json new file mode 100644 index 0000000000000000000000000000000000000000..54f8fb2da41bdb4962a008606b017773d2fef48e --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/hash_input.json @@ -0,0 +1,4 @@ +{ + "target_platform": "linux-64", + "channel_targets": "defaults" +} \ No newline at end of file diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/index.json b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/index.json new file mode 100644 index 0000000000000000000000000000000000000000..7f95d7303c85abb30070eadf633f3c359772f6d7 --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/index.json @@ -0,0 +1,21 @@ +{ + "arch": "x86_64", + "build": "py313h06a4308_1", + "build_number": 1, + "constrains": [ + "typer-cli 0.20.0.*", + "typer-slim 0.20.0.*" + ], + "depends": [ + "python >=3.13,<3.14.0a0", + "python_abi 3.13.* *_cp313", + "typer-slim-standard 0.20.0 py313h06a4308_1" + ], + "license": "MIT", + "license_family": "MIT", + "name": "typer", + "platform": "linux", + "subdir": "linux-64", + "timestamp": 1771513026151, + "version": "0.20.0" +} \ No newline at end of file diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/licenses/typer/LICENSE b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/licenses/typer/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..a7694736cf37716aafec14b24aa8d6316ebe07a3 --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/licenses/typer/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2019 SebastiĆ”n RamĆ­rez + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/paths.json b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/paths.json new file mode 100644 index 0000000000000000000000000000000000000000..ab29536ee4afb9911293551aaea2fa7997927871 --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/paths.json @@ -0,0 +1,253 @@ +{ + "paths": [ + { + "_path": "bin/typer", + "file_mode": "text", + "path_type": "hardlink", + "prefix_placeholder": "/home/task_177151289635449/croot/typer-split_1771512981838/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold", + "sha256": "59cd2c95ae75c9cc482d528f72742e0820cda8a229c9bd17d90ae52e57be45ee", + "size_in_bytes": 462 + }, + { + "_path": "lib/python3.13/site-packages/typer-0.20.0.dist-info/INSTALLER", + "path_type": "hardlink", + "sha256": "d0edee15f91b406f3f99726e44eb990be6e34fd0345b52b910c568e0eef6a2a8", + "size_in_bytes": 5 + }, + { + "_path": "lib/python3.13/site-packages/typer-0.20.0.dist-info/METADATA", + "path_type": "hardlink", + "sha256": "338bbea20e04077e1d7ef2c3c8817d82eda95baa49177c69d6cf1d8b6a7b333e", + "size_in_bytes": 16081 + }, + { + "_path": "lib/python3.13/site-packages/typer-0.20.0.dist-info/RECORD", + "path_type": "hardlink", + "sha256": "85e64fc7fdc667c6d672daee9ba5fcfd687e5bd785d97746deb5a5972475b197", + "size_in_bytes": 2652 + }, + { + "_path": "lib/python3.13/site-packages/typer-0.20.0.dist-info/REQUESTED", + "path_type": "hardlink", + "sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "size_in_bytes": 0 + }, + { + "_path": "lib/python3.13/site-packages/typer-0.20.0.dist-info/WHEEL", + "path_type": "hardlink", + "sha256": "b6c52ffedec10de25e447692adccdb19eb8af93b43a46b168bf25fa730f6e792", + "size_in_bytes": 90 + }, + { + "_path": "lib/python3.13/site-packages/typer-0.20.0.dist-info/entry_points.txt", + "path_type": "hardlink", + "sha256": "60ed770728aa59eb9ab3d5742400cb5004591547bf73053fef099336fc41610f", + "size_in_bytes": 57 + }, + { + "_path": "lib/python3.13/site-packages/typer-0.20.0.dist-info/licenses/LICENSE", + "path_type": "hardlink", + "sha256": "58992cebcf8dfb6e40c4e2112ed12126c243666dca3912a3d78b7ecac4859d49", + "size_in_bytes": 1086 + }, + { + "_path": "lib/python3.13/site-packages/typer/__init__.py", + "path_type": "hardlink", + "sha256": "8d69957d43c903784fc28ca55a1d50eff41b305bc701cda01709c92b8ea137f0", + "size_in_bytes": 1596 + }, + { + "_path": "lib/python3.13/site-packages/typer/__main__.py", + "path_type": "hardlink", + "sha256": "6d8b7d7846a845059d7a3107143f11131f63c5511d669b44085b15ec5e3d2279", + "size_in_bytes": 30 + }, + { + "_path": "lib/python3.13/site-packages/typer/__pycache__/__init__.cpython-313.pyc", + "path_type": "hardlink", + "sha256": "5d684600a76ff040bd0ee76fe7a1362cf04bfcf4db1ff909f0c8a65ffa8fe331", + "size_in_bytes": 1422 + }, + { + "_path": "lib/python3.13/site-packages/typer/__pycache__/__main__.cpython-313.pyc", + "path_type": "hardlink", + "sha256": "9cbcae0b434e2a34b3c7d15c12067619b9deee66112dd3164f27a5d359f68a0b", + "size_in_bytes": 197 + }, + { + "_path": "lib/python3.13/site-packages/typer/__pycache__/_completion_classes.cpython-313.pyc", + "path_type": "hardlink", + "sha256": "a609848f20cf61b1867077dca3043f60e1338315b46cfca123e0f8b8a4dad304", + "size_in_bytes": 10874 + }, + { + "_path": "lib/python3.13/site-packages/typer/__pycache__/_completion_shared.cpython-313.pyc", + "path_type": "hardlink", + "sha256": "5adcaed6c431ea9c328a191930c28b610888bed7bf064c04ef49ce8fe556707f", + "size_in_bytes": 9886 + }, + { + "_path": "lib/python3.13/site-packages/typer/__pycache__/_types.cpython-313.pyc", + "path_type": "hardlink", + "sha256": "f4d344fe50162cb7836cfb24c2f794901f9b0af90028dfc093649fac2fe8f419", + "size_in_bytes": 1308 + }, + { + "_path": "lib/python3.13/site-packages/typer/__pycache__/_typing.cpython-313.pyc", + "path_type": "hardlink", + "sha256": "6cb88a9907dfb413dea0bfa23efb778792fc20fbb570a0481399f036d661c53e", + "size_in_bytes": 3292 + }, + { + "_path": "lib/python3.13/site-packages/typer/__pycache__/cli.cpython-313.pyc", + "path_type": "hardlink", + "sha256": "378bae82ccf6128e6374322509a8f98fb3080d5ea83693104eb35bccba517856", + "size_in_bytes": 14690 + }, + { + "_path": "lib/python3.13/site-packages/typer/__pycache__/colors.cpython-313.pyc", + "path_type": "hardlink", + "sha256": "3a69f4aff22052293256a9ecf244432958e9e1dca1abe5a52760c9ecaee5efda", + "size_in_bytes": 637 + }, + { + "_path": "lib/python3.13/site-packages/typer/__pycache__/completion.cpython-313.pyc", + "path_type": "hardlink", + "sha256": "cf2069b7d98fe821a3729d4757b963440e954abddce1315fdd2a18387cabafb9", + "size_in_bytes": 5431 + }, + { + "_path": "lib/python3.13/site-packages/typer/__pycache__/core.cpython-313.pyc", + "path_type": "hardlink", + "sha256": "c11043e84ba53924cbd8fe09ce6842da637828d5338a42f98d42618f762cc256", + "size_in_bytes": 31725 + }, + { + "_path": "lib/python3.13/site-packages/typer/__pycache__/main.cpython-313.pyc", + "path_type": "hardlink", + "sha256": "2c98bcb7e8a1abf8d877c33906e255b4711e978de29ffaf578d48c3cb2be67ff", + "size_in_bytes": 45029 + }, + { + "_path": "lib/python3.13/site-packages/typer/__pycache__/models.cpython-313.pyc", + "path_type": "hardlink", + "sha256": "7883e4209f5c1ee6a81a994796e4b4479ac875bdca23e2d6ab8ec8a3eb35b8ab", + "size_in_bytes": 19432 + }, + { + "_path": "lib/python3.13/site-packages/typer/__pycache__/params.cpython-313.pyc", + "path_type": "hardlink", + "sha256": "39969e2ecc5f9a07a167b3ef7baaf115b28e79f61ae3f9b81451fd46482ab3ed", + "size_in_bytes": 14476 + }, + { + "_path": "lib/python3.13/site-packages/typer/__pycache__/rich_utils.cpython-313.pyc", + "path_type": "hardlink", + "sha256": "2aecc43b301d84a4ad5235fdba1d8334ad7b1c3ccaf140415dd7b968c645d5eb", + "size_in_bytes": 27558 + }, + { + "_path": "lib/python3.13/site-packages/typer/__pycache__/testing.cpython-313.pyc", + "path_type": "hardlink", + "sha256": "2563ae0d1630c89708cc7cca720ddb6f676857ec786048fee5e82a8b2d2fbce5", + "size_in_bytes": 1461 + }, + { + "_path": "lib/python3.13/site-packages/typer/__pycache__/utils.cpython-313.pyc", + "path_type": "hardlink", + "sha256": "ec13d1e8d822ddeaef47a3e7add1ddfe38dcd8ba89cb417de3ea1432b0520c13", + "size_in_bytes": 7561 + }, + { + "_path": "lib/python3.13/site-packages/typer/_completion_classes.py", + "path_type": "hardlink", + "sha256": "3f1f5b579e98e09fc5f52fec508da23e9521fe2fbe0a1a1cc6b9381c0badd871", + "size_in_bytes": 7385 + }, + { + "_path": "lib/python3.13/site-packages/typer/_completion_shared.py", + "path_type": "hardlink", + "sha256": "e2514e5215d2af2d9b21947d6a5ed4ab7de2b69812ce0e9e6a0aae032b0d98e1", + "size_in_bytes": 8758 + }, + { + "_path": "lib/python3.13/site-packages/typer/_types.py", + "path_type": "hardlink", + "sha256": "9122f184a997dfb6338b3423a985005a6aff2457025b9be111ce18b210d30bd4", + "size_in_bytes": 1031 + }, + { + "_path": "lib/python3.13/site-packages/typer/_typing.py", + "path_type": "hardlink", + "sha256": "b8ff95f168ef02e17e14b59411f566ba1540f526a7e6d81e379089a909088de2", + "size_in_bytes": 2605 + }, + { + "_path": "lib/python3.13/site-packages/typer/cli.py", + "path_type": "hardlink", + "sha256": "61cf80e70d82032a84f8b5a0a52fb7299549be5730e9f95fc8843a0a611a5e5c", + "size_in_bytes": 9670 + }, + { + "_path": "lib/python3.13/site-packages/typer/colors.py", + "path_type": "hardlink", + "sha256": "7b8da3f2e079db484ba57e42ff47e247738ea0814c6e13b700366fbfa865015f", + "size_in_bytes": 430 + }, + { + "_path": "lib/python3.13/site-packages/typer/completion.py", + "path_type": "hardlink", + "sha256": "775022a6daec13051e48f41a200e688afe13dd7cb7303ab9a375488cadfd41e8", + "size_in_bytes": 4810 + }, + { + "_path": "lib/python3.13/site-packages/typer/core.py", + "path_type": "hardlink", + "sha256": "0fbe7e1d802c87d518bcff8817381e93f4a0bb4dbd70978c7e097d039a97cc6a", + "size_in_bytes": 28151 + }, + { + "_path": "lib/python3.13/site-packages/typer/main.py", + "path_type": "hardlink", + "sha256": "d0889ca4413b20d4170a87c2395a74a57cb0ef6d238817b7c5421603b33572cd", + "size_in_bytes": 42360 + }, + { + "_path": "lib/python3.13/site-packages/typer/models.py", + "path_type": "hardlink", + "sha256": "43abfd05062eb4d947e388bb7e7d186d9f8e7915ec8226f5a3fb51e204e6aa8c", + "size_in_bytes": 17188 + }, + { + "_path": "lib/python3.13/site-packages/typer/params.py", + "path_type": "hardlink", + "sha256": "311542c113f334c90e75853a54d54691ac17fe00286336e209f2ffb58711eb1f", + "size_in_bytes": 14929 + }, + { + "_path": "lib/python3.13/site-packages/typer/py.typed", + "path_type": "hardlink", + "sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "size_in_bytes": 0 + }, + { + "_path": "lib/python3.13/site-packages/typer/rich_utils.py", + "path_type": "hardlink", + "sha256": "38d4d02c283c583ea780c4b986416afa08c255f515398f4daefc9d62d5b3ba52", + "size_in_bytes": 26260 + }, + { + "_path": "lib/python3.13/site-packages/typer/testing.py", + "path_type": "hardlink", + "sha256": "50053cb32c21ba795d03dc86e502d5044302b94ffc078382d1bbabcb3e7c3d1e", + "size_in_bytes": 884 + }, + { + "_path": "lib/python3.13/site-packages/typer/utils.py", + "path_type": "hardlink", + "sha256": "1b4a9d7435f4e98b47b8c24d0a68fe7eb2c96246317d46bb8b03ba28e4d7d852", + "size_in_bytes": 7368 + } + ], + "paths_version": 1 +} \ No newline at end of file diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/recipe/build-typer.sh b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/recipe/build-typer.sh new file mode 100644 index 0000000000000000000000000000000000000000..407f557cc0e27e04c6f74e8da8167e62dd4516e8 --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/recipe/build-typer.sh @@ -0,0 +1,5 @@ +#!/usr/bin/bash + +set -eoux pipefail + +${PYTHON} ${RECIPE_DIR}/build_typer.py \ No newline at end of file diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/recipe/conda_build_config.yaml b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/recipe/conda_build_config.yaml new file mode 100644 index 0000000000000000000000000000000000000000..35443075eec26f108f0f1f8a847504822dee0e0e --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/recipe/conda_build_config.yaml @@ -0,0 +1,28 @@ +c_compiler: gcc +channel_targets: defaults +cpu_optimization_target: nocona +cran_mirror: https://cran.r-project.org +cxx_compiler: gxx +extend_keys: +- extend_keys +- ignore_build_only_deps +- pin_run_as_build +- ignore_version +fortran_compiler: gfortran +ignore_build_only_deps: +- numpy +- python +lua: '5' +numpy: '1.26' +perl: 5.26.2 +pin_run_as_build: + python: + max_pin: x.x + min_pin: x.x + r-base: + max_pin: x.x + min_pin: x.x +platform: linux-64 +python: '3.13' +r_base: '3.5' +target_platform: linux-64 diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/recipe/meta.yaml b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/recipe/meta.yaml new file mode 100644 index 0000000000000000000000000000000000000000..3cf76e7a3a8869e2a7929e75691a724cbce9430c --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/recipe/meta.yaml @@ -0,0 +1,126 @@ +# This file created by conda-build 26.1.0 +# ------------------------------------------------ + +package: + name: typer + version: 0.20.0 +source: + - url: https://pypi.org/packages/source/t/typer-slim/typer_slim-0.20.0.tar.gz + sha256: 9fc6607b3c6c20f5c33ea9590cbeb17848667c51feee27d9e314a579ab07d1a3 + folder: typer-slim + - url: https://pypi.org/packages/source/t/typer-cli/typer_cli-0.20.0.tar.gz + sha256: af928da59aed5770f50e4c0f135f70ebf798d5bd00586d86d4c3015a5718a021 + folder: typer-cli + - url: https://pypi.org/packages/source/t/typer/typer-0.20.0.tar.gz + sha256: 1aaf6494031793e4876fb0bacfa6a912b551cf43c1e63c800df8b1a866720c37 + folder: typer +build: + entry_points: + - typer = typer.cli:main + number: 1 + string: py313h06a4308_1 +requirements: + host: + - _libgcc_mutex 0.1 main + - _openmp_mutex 5.1 1_gnu + - bzip2 1.0.8 h5eee18b_6 + - ca-certificates 2025.12.2 h06a4308_0 + - ld_impl_linux-64 2.44 h153f514_2 + - libexpat 2.7.4 h7354ed3_0 + - libffi 3.4.4 h6a678d5_1 + - libgcc 15.2.0 h69a1729_7 + - libgcc-ng 15.2.0 h166f726_7 + - libgomp 15.2.0 h4751f2c_7 + - libmpdec 4.0.0 h5eee18b_0 + - libstdcxx 15.2.0 h39759b7_7 + - libstdcxx-ng 15.2.0 hc03a8fd_7 + - libuuid 1.41.5 h5eee18b_0 + - libxcb 1.17.0 h9b100fa_0 + - libzlib 1.3.1 hb25bd0a_0 + - ncurses 6.5 h7934f7d_0 + - openssl 3.0.19 h1b28b03_0 + - packaging 25.0 py313h06a4308_1 + - pdm-backend 2.4.6 py313h893fd2c_0 + - pip 26.0.1 pyhc872135_0 + - pthread-stubs 0.3 h0ce48e5_1 + - pyproject_hooks 1.2.0 py313h06a4308_1 + - python 3.13.11 hcf712cf_100_cp313 + - python-build 1.3.0 py313h06a4308_1 + - python_abi 3.13 3_cp313 + - readline 8.3 hc2a1206_0 + - setuptools 80.10.2 py313h06a4308_0 + - sqlite 3.51.1 he0a8d7e_0 + - tk 8.6.15 h54e0aa7_0 + - tzdata 2025c he532380_0 + - wheel 0.46.3 py313h06a4308_0 + - xorg-libx11 1.8.12 h9b100fa_1 + - xorg-libxau 1.0.12 h9b100fa_0 + - xorg-libxdmcp 1.1.5 h9b100fa_0 + - xorg-xorgproto 2024.1 h5eee18b_1 + - xz 5.6.4 h5eee18b_1 + - zlib 1.3.1 hb25bd0a_0 + run: + - python >=3.13,<3.14.0a0 + - python_abi 3.13.* *_cp313 + - typer-slim-standard 0.20.0 py313h06a4308_1 + run_constrained: + - typer-cli 0.20.0.* + - typer-slim 0.20.0.* +test: + source_files: + - typer/docs_src + - typer/tests + imports: + - typer + requires: + - coverage + - pip + - pytest + commands: + - pip check + - typer --version + - typer --help + - cd typer && coverage run --source=typer --branch -m pytest -vv --color=yes --tb=long + -k "not ((multiple_values and main) or completion or invalid_score)" +about: + home: https://github.com/tiangolo/typer + license: MIT + license_family: MIT + license_file: typer/LICENSE + summary: A library for building CLI applications + description: 'Typer is library for building CLI applications that users will love + using and developers will love creating. Based on Python 3.6+ type hints. + + + The key features are: + + + Intuitive to write: Great editor support. Completion everywhere. Less time debugging. + Designed to be easy to use and learn. Less time reading docs. + + Easy to use: It''s easy to use for the final users. Automatic help, and automatic + completion for all shells. + + Short: Minimize code duplication. Multiple features from each parameter declaration. + Fewer bugs. + + Start simple: The simplest example adds only 2 lines of code to your app: 1 import, + 1 function call. + + Grow large: Grow in complexity as much as you want, create arbitrarily complex + trees of commands and groups of subcommands, with options and arguments. + + ' + doc_url: https://typer.tiangolo.com + dev_url: https://github.com/tiangolo/typer +extra: + recipe-maintainers: + - bollwyvl + - dfornika + final: true + copy_test_source_files: true + remote_url: https://github.com/AnacondaRecipes/typer-feedstock + sha: 51969b3c726d7cd624839468e48345c93facda2d + task_id: aFaBrfW3SqmiOYsWOdyonA + task_run_id: '0' + pbp_graph_uuid: 0198d78c-2340-4355-b284-2b231860ccae diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/recipe/parent/bld-typer.bat b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/recipe/parent/bld-typer.bat new file mode 100644 index 0000000000000000000000000000000000000000..27038d162cf1ca475d93c3ab92bacf277594bb22 --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/recipe/parent/bld-typer.bat @@ -0,0 +1,3 @@ +@echo off + +%PYTHON% %RECIPE_DIR%/build_typer.py \ No newline at end of file diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/recipe/parent/build-typer.sh b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/recipe/parent/build-typer.sh new file mode 100644 index 0000000000000000000000000000000000000000..407f557cc0e27e04c6f74e8da8167e62dd4516e8 --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/recipe/parent/build-typer.sh @@ -0,0 +1,5 @@ +#!/usr/bin/bash + +set -eoux pipefail + +${PYTHON} ${RECIPE_DIR}/build_typer.py \ No newline at end of file diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/recipe/parent/build_typer.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/recipe/parent/build_typer.py new file mode 100644 index 0000000000000000000000000000000000000000..79d236cb11e50a20ae214dba7c7b200a870b6ea0 --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/recipe/parent/build_typer.py @@ -0,0 +1,35 @@ +"""Handle custom (custom) build chain for `typer(-(slim|cli))`""" +import os +import sys +from subprocess import call +from pathlib import Path + +PKG_NAME = os.environ["PKG_NAME"] +PKG_SRC = Path(os.environ["SRC_DIR"]) / PKG_NAME + +def pym(*args): + args = [*map(str, args)] + print(">>>", *args, flush=True) + env = { + **os.environ, + # see https://github.com/tiangolo/typer/blob/0.12.1/pdm_build.py + "TIANGOLO_BUILD_PACKAGE": PKG_NAME, + } + + call([sys.executable, "-m", *args], cwd=str(PKG_SRC), env=env) + +def main(): + pym("build", "--no-isolation", "--wheel", ".") + pym( + "pip", + "install", + "-vvv", + "--no-deps", + "--disable-pip-version-check", + "--find-links=dist", + "--no-index", + PKG_NAME + ) + +if __name__ == "__main__": + main() \ No newline at end of file diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/recipe/parent/meta.yaml b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/recipe/parent/meta.yaml new file mode 100644 index 0000000000000000000000000000000000000000..9eacffba07302d58fefa4b71e68ebd86d903968d --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/recipe/parent/meta.yaml @@ -0,0 +1,164 @@ +{% set name = "typer" %} +{% set version = "0.20.0" %} + +package: + name: {{ name|lower }}-split + version: {{ version }} + +source: + - url: https://pypi.org/packages/source/{{ name[0] }}/{{ name }}-slim/{{ name }}_slim-{{ version }}.tar.gz + sha256: 9fc6607b3c6c20f5c33ea9590cbeb17848667c51feee27d9e314a579ab07d1a3 + folder: typer-slim + - url: https://pypi.org/packages/source/{{ name[0] }}/{{ name }}-cli/{{ name }}_cli-{{ version }}.tar.gz + sha256: af928da59aed5770f50e4c0f135f70ebf798d5bd00586d86d4c3015a5718a021 + folder: typer-cli + - url: https://pypi.org/packages/source/{{ name[0] }}/{{ name }}/{{ name }}-{{ version }}.tar.gz + sha256: 1aaf6494031793e4876fb0bacfa6a912b551cf43c1e63c800df8b1a866720c37 + folder: typer + +build: + number: 1 + skip: true # [py<38] + +requirements: + host: + - pip + - python + run: + - python + +outputs: + - name: typer-slim + script: build-typer.sh # [not win] + script: bld-typer.bat # [win] + requirements: + host: + - pip + - python + - python-build + - pdm-backend + run: + - python + - click >=8.0.0 + - typing_extensions >=3.7.4.3 + run_constrained: + # Prevent co-installation with mismatched typer or typer-cli + - typer {{ version }}.* + - typer-cli {{ version }}.* + - rich >=10.11.0 + - shellingham >=1.3.0 + test: + requires: + - pip + commands: + - pip check + + - name: typer-slim-standard + requirements: + host: + - pip + - python + run: + - python + - shellingham + - rich + - {{ pin_subpackage("typer-slim", exact=True) }} + run_constrained: + # Prevent co-installation with mismatched typer or typer-cli + - typer {{ version }}.* + - typer-cli {{ version }}.* + test: + requires: + - pip + commands: + - pip check + + - name: typer + script: build-typer.sh # [not win] + script: bld-typer.bat # [win] + build: + entry_points: + - typer = typer.cli:main + requirements: + host: + - pip + - python + - python-build + - pdm-backend + run: + - python + - {{ pin_subpackage("typer-slim-standard", exact=True) }} + run_constrained: + # Prevent co-installation with mismatched typer-slim or typer-cli + - typer-slim {{ version }}.* + - typer-cli {{ version }}.* + + {% set deselect_tests = "" %} + # TypeError: argument of type 'NoneType' is not iterable + {% set deselect_tests = deselect_tests + " --deselect=tests/test_tutorial/test_exceptions/test_tutorial003.py::test_traceback_rich_pretty_short_disable" %} # [win] + + test: + source_files: + - typer/tests + - typer/docs_src + imports: + - typer + requires: + - pip + - pytest + - coverage + commands: + - pip check + - typer --version + - typer --help + # Typer needs coverage to adequately run the tests + - cd typer && coverage run --source=typer --branch -m pytest -vv --color=yes --tb=long -k "not ((multiple_values and main) or completion or invalid_score)" {{ deselect_tests }} + + - name: typer-cli + script: build-typer.sh # [not win] + script: bld-typer.bat # [win] + requirements: + host: + - pip + - python + - pdm-backend + - python-build + run: + - python + - {{ pin_subpackage("typer", exact=True) }} + run_constrained: + # Prevent co-installation with mismatched typer-slim + - typer-slim {{ version }}.* + test: + requires: + - pip + commands: + - pip check + - typer --version + - typer --help + +about: + home: https://github.com/tiangolo/typer + license: MIT + license_family: MIT + license_file: typer/LICENSE + summary: A library for building CLI applications + + description: | + Typer is library for building CLI applications that users will love using and developers will love creating. Based on Python 3.6+ type hints. + + The key features are: + + Intuitive to write: Great editor support. Completion everywhere. Less time debugging. Designed to be easy to use and learn. Less time reading docs. + Easy to use: It's easy to use for the final users. Automatic help, and automatic completion for all shells. + Short: Minimize code duplication. Multiple features from each parameter declaration. Fewer bugs. + Start simple: The simplest example adds only 2 lines of code to your app: 1 import, 1 function call. + Grow large: Grow in complexity as much as you want, create arbitrarily complex trees of commands and groups of subcommands, with options and arguments. + + doc_url: https://typer.tiangolo.com + dev_url: https://github.com/tiangolo/typer + +extra: + recipe-maintainers: + - dfornika + - bollwyvl diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/repodata_record.json b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/repodata_record.json new file mode 100644 index 0000000000000000000000000000000000000000..e35e2333c8ee24289a84ce6e34e7dac5d9ed400f --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/repodata_record.json @@ -0,0 +1,27 @@ +{ + "arch": "x86_64", + "build": "py313h06a4308_1", + "build_number": 1, + "channel": "https://repo.anaconda.com/pkgs/main/linux-64/", + "constrains": [ + "typer-cli 0.20.0.*", + "typer-slim 0.20.0.*" + ], + "depends": [ + "python >=3.13,<3.14.0a0", + "python_abi 3.13.* *_cp313", + "typer-slim-standard 0.20.0 py313h06a4308_1" + ], + "fn": "typer-0.20.0-py313h06a4308_1.conda", + "license": "MIT", + "license_family": "MIT", + "md5": "d9b03aa4048c711087209d7c35e3fb32", + "name": "typer", + "platform": "linux", + "sha256": "abf3e9b5820c78d1ca3d41b91f9b7b67d13d3e6c3f2892cc10f6f2361b3f0c3f", + "size": 157493, + "subdir": "linux-64", + "timestamp": 1771513026000, + "url": "https://repo.anaconda.com/pkgs/main/linux-64/typer-0.20.0-py313h06a4308_1.conda", + "version": "0.20.0" +} \ No newline at end of file diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/run_test.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/run_test.py new file mode 100644 index 0000000000000000000000000000000000000000..b4c87f32d73a0c3e623540f40a7ee771e7eab6f5 --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/run_test.py @@ -0,0 +1,3 @@ +print("import: 'typer'") +import typer + diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/run_test.sh b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/run_test.sh new file mode 100644 index 0000000000000000000000000000000000000000..9d0654c2f43511095a2cc2201f7ef8be69e1f2a2 --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/run_test.sh @@ -0,0 +1,11 @@ + + +set -ex + + + +pip check +typer --version +typer --help +cd typer && coverage run --source=typer --branch -m pytest -vv --color=yes --tb=long -k "not ((multiple_values and main) or completion or invalid_score)" +exit 0 diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/test_time_dependencies.json b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/test_time_dependencies.json new file mode 100644 index 0000000000000000000000000000000000000000..38bad27b00e796597855563d44d78aa24bb840ae --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/test_time_dependencies.json @@ -0,0 +1 @@ +["pip", "coverage", "pytest"] \ No newline at end of file diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/app_dir/tutorial001.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/app_dir/tutorial001.py new file mode 100644 index 0000000000000000000000000000000000000000..2154957ec7ffd578fb58841bb75eea382d0f6994 --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/app_dir/tutorial001.py @@ -0,0 +1,16 @@ +from pathlib import Path + +import typer + +APP_NAME = "my-super-cli-app" + + +def main(): + app_dir = typer.get_app_dir(APP_NAME) + config_path: Path = Path(app_dir) / "config.json" + if not config_path.is_file(): + print("Config file doesn't exist yet") + + +if __name__ == "__main__": + typer.run(main) diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/arguments/default/tutorial001.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/arguments/default/tutorial001.py new file mode 100644 index 0000000000000000000000000000000000000000..eaaa85d4bbedf5516799b5090770320375b7ec44 --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/arguments/default/tutorial001.py @@ -0,0 +1,9 @@ +import typer + + +def main(name: str = typer.Argument("Wade Wilson")): + print(f"Hello {name}") + + +if __name__ == "__main__": + typer.run(main) diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/arguments/default/tutorial001_an.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/arguments/default/tutorial001_an.py new file mode 100644 index 0000000000000000000000000000000000000000..61e46749f2a4515c9282626ae5d9f11dce478889 --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/arguments/default/tutorial001_an.py @@ -0,0 +1,10 @@ +import typer +from typing_extensions import Annotated + + +def main(name: Annotated[str, typer.Argument()] = "Wade Wilson"): + print(f"Hello {name}") + + +if __name__ == "__main__": + typer.run(main) diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/arguments/default/tutorial002.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/arguments/default/tutorial002.py new file mode 100644 index 0000000000000000000000000000000000000000..2b516b20ac953ba4ffc94b62a13006a683480794 --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/arguments/default/tutorial002.py @@ -0,0 +1,15 @@ +import random + +import typer + + +def get_name(): + return random.choice(["Deadpool", "Rick", "Morty", "Hiro"]) + + +def main(name: str = typer.Argument(default_factory=get_name)): + print(f"Hello {name}") + + +if __name__ == "__main__": + typer.run(main) diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/arguments/default/tutorial002_an.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/arguments/default/tutorial002_an.py new file mode 100644 index 0000000000000000000000000000000000000000..64e0369d2cac8144d25308c844b1af8d4a3f7d35 --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/arguments/default/tutorial002_an.py @@ -0,0 +1,16 @@ +import random + +import typer +from typing_extensions import Annotated + + +def get_name(): + return random.choice(["Deadpool", "Rick", "Morty", "Hiro"]) + + +def main(name: Annotated[str, typer.Argument(default_factory=get_name)]): + print(f"Hello {name}") + + +if __name__ == "__main__": + typer.run(main) diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/arguments/envvar/tutorial001.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/arguments/envvar/tutorial001.py new file mode 100644 index 0000000000000000000000000000000000000000..5f16273e6370831a60dc259f5689072c3ea44e04 --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/arguments/envvar/tutorial001.py @@ -0,0 +1,9 @@ +import typer + + +def main(name: str = typer.Argument("World", envvar="AWESOME_NAME")): + print(f"Hello Mr. {name}") + + +if __name__ == "__main__": + typer.run(main) diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/arguments/envvar/tutorial001_an.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/arguments/envvar/tutorial001_an.py new file mode 100644 index 0000000000000000000000000000000000000000..d6c57921ee604b65e6f729b95a6fce02ed90a0a5 --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/arguments/envvar/tutorial001_an.py @@ -0,0 +1,10 @@ +import typer +from typing_extensions import Annotated + + +def main(name: Annotated[str, typer.Argument(envvar="AWESOME_NAME")] = "World"): + print(f"Hello Mr. {name}") + + +if __name__ == "__main__": + typer.run(main) diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/arguments/envvar/tutorial002.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/arguments/envvar/tutorial002.py new file mode 100644 index 0000000000000000000000000000000000000000..cf9d0303cd12476d9ced3adc210b5cbeb1031c15 --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/arguments/envvar/tutorial002.py @@ -0,0 +1,9 @@ +import typer + + +def main(name: str = typer.Argument("World", envvar=["AWESOME_NAME", "GOD_NAME"])): + print(f"Hello Mr. {name}") + + +if __name__ == "__main__": + typer.run(main) diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/arguments/envvar/tutorial002_an.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/arguments/envvar/tutorial002_an.py new file mode 100644 index 0000000000000000000000000000000000000000..ebc5575ef0719b283d46f43f45f0d3ba4b6602d1 --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/arguments/envvar/tutorial002_an.py @@ -0,0 +1,12 @@ +import typer +from typing_extensions import Annotated + + +def main( + name: Annotated[str, typer.Argument(envvar=["AWESOME_NAME", "GOD_NAME"])] = "World", +): + print(f"Hello Mr. {name}") + + +if __name__ == "__main__": + typer.run(main) diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/arguments/envvar/tutorial003.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/arguments/envvar/tutorial003.py new file mode 100644 index 0000000000000000000000000000000000000000..4dfb62f1e5180c56b6342b06588efcf9ad222739 --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/arguments/envvar/tutorial003.py @@ -0,0 +1,9 @@ +import typer + + +def main(name: str = typer.Argument("World", envvar="AWESOME_NAME", show_envvar=False)): + print(f"Hello Mr. {name}") + + +if __name__ == "__main__": + typer.run(main) diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/arguments/envvar/tutorial003_an.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/arguments/envvar/tutorial003_an.py new file mode 100644 index 0000000000000000000000000000000000000000..76205d2539486051f664767ca1b3123ea18049b6 --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/arguments/envvar/tutorial003_an.py @@ -0,0 +1,14 @@ +import typer +from typing_extensions import Annotated + + +def main( + name: Annotated[ + str, typer.Argument(envvar="AWESOME_NAME", show_envvar=False) + ] = "World", +): + print(f"Hello Mr. {name}") + + +if __name__ == "__main__": + typer.run(main) diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/arguments/help/tutorial001.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/arguments/help/tutorial001.py new file mode 100644 index 0000000000000000000000000000000000000000..dadbd7b6264d8e393a68a72b7b7221a81de9029f --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/arguments/help/tutorial001.py @@ -0,0 +1,9 @@ +import typer + + +def main(name: str = typer.Argument(..., help="The name of the user to greet")): + print(f"Hello {name}") + + +if __name__ == "__main__": + typer.run(main) diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/arguments/help/tutorial001_an.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/arguments/help/tutorial001_an.py new file mode 100644 index 0000000000000000000000000000000000000000..95ac95c14776b308a3907e7ade0a60e1f9391551 --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/arguments/help/tutorial001_an.py @@ -0,0 +1,10 @@ +import typer +from typing_extensions import Annotated + + +def main(name: Annotated[str, typer.Argument(help="The name of the user to greet")]): + print(f"Hello {name}") + + +if __name__ == "__main__": + typer.run(main) diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/arguments/help/tutorial002.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/arguments/help/tutorial002.py new file mode 100644 index 0000000000000000000000000000000000000000..170a411594dfc167ff0ccbb3fd1ac431632f3894 --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/arguments/help/tutorial002.py @@ -0,0 +1,12 @@ +import typer + + +def main(name: str = typer.Argument(..., help="The name of the user to greet")): + """ + Say hi to NAME very gently, like Dirk. + """ + print(f"Hello {name}") + + +if __name__ == "__main__": + typer.run(main) diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/arguments/help/tutorial002_an.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/arguments/help/tutorial002_an.py new file mode 100644 index 0000000000000000000000000000000000000000..b3557e65615617e8f85e4eacc05983677ae84562 --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/arguments/help/tutorial002_an.py @@ -0,0 +1,13 @@ +import typer +from typing_extensions import Annotated + + +def main(name: Annotated[str, typer.Argument(help="The name of the user to greet")]): + """ + Say hi to NAME very gently, like Dirk. + """ + print(f"Hello {name}") + + +if __name__ == "__main__": + typer.run(main) diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/arguments/help/tutorial003.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/arguments/help/tutorial003.py new file mode 100644 index 0000000000000000000000000000000000000000..237985f0e920901e1b42ebbd74254985f719cd1e --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/arguments/help/tutorial003.py @@ -0,0 +1,12 @@ +import typer + + +def main(name: str = typer.Argument("World", help="Who to greet")): + """ + Say hi to NAME very gently, like Dirk. + """ + print(f"Hello {name}") + + +if __name__ == "__main__": + typer.run(main) diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/arguments/help/tutorial003_an.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/arguments/help/tutorial003_an.py new file mode 100644 index 0000000000000000000000000000000000000000..cee1cdbfe39cc38d62c1801bc8b2405415b4121f --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/arguments/help/tutorial003_an.py @@ -0,0 +1,13 @@ +import typer +from typing_extensions import Annotated + + +def main(name: Annotated[str, typer.Argument(help="Who to greet")] = "World"): + """ + Say hi to NAME very gently, like Dirk. + """ + print(f"Hello {name}") + + +if __name__ == "__main__": + typer.run(main) diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/arguments/help/tutorial004.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/arguments/help/tutorial004.py new file mode 100644 index 0000000000000000000000000000000000000000..179eb67b9258e390245f6ee2e69ea61cbabce631 --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/arguments/help/tutorial004.py @@ -0,0 +1,12 @@ +import typer + + +def main(name: str = typer.Argument("World", help="Who to greet", show_default=False)): + """ + Say hi to NAME very gently, like Dirk. + """ + print(f"Hello {name}") + + +if __name__ == "__main__": + typer.run(main) diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/arguments/help/tutorial004_an.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/arguments/help/tutorial004_an.py new file mode 100644 index 0000000000000000000000000000000000000000..86f7e2e3a5a55d742a70ccc4cd9a83e018f74c22 --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/arguments/help/tutorial004_an.py @@ -0,0 +1,17 @@ +import typer +from typing_extensions import Annotated + + +def main( + name: Annotated[ + str, typer.Argument(help="Who to greet", show_default=False) + ] = "World", +): + """ + Say hi to NAME very gently, like Dirk. + """ + print(f"Hello {name}") + + +if __name__ == "__main__": + typer.run(main) diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/arguments/help/tutorial005.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/arguments/help/tutorial005.py new file mode 100644 index 0000000000000000000000000000000000000000..0419a4e3526fccee5ad208cbc16be541b5ebd8ac --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/arguments/help/tutorial005.py @@ -0,0 +1,13 @@ +import typer + + +def main( + name: str = typer.Argument( + "Wade Wilson", help="Who to greet", show_default="Deadpoolio the amazing's name" + ), +): + print(f"Hello {name}") + + +if __name__ == "__main__": + typer.run(main) diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/arguments/help/tutorial005_an.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/arguments/help/tutorial005_an.py new file mode 100644 index 0000000000000000000000000000000000000000..f61e8b6dcf25587a4c6fe0aed2a9078e15499aac --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/arguments/help/tutorial005_an.py @@ -0,0 +1,17 @@ +import typer +from typing_extensions import Annotated + + +def main( + name: Annotated[ + str, + typer.Argument( + help="Who to greet", show_default="Deadpoolio the amazing's name" + ), + ] = "Wade Wilson", +): + print(f"Hello {name}") + + +if __name__ == "__main__": + typer.run(main) diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/arguments/help/tutorial006.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/arguments/help/tutorial006.py new file mode 100644 index 0000000000000000000000000000000000000000..e502a506f41c85d5fbeb31d87a82a85a20a71b26 --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/arguments/help/tutorial006.py @@ -0,0 +1,9 @@ +import typer + + +def main(name: str = typer.Argument("World", metavar="✨username✨")): + print(f"Hello {name}") + + +if __name__ == "__main__": + typer.run(main) diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/arguments/help/tutorial006_an.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/arguments/help/tutorial006_an.py new file mode 100644 index 0000000000000000000000000000000000000000..4d745278b4c0baa921051935d280cb83179d4ce8 --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/arguments/help/tutorial006_an.py @@ -0,0 +1,10 @@ +import typer +from typing_extensions import Annotated + + +def main(name: Annotated[str, typer.Argument(metavar="✨username✨")] = "World"): + print(f"Hello {name}") + + +if __name__ == "__main__": + typer.run(main) diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/arguments/help/tutorial007.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/arguments/help/tutorial007.py new file mode 100644 index 0000000000000000000000000000000000000000..9738f4240e4c8c9fc271b0d34fae4cce430d4ad4 --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/arguments/help/tutorial007.py @@ -0,0 +1,20 @@ +import typer + + +def main( + name: str = typer.Argument(..., help="Who to greet"), + lastname: str = typer.Argument( + "", help="The last name", rich_help_panel="Secondary Arguments" + ), + age: str = typer.Argument( + "", help="The user's age", rich_help_panel="Secondary Arguments" + ), +): + """ + Say hi to NAME very gently, like Dirk. + """ + print(f"Hello {name}") + + +if __name__ == "__main__": + typer.run(main) diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/arguments/help/tutorial007_an.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/arguments/help/tutorial007_an.py new file mode 100644 index 0000000000000000000000000000000000000000..cf07e2b45d0b5ed6512f78b95673d3662cb26ab8 --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/arguments/help/tutorial007_an.py @@ -0,0 +1,22 @@ +import typer +from typing_extensions import Annotated + + +def main( + name: Annotated[str, typer.Argument(help="Who to greet")], + lastname: Annotated[ + str, typer.Argument(help="The last name", rich_help_panel="Secondary Arguments") + ] = "", + age: Annotated[ + str, + typer.Argument(help="The user's age", rich_help_panel="Secondary Arguments"), + ] = "", +): + """ + Say hi to NAME very gently, like Dirk. + """ + print(f"Hello {name}") + + +if __name__ == "__main__": + typer.run(main) diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/arguments/help/tutorial008.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/arguments/help/tutorial008.py new file mode 100644 index 0000000000000000000000000000000000000000..6701ec1de5341358e189a067e10581b062aa07ab --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/arguments/help/tutorial008.py @@ -0,0 +1,12 @@ +import typer + + +def main(name: str = typer.Argument("World", hidden=True)): + """ + Say hi to NAME very gently, like Dirk. + """ + print(f"Hello {name}") + + +if __name__ == "__main__": + typer.run(main) diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/arguments/help/tutorial008_an.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/arguments/help/tutorial008_an.py new file mode 100644 index 0000000000000000000000000000000000000000..aaa357f6bfef0e96400145f997b08cd1aeb3f22a --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/arguments/help/tutorial008_an.py @@ -0,0 +1,13 @@ +import typer +from typing_extensions import Annotated + + +def main(name: Annotated[str, typer.Argument(hidden=True)] = "World"): + """ + Say hi to NAME very gently, like Dirk. + """ + print(f"Hello {name}") + + +if __name__ == "__main__": + typer.run(main) diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/arguments/optional/tutorial001.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/arguments/optional/tutorial001.py new file mode 100644 index 0000000000000000000000000000000000000000..9c3a32b5069677f6608fd582c6442c09b9a9a0ee --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/arguments/optional/tutorial001.py @@ -0,0 +1,9 @@ +import typer + + +def main(name: str = typer.Argument()): + print(f"Hello {name}") + + +if __name__ == "__main__": + typer.run(main) diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/arguments/optional/tutorial001_an.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/arguments/optional/tutorial001_an.py new file mode 100644 index 0000000000000000000000000000000000000000..d2b49f42b5a33d75f0476a049e1d763400b4dcad --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/arguments/optional/tutorial001_an.py @@ -0,0 +1,10 @@ +import typer +from typing_extensions import Annotated + + +def main(name: Annotated[str, typer.Argument()]): + print(f"Hello {name}") + + +if __name__ == "__main__": + typer.run(main) diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/arguments/optional/tutorial002.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/arguments/optional/tutorial002.py new file mode 100644 index 0000000000000000000000000000000000000000..f81b1a454346c61722797bef9ccfba12e21295a7 --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/arguments/optional/tutorial002.py @@ -0,0 +1,9 @@ +import typer + + +def main(name: str = typer.Argument(default="World")): + print(f"Hello {name}!") + + +if __name__ == "__main__": + typer.run(main) diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/arguments/optional/tutorial002_an.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/arguments/optional/tutorial002_an.py new file mode 100644 index 0000000000000000000000000000000000000000..71c272a671dc89b1645aca694c89b23c4fb7139a --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/arguments/optional/tutorial002_an.py @@ -0,0 +1,10 @@ +import typer +from typing_extensions import Annotated + + +def main(name: Annotated[str, typer.Argument()] = "World"): + print(f"Hello {name}!") + + +if __name__ == "__main__": + typer.run(main) diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/arguments/optional/tutorial003.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/arguments/optional/tutorial003.py new file mode 100644 index 0000000000000000000000000000000000000000..88a0e64cc72386bd106cbd119a14c2a3789ce53a --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/arguments/optional/tutorial003.py @@ -0,0 +1,9 @@ +import typer + + +def main(name: str = typer.Argument(default=...)): + print(f"Hello {name}") + + +if __name__ == "__main__": + typer.run(main) diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/commands/arguments/tutorial001.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/commands/arguments/tutorial001.py new file mode 100644 index 0000000000000000000000000000000000000000..8178b2dfa7ded5496a60cdaf6b61c2d99c28a283 --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/commands/arguments/tutorial001.py @@ -0,0 +1,17 @@ +import typer + +app = typer.Typer() + + +@app.command() +def create(username: str): + print(f"Creating user: {username}") + + +@app.command() +def delete(username: str): + print(f"Deleting user: {username}") + + +if __name__ == "__main__": + app() diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/commands/callback/tutorial001.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/commands/callback/tutorial001.py new file mode 100644 index 0000000000000000000000000000000000000000..5dd5784f6ed6f66efa146d261a7b29fa8131eb79 --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/commands/callback/tutorial001.py @@ -0,0 +1,36 @@ +import typer + +app = typer.Typer() +state = {"verbose": False} + + +@app.command() +def create(username: str): + if state["verbose"]: + print("About to create a user") + print(f"Creating user: {username}") + if state["verbose"]: + print("Just created a user") + + +@app.command() +def delete(username: str): + if state["verbose"]: + print("About to delete a user") + print(f"Deleting user: {username}") + if state["verbose"]: + print("Just deleted a user") + + +@app.callback() +def main(verbose: bool = False): + """ + Manage users in the awesome CLI app. + """ + if verbose: + print("Will write verbose output") + state["verbose"] = True + + +if __name__ == "__main__": + app() diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/commands/callback/tutorial002.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/commands/callback/tutorial002.py new file mode 100644 index 0000000000000000000000000000000000000000..cb20ace884db5f07afbbb03882b3ea04dd4dca6c --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/commands/callback/tutorial002.py @@ -0,0 +1,17 @@ +import typer + + +def callback(): + print("Running a command") + + +app = typer.Typer(callback=callback) + + +@app.command() +def create(name: str): + print(f"Creating user: {name}") + + +if __name__ == "__main__": + app() diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/commands/callback/tutorial003.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/commands/callback/tutorial003.py new file mode 100644 index 0000000000000000000000000000000000000000..75c5bc1fa175cb01b99d27d294648b69cd5d156c --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/commands/callback/tutorial003.py @@ -0,0 +1,22 @@ +import typer + + +def callback(): + print("Running a command") + + +app = typer.Typer(callback=callback) + + +@app.callback() +def new_callback(): + print("Override callback, running a command") + + +@app.command() +def create(name: str): + print(f"Creating user: {name}") + + +if __name__ == "__main__": + app() diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/commands/callback/tutorial004.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/commands/callback/tutorial004.py new file mode 100644 index 0000000000000000000000000000000000000000..fcc9dca3cce45d352df5859edbfbfc64ae5d6c21 --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/commands/callback/tutorial004.py @@ -0,0 +1,23 @@ +import typer + +app = typer.Typer() + + +@app.callback() +def callback(): + """ + Manage users CLI app. + + Use it with the create command. + + A new user with the given NAME will be created. + """ + + +@app.command() +def create(name: str): + print(f"Creating user: {name}") + + +if __name__ == "__main__": + app() diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/commands/context/tutorial001.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/commands/context/tutorial001.py new file mode 100644 index 0000000000000000000000000000000000000000..5262df914636607dcf918eec13925f9f181dc463 --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/commands/context/tutorial001.py @@ -0,0 +1,25 @@ +import typer + +app = typer.Typer() + + +@app.command() +def create(username: str): + print(f"Creating user: {username}") + + +@app.command() +def delete(username: str): + print(f"Deleting user: {username}") + + +@app.callback() +def main(ctx: typer.Context): + """ + Manage users in the awesome CLI app. + """ + print(f"About to execute command: {ctx.invoked_subcommand}") + + +if __name__ == "__main__": + app() diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/commands/context/tutorial002.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/commands/context/tutorial002.py new file mode 100644 index 0000000000000000000000000000000000000000..e3964852423088ece0e70ae81be66439efa28ffe --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/commands/context/tutorial002.py @@ -0,0 +1,25 @@ +import typer + +app = typer.Typer() + + +@app.command() +def create(username: str): + print(f"Creating user: {username}") + + +@app.command() +def delete(username: str): + print(f"Deleting user: {username}") + + +@app.callback(invoke_without_command=True) +def main(): + """ + Manage users in the awesome CLI app. + """ + print("Initializing database") + + +if __name__ == "__main__": + app() diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/commands/context/tutorial003.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/commands/context/tutorial003.py new file mode 100644 index 0000000000000000000000000000000000000000..4782d47e1825fb267f660126f94e9e4e8ab1e8d9 --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/commands/context/tutorial003.py @@ -0,0 +1,26 @@ +import typer + +app = typer.Typer() + + +@app.command() +def create(username: str): + print(f"Creating user: {username}") + + +@app.command() +def delete(username: str): + print(f"Deleting user: {username}") + + +@app.callback(invoke_without_command=True) +def main(ctx: typer.Context): + """ + Manage users in the awesome CLI app. + """ + if ctx.invoked_subcommand is None: + print("Initializing database") + + +if __name__ == "__main__": + app() diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/commands/context/tutorial004.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/commands/context/tutorial004.py new file mode 100644 index 0000000000000000000000000000000000000000..d0401034573f444ffd45dd74f7a1e4df9d0f8881 --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/commands/context/tutorial004.py @@ -0,0 +1,15 @@ +import typer + +app = typer.Typer() + + +@app.command( + context_settings={"allow_extra_args": True, "ignore_unknown_options": True} +) +def main(ctx: typer.Context): + for extra_arg in ctx.args: + print(f"Got extra arg: {extra_arg}") + + +if __name__ == "__main__": + app() diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/commands/help/tutorial001.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/commands/help/tutorial001.py new file mode 100644 index 0000000000000000000000000000000000000000..90726a0b13bc2f50abb28c3af723a177ddedf04c --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/commands/help/tutorial001.py @@ -0,0 +1,62 @@ +import typer + +app = typer.Typer(help="Awesome CLI user manager.") + + +@app.command() +def create(username: str): + """ + Create a new user with USERNAME. + """ + print(f"Creating user: {username}") + + +@app.command() +def delete( + username: str, + force: bool = typer.Option( + ..., + prompt="Are you sure you want to delete the user?", + help="Force deletion without confirmation.", + ), +): + """ + Delete a user with USERNAME. + + If --force is not used, will ask for confirmation. + """ + if force: + print(f"Deleting user: {username}") + else: + print("Operation cancelled") + + +@app.command() +def delete_all( + force: bool = typer.Option( + ..., + prompt="Are you sure you want to delete ALL users?", + help="Force deletion without confirmation.", + ), +): + """ + Delete ALL users in the database. + + If --force is not used, will ask for confirmation. + """ + if force: + print("Deleting all users") + else: + print("Operation cancelled") + + +@app.command() +def init(): + """ + Initialize the users database. + """ + print("Initializing user database") + + +if __name__ == "__main__": + app() diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/commands/help/tutorial001_an.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/commands/help/tutorial001_an.py new file mode 100644 index 0000000000000000000000000000000000000000..748655327c75db86fe8ab420c4f65c005ef8af79 --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/commands/help/tutorial001_an.py @@ -0,0 +1,67 @@ +import typer +from typing_extensions import Annotated + +app = typer.Typer(help="Awesome CLI user manager.") + + +@app.command() +def create(username: str): + """ + Create a new user with USERNAME. + """ + print(f"Creating user: {username}") + + +@app.command() +def delete( + username: str, + force: Annotated[ + bool, + typer.Option( + prompt="Are you sure you want to delete the user?", + help="Force deletion without confirmation.", + ), + ], +): + """ + Delete a user with USERNAME. + + If --force is not used, will ask for confirmation. + """ + if force: + print(f"Deleting user: {username}") + else: + print("Operation cancelled") + + +@app.command() +def delete_all( + force: Annotated[ + bool, + typer.Option( + prompt="Are you sure you want to delete ALL users?", + help="Force deletion without confirmation.", + ), + ], +): + """ + Delete ALL users in the database. + + If --force is not used, will ask for confirmation. + """ + if force: + print("Deleting all users") + else: + print("Operation cancelled") + + +@app.command() +def init(): + """ + Initialize the users database. + """ + print("Initializing user database") + + +if __name__ == "__main__": + app() diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/commands/help/tutorial002.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/commands/help/tutorial002.py new file mode 100644 index 0000000000000000000000000000000000000000..c3442f071c74fd6be5a3ca03ff8f2063b221cac8 --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/commands/help/tutorial002.py @@ -0,0 +1,23 @@ +import typer + +app = typer.Typer() + + +@app.command(help="Create a new user with USERNAME.") +def create(username: str): + """ + Some internal utility function to create. + """ + print(f"Creating user: {username}") + + +@app.command(help="Delete a user with USERNAME.") +def delete(username: str): + """ + Some internal utility function to delete. + """ + print(f"Deleting user: {username}") + + +if __name__ == "__main__": + app() diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/commands/help/tutorial003.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/commands/help/tutorial003.py new file mode 100644 index 0000000000000000000000000000000000000000..6ea50b081b774444461d63b3f77fc66bfb31f97e --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/commands/help/tutorial003.py @@ -0,0 +1,25 @@ +import typer + +app = typer.Typer() + + +@app.command() +def create(username: str): + """ + Create a user. + """ + print(f"Creating user: {username}") + + +@app.command(deprecated=True) +def delete(username: str): + """ + Delete a user. + + This is deprecated and will stop being supported soon. + """ + print(f"Deleting user: {username}") + + +if __name__ == "__main__": + app() diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/commands/help/tutorial004.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/commands/help/tutorial004.py new file mode 100644 index 0000000000000000000000000000000000000000..1e078173294f7b774e9239bc1334066a37029b0d --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/commands/help/tutorial004.py @@ -0,0 +1,34 @@ +import typer + +app = typer.Typer(rich_markup_mode="rich") + + +@app.command() +def create( + username: str = typer.Argument( + ..., help="The username to be [green]created[/green]" + ), +): + """ + [bold green]Create[/bold green] a new [italic]shiny[/italic] user. :sparkles: + + This requires a [underline]username[/underline]. + """ + print(f"Creating user: {username}") + + +@app.command(help="[bold red]Delete[/bold red] a user with [italic]USERNAME[/italic].") +def delete( + username: str = typer.Argument(..., help="The username to be [red]deleted[/red]"), + force: bool = typer.Option( + False, help="Force the [bold red]deletion[/bold red] :boom:" + ), +): + """ + Some internal utility function to delete. + """ + print(f"Deleting user: {username}") + + +if __name__ == "__main__": + app() diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/commands/help/tutorial004_an.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/commands/help/tutorial004_an.py new file mode 100644 index 0000000000000000000000000000000000000000..e5c40e58ee2e9fbb8963fa1b89742f8d1a38de52 --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/commands/help/tutorial004_an.py @@ -0,0 +1,37 @@ +import typer +from typing_extensions import Annotated + +app = typer.Typer(rich_markup_mode="rich") + + +@app.command() +def create( + username: Annotated[ + str, typer.Argument(help="The username to be [green]created[/green]") + ], +): + """ + [bold green]Create[/bold green] a new [italic]shinny[/italic] user. :sparkles: + + This requires a [underline]username[/underline]. + """ + print(f"Creating user: {username}") + + +@app.command(help="[bold red]Delete[/bold red] a user with [italic]USERNAME[/italic].") +def delete( + username: Annotated[ + str, typer.Argument(help="The username to be [red]deleted[/red]") + ], + force: Annotated[ + bool, typer.Option(help="Force the [bold red]deletion[/bold red] :boom:") + ] = False, +): + """ + Some internal utility function to delete. + """ + print(f"Deleting user: {username}") + + +if __name__ == "__main__": + app() diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/commands/help/tutorial005.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/commands/help/tutorial005.py new file mode 100644 index 0000000000000000000000000000000000000000..0b577c1c4749f5b6b08345553666cd58ef0765d5 --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/commands/help/tutorial005.py @@ -0,0 +1,34 @@ +import typer + +app = typer.Typer(rich_markup_mode="markdown") + + +@app.command() +def create(username: str = typer.Argument(..., help="The username to be **created**")): + """ + **Create** a new *shiny* user. :sparkles: + + * Create a username + + * Show that the username is created + + --- + + Learn more at the [Typer docs website](https://typer.tiangolo.com) + """ + print(f"Creating user: {username}") + + +@app.command(help="**Delete** a user with *USERNAME*.") +def delete( + username: str = typer.Argument(..., help="The username to be **deleted**"), + force: bool = typer.Option(False, help="Force the **deletion** :boom:"), +): + """ + Some internal utility function to delete. + """ + print(f"Deleting user: {username}") + + +if __name__ == "__main__": + app() diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/commands/help/tutorial005_an.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/commands/help/tutorial005_an.py new file mode 100644 index 0000000000000000000000000000000000000000..020d4ed85ffb619f920e7a03d370c905831008ba --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/commands/help/tutorial005_an.py @@ -0,0 +1,37 @@ +import typer +from typing_extensions import Annotated + +app = typer.Typer(rich_markup_mode="markdown") + + +@app.command() +def create( + username: Annotated[str, typer.Argument(help="The username to be **created**")], +): + """ + **Create** a new *shinny* user. :sparkles: + + * Create a username + + * Show that the username is created + + --- + + Learn more at the [Typer docs website](https://typer.tiangolo.com) + """ + print(f"Creating user: {username}") + + +@app.command(help="**Delete** a user with *USERNAME*.") +def delete( + username: Annotated[str, typer.Argument(help="The username to be **deleted**")], + force: Annotated[bool, typer.Option(help="Force the **deletion** :boom:")] = False, +): + """ + Some internal utility function to delete. + """ + print(f"Deleting user: {username}") + + +if __name__ == "__main__": + app() diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/commands/help/tutorial006.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/commands/help/tutorial006.py new file mode 100644 index 0000000000000000000000000000000000000000..b10ad75ad168166965d77cb9bc15e941e5c8db52 --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/commands/help/tutorial006.py @@ -0,0 +1,55 @@ +import typer + +app = typer.Typer(rich_markup_mode="rich") + + +@app.command() +def create(username: str): + """ + [green]Create[/green] a new user. :sparkles: + """ + print(f"Creating user: {username}") + + +@app.command() +def delete(username: str): + """ + [red]Delete[/red] a user. :fire: + """ + print(f"Deleting user: {username}") + + +@app.command(rich_help_panel="Utils and Configs") +def config(configuration: str): + """ + [blue]Configure[/blue] the system. :wrench: + """ + print(f"Configuring the system with: {configuration}") + + +@app.command(rich_help_panel="Utils and Configs") +def sync(): + """ + [blue]Synchronize[/blue] the system or something fancy like that. :recycle: + """ + print("Syncing the system") + + +@app.command(rich_help_panel="Help and Others") +def help(): + """ + Get [yellow]help[/yellow] with the system. :question: + """ + print("Opening help portal...") + + +@app.command(rich_help_panel="Help and Others") +def report(): + """ + [yellow]Report[/yellow] an issue. :bug: + """ + print("Please open a new issue online, not a direct message") + + +if __name__ == "__main__": + app() diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/commands/help/tutorial007.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/commands/help/tutorial007.py new file mode 100644 index 0000000000000000000000000000000000000000..6d59ed6ab37758a860e8daf681f368a446ecbf52 --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/commands/help/tutorial007.py @@ -0,0 +1,39 @@ +from typing import Union + +import typer + +app = typer.Typer(rich_markup_mode="rich") + + +@app.command() +def create( + username: str = typer.Argument(..., help="The username to create"), + lastname: str = typer.Argument( + "", help="The last name of the new user", rich_help_panel="Secondary Arguments" + ), + force: bool = typer.Option(False, help="Force the creation of the user"), + age: Union[int, None] = typer.Option( + None, help="The age of the new user", rich_help_panel="Additional Data" + ), + favorite_color: Union[str, None] = typer.Option( + None, + help="The favorite color of the new user", + rich_help_panel="Additional Data", + ), +): + """ + [green]Create[/green] a new user. :sparkles: + """ + print(f"Creating user: {username}") + + +@app.command(rich_help_panel="Utils and Configs") +def config(configuration: str): + """ + [blue]Configure[/blue] the system. :wrench: + """ + print(f"Configuring the system with: {configuration}") + + +if __name__ == "__main__": + app() diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/commands/help/tutorial007_an.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/commands/help/tutorial007_an.py new file mode 100644 index 0000000000000000000000000000000000000000..cd1dcc39f67154967a6e62006a3e8887e350e68b --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/commands/help/tutorial007_an.py @@ -0,0 +1,46 @@ +from typing import Union + +import typer +from typing_extensions import Annotated + +app = typer.Typer(rich_markup_mode="rich") + + +@app.command() +def create( + username: Annotated[str, typer.Argument(help="The username to create")], + lastname: Annotated[ + str, + typer.Argument( + help="The last name of the new user", rich_help_panel="Secondary Arguments" + ), + ] = "", + force: Annotated[bool, typer.Option(help="Force the creation of the user")] = False, + age: Annotated[ + Union[int, None], + typer.Option(help="The age of the new user", rich_help_panel="Additional Data"), + ] = None, + favorite_color: Annotated[ + Union[str, None], + typer.Option( + help="The favorite color of the new user", + rich_help_panel="Additional Data", + ), + ] = None, +): + """ + [green]Create[/green] a new user. :sparkles: + """ + print(f"Creating user: {username}") + + +@app.command(rich_help_panel="Utils and Configs") +def config(configuration: str): + """ + [blue]Configure[/blue] the system. :wrench: + """ + print(f"Configuring the system with: {configuration}") + + +if __name__ == "__main__": + app() diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/commands/help/tutorial008.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/commands/help/tutorial008.py new file mode 100644 index 0000000000000000000000000000000000000000..a4f8330e9359d23726665b35684aef0909789e6d --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/commands/help/tutorial008.py @@ -0,0 +1,15 @@ +import typer + +app = typer.Typer(rich_markup_mode="rich") + + +@app.command(epilog="Made with :heart: in [blue]Venus[/blue]") +def create(username: str): + """ + [green]Create[/green] a new user. :sparkles: + """ + print(f"Creating user: {username}") + + +if __name__ == "__main__": + app() diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/commands/index/tutorial001.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/commands/index/tutorial001.py new file mode 100644 index 0000000000000000000000000000000000000000..2377d549ed78062fccb834f528c7090bfc665da1 --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/commands/index/tutorial001.py @@ -0,0 +1,12 @@ +import typer + +app = typer.Typer() + + +@app.command() +def main(name: str): + print(f"Hello {name}") + + +if __name__ == "__main__": + app() diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/commands/index/tutorial002.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/commands/index/tutorial002.py new file mode 100644 index 0000000000000000000000000000000000000000..1ed8610db8933842fb8c1b40c8c8b723f9172f5d --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/commands/index/tutorial002.py @@ -0,0 +1,17 @@ +import typer + +app = typer.Typer() + + +@app.command() +def create(): + print("Creating user: Hiro Hamada") + + +@app.command() +def delete(): + print("Deleting user: Hiro Hamada") + + +if __name__ == "__main__": + app() diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/commands/index/tutorial003.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/commands/index/tutorial003.py new file mode 100644 index 0000000000000000000000000000000000000000..4460db155e81d0a79fbfac208637a8708e015d32 --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/commands/index/tutorial003.py @@ -0,0 +1,17 @@ +import typer + +app = typer.Typer(no_args_is_help=True) + + +@app.command() +def create(): + print("Creating user: Hiro Hamada") + + +@app.command() +def delete(): + print("Deleting user: Hiro Hamada") + + +if __name__ == "__main__": + app() diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/commands/index/tutorial004.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/commands/index/tutorial004.py new file mode 100644 index 0000000000000000000000000000000000000000..83419b695f4954d564f8c25d618a728fe9a5b76a --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/commands/index/tutorial004.py @@ -0,0 +1,17 @@ +import typer + +app = typer.Typer() + + +@app.command() +def delete(): + print("Deleting user: Hiro Hamada") + + +@app.command() +def create(): + print("Creating user: Hiro Hamada") + + +if __name__ == "__main__": + app() diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/commands/index/tutorial005.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/commands/index/tutorial005.py new file mode 100644 index 0000000000000000000000000000000000000000..ef9e5ded7b39c9bec192ca59b8a75285b52b4a78 --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/commands/index/tutorial005.py @@ -0,0 +1,17 @@ +import typer + +app = typer.Typer(suggest_commands=True) + + +@app.command() +def create(): + typer.echo("Creating...") + + +@app.command() +def delete(): + typer.echo("Deleting...") + + +if __name__ == "__main__": + app() diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/commands/name/tutorial001.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/commands/name/tutorial001.py new file mode 100644 index 0000000000000000000000000000000000000000..cda0ef09e627821d145697af389c5e291bfaef4f --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/commands/name/tutorial001.py @@ -0,0 +1,17 @@ +import typer + +app = typer.Typer() + + +@app.command("create") +def cli_create_user(username: str): + print(f"Creating user: {username}") + + +@app.command("delete") +def cli_delete_user(username: str): + print(f"Deleting user: {username}") + + +if __name__ == "__main__": + app() diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/commands/one_or_multiple/tutorial001.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/commands/one_or_multiple/tutorial001.py new file mode 100644 index 0000000000000000000000000000000000000000..cf6bdb7ee6bfee42cf3843fd98fc90e6dd92b0af --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/commands/one_or_multiple/tutorial001.py @@ -0,0 +1,17 @@ +import typer + +app = typer.Typer() + + +@app.command() +def create(): + print("Creating user: Hiro Hamada") + + +@app.callback() +def callback(): + pass + + +if __name__ == "__main__": + app() diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/commands/one_or_multiple/tutorial002.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/commands/one_or_multiple/tutorial002.py new file mode 100644 index 0000000000000000000000000000000000000000..351f3df4f3a82239efaf42f0731200ea3be99d5b --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/commands/one_or_multiple/tutorial002.py @@ -0,0 +1,21 @@ +import typer + +app = typer.Typer() + + +@app.command() +def create(): + print("Creating user: Hiro Hamada") + + +@app.callback() +def callback(): + """ + Creates a single user Hiro Hamada. + + In the next version it will create 5 more users. + """ + + +if __name__ == "__main__": + app() diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/commands/options/tutorial001.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/commands/options/tutorial001.py new file mode 100644 index 0000000000000000000000000000000000000000..b8dccd5e716f0b25ffe477bbe6b12baa31ab8f50 --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/commands/options/tutorial001.py @@ -0,0 +1,40 @@ +import typer + +app = typer.Typer() + + +@app.command() +def create(username: str): + print(f"Creating user: {username}") + + +@app.command() +def delete( + username: str, + force: bool = typer.Option(..., prompt="Are you sure you want to delete the user?"), +): + if force: + print(f"Deleting user: {username}") + else: + print("Operation cancelled") + + +@app.command() +def delete_all( + force: bool = typer.Option( + ..., prompt="Are you sure you want to delete ALL users?" + ), +): + if force: + print("Deleting all users") + else: + print("Operation cancelled") + + +@app.command() +def init(): + print("Initializing user database") + + +if __name__ == "__main__": + app() diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/commands/options/tutorial001_an.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/commands/options/tutorial001_an.py new file mode 100644 index 0000000000000000000000000000000000000000..5d0e1e47e78334c906407ddc10a874be066211b6 --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/commands/options/tutorial001_an.py @@ -0,0 +1,43 @@ +import typer +from typing_extensions import Annotated + +app = typer.Typer() + + +@app.command() +def create(username: str): + print(f"Creating user: {username}") + + +@app.command() +def delete( + username: str, + force: Annotated[ + bool, typer.Option(prompt="Are you sure you want to delete the user?") + ], +): + if force: + print(f"Deleting user: {username}") + else: + print("Operation cancelled") + + +@app.command() +def delete_all( + force: Annotated[ + bool, typer.Option(prompt="Are you sure you want to delete ALL users?") + ], +): + if force: + print("Deleting all users") + else: + print("Operation cancelled") + + +@app.command() +def init(): + print("Initializing user database") + + +if __name__ == "__main__": + app() diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/exceptions/tutorial001.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/exceptions/tutorial001.py new file mode 100644 index 0000000000000000000000000000000000000000..071c28c3aff3e52d8f8efbe33b067ef2afc04c52 --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/exceptions/tutorial001.py @@ -0,0 +1,9 @@ +import typer + + +def main(name: str = "morty"): + print(name + 3) + + +if __name__ == "__main__": + typer.run(main) diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/exceptions/tutorial002.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/exceptions/tutorial002.py new file mode 100644 index 0000000000000000000000000000000000000000..9c66a0bf0cb467dd89713ba854dc663419dd90e1 --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/exceptions/tutorial002.py @@ -0,0 +1,12 @@ +import typer + +app = typer.Typer(pretty_exceptions_show_locals=False) + + +@app.command() +def main(password: str): + print(password + 3) + + +if __name__ == "__main__": + app() diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/exceptions/tutorial003.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/exceptions/tutorial003.py new file mode 100644 index 0000000000000000000000000000000000000000..656203c566bbf167bac0d7d91d477e5986f69df4 --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/exceptions/tutorial003.py @@ -0,0 +1,12 @@ +import typer + +app = typer.Typer(pretty_exceptions_short=False) + + +@app.command() +def main(name: str = "morty"): + print(name + 3) + + +if __name__ == "__main__": + app() diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/exceptions/tutorial004.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/exceptions/tutorial004.py new file mode 100644 index 0000000000000000000000000000000000000000..660c58ecc37c371ebdde352baafad15a8a81170d --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/exceptions/tutorial004.py @@ -0,0 +1,12 @@ +import typer + +app = typer.Typer(pretty_exceptions_enable=False) + + +@app.command() +def main(name: str = "morty"): + print(name + 3) + + +if __name__ == "__main__": + app() diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/first_steps/tutorial001.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/first_steps/tutorial001.py new file mode 100644 index 0000000000000000000000000000000000000000..94897dafef980624aac10f12cdd34878cbb4f252 --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/first_steps/tutorial001.py @@ -0,0 +1,9 @@ +import typer + + +def main(): + print("Hello World") + + +if __name__ == "__main__": + typer.run(main) diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/first_steps/tutorial002.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/first_steps/tutorial002.py new file mode 100644 index 0000000000000000000000000000000000000000..bb1e5c7b5ff10c2fd327d5a16e56fadcb95fe86b --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/first_steps/tutorial002.py @@ -0,0 +1,9 @@ +import typer + + +def main(name: str): + print(f"Hello {name}") + + +if __name__ == "__main__": + typer.run(main) diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/first_steps/tutorial003.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/first_steps/tutorial003.py new file mode 100644 index 0000000000000000000000000000000000000000..377b045fa1ebd5f2f29cc8a1925297922b90ec9b --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/first_steps/tutorial003.py @@ -0,0 +1,9 @@ +import typer + + +def main(name: str, lastname: str): + print(f"Hello {name} {lastname}") + + +if __name__ == "__main__": + typer.run(main) diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/first_steps/tutorial004.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/first_steps/tutorial004.py new file mode 100644 index 0000000000000000000000000000000000000000..4a11dc020fb0d3cb5610d1d4a9226e0abe9f2c81 --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/first_steps/tutorial004.py @@ -0,0 +1,12 @@ +import typer + + +def main(name: str, lastname: str, formal: bool = False): + if formal: + print(f"Good day Ms. {name} {lastname}.") + else: + print(f"Hello {name} {lastname}") + + +if __name__ == "__main__": + typer.run(main) diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/first_steps/tutorial005.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/first_steps/tutorial005.py new file mode 100644 index 0000000000000000000000000000000000000000..25bc963a90eca3aee302af66eb68ea46c6b83b34 --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/first_steps/tutorial005.py @@ -0,0 +1,12 @@ +import typer + + +def main(name: str, lastname: str = "", formal: bool = False): + if formal: + print(f"Good day Ms. {name} {lastname}.") + else: + print(f"Hello {name} {lastname}") + + +if __name__ == "__main__": + typer.run(main) diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/first_steps/tutorial006.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/first_steps/tutorial006.py new file mode 100644 index 0000000000000000000000000000000000000000..102ce8d70e0d98eb95ac08d76591a99f52d0c67f --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/first_steps/tutorial006.py @@ -0,0 +1,17 @@ +import typer + + +def main(name: str, lastname: str = "", formal: bool = False): + """ + Say hi to NAME, optionally with a --lastname. + + If --formal is used, say hi very formally. + """ + if formal: + print(f"Good day Ms. {name} {lastname}.") + else: + print(f"Hello {name} {lastname}") + + +if __name__ == "__main__": + typer.run(main) diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/launch/tutorial001.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/launch/tutorial001.py new file mode 100644 index 0000000000000000000000000000000000000000..4b5145f386d44c9de13483d8b52b080581b87dfa --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/launch/tutorial001.py @@ -0,0 +1,10 @@ +import typer + + +def main(): + print("Opening Typer's docs") + typer.launch("https://typer.tiangolo.com") + + +if __name__ == "__main__": + typer.run(main) diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/launch/tutorial002.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/launch/tutorial002.py new file mode 100644 index 0000000000000000000000000000000000000000..752513ca9fb73703653a2695c2e2fc2d88705627 --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/launch/tutorial002.py @@ -0,0 +1,21 @@ +from pathlib import Path + +import typer + +APP_NAME = "my-super-cli-app" + + +def main(): + app_dir = typer.get_app_dir(APP_NAME) + app_dir_path = Path(app_dir) + app_dir_path.mkdir(parents=True, exist_ok=True) + config_path: Path = Path(app_dir) / "config.json" + if not config_path.is_file(): + config_path.write_text('{"version": "1.0.0"}') + config_file_str = str(config_path) + print("Opening config directory") + typer.launch(config_file_str, locate=True) + + +if __name__ == "__main__": + typer.run(main) diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/multiple_values/arguments_with_multiple_values/tutorial001.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/multiple_values/arguments_with_multiple_values/tutorial001.py new file mode 100644 index 0000000000000000000000000000000000000000..32782fefb4728a30a515c000e37494543d938640 --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/multiple_values/arguments_with_multiple_values/tutorial001.py @@ -0,0 +1,15 @@ +from pathlib import Path +from typing import List + +import typer + + +def main(files: List[Path], celebration: str): + for path in files: + if path.is_file(): + print(f"This file exists: {path.name}") + print(celebration) + + +if __name__ == "__main__": + typer.run(main) diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/multiple_values/arguments_with_multiple_values/tutorial002.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/multiple_values/arguments_with_multiple_values/tutorial002.py new file mode 100644 index 0000000000000000000000000000000000000000..8c1e74c227b62bc7746f12b68764340f0ceedebf --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/multiple_values/arguments_with_multiple_values/tutorial002.py @@ -0,0 +1,16 @@ +from typing import Tuple + +import typer + + +def main( + names: Tuple[str, str, str] = typer.Argument( + ("Harry", "Hermione", "Ron"), help="Select 3 characters to play with" + ), +): + for name in names: + print(f"Hello {name}") + + +if __name__ == "__main__": + typer.run(main) diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/multiple_values/arguments_with_multiple_values/tutorial002_an.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/multiple_values/arguments_with_multiple_values/tutorial002_an.py new file mode 100644 index 0000000000000000000000000000000000000000..46d1a5e208cd67140b23464685c3865a93eb6a1f --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/multiple_values/arguments_with_multiple_values/tutorial002_an.py @@ -0,0 +1,17 @@ +from typing import Tuple + +import typer +from typing_extensions import Annotated + + +def main( + names: Annotated[ + Tuple[str, str, str], typer.Argument(help="Select 3 characters to play with") + ] = ("Harry", "Hermione", "Ron"), +): + for name in names: + print(f"Hello {name}") + + +if __name__ == "__main__": + typer.run(main) diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/multiple_values/multiple_options/tutorial001.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/multiple_values/multiple_options/tutorial001.py new file mode 100644 index 0000000000000000000000000000000000000000..bce2322915ccd6e3859ecabb925567c8d34c3191 --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/multiple_values/multiple_options/tutorial001.py @@ -0,0 +1,15 @@ +from typing import List, Optional + +import typer + + +def main(user: Optional[List[str]] = typer.Option(None)): + if not user: + print(f"No provided users (raw input = {user})") + raise typer.Abort() + for u in user: + print(f"Processing user: {u}") + + +if __name__ == "__main__": + typer.run(main) diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/multiple_values/multiple_options/tutorial001_an.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/multiple_values/multiple_options/tutorial001_an.py new file mode 100644 index 0000000000000000000000000000000000000000..3dd19d8f599428bb2b32fdec5f2e3ee10fe424a6 --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/multiple_values/multiple_options/tutorial001_an.py @@ -0,0 +1,16 @@ +from typing import List, Optional + +import typer +from typing_extensions import Annotated + + +def main(user: Annotated[Optional[List[str]], typer.Option()] = None): + if not user: + print(f"No provided users (raw input = {user})") + raise typer.Abort() + for u in user: + print(f"Processing user: {u}") + + +if __name__ == "__main__": + typer.run(main) diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/multiple_values/multiple_options/tutorial002.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/multiple_values/multiple_options/tutorial002.py new file mode 100644 index 0000000000000000000000000000000000000000..74728a005ddddb83d37db6a20b58be76c031959f --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/multiple_values/multiple_options/tutorial002.py @@ -0,0 +1,11 @@ +from typing import List + +import typer + + +def main(number: List[float] = typer.Option([])): + print(f"The sum is {sum(number)}") + + +if __name__ == "__main__": + typer.run(main) diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/multiple_values/multiple_options/tutorial002_an.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/multiple_values/multiple_options/tutorial002_an.py new file mode 100644 index 0000000000000000000000000000000000000000..5b872add6d5bd3309dc3507d8697539b591728a8 --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/multiple_values/multiple_options/tutorial002_an.py @@ -0,0 +1,12 @@ +from typing import List + +import typer +from typing_extensions import Annotated + + +def main(number: Annotated[List[float], typer.Option()] = []): + print(f"The sum is {sum(number)}") + + +if __name__ == "__main__": + typer.run(main) diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/multiple_values/options_with_multiple_values/tutorial001.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/multiple_values/options_with_multiple_values/tutorial001.py new file mode 100644 index 0000000000000000000000000000000000000000..24da362162d130c5b2ec1b8f7336fc5cfaf6768a --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/multiple_values/options_with_multiple_values/tutorial001.py @@ -0,0 +1,17 @@ +from typing import Tuple + +import typer + + +def main(user: Tuple[str, int, bool] = typer.Option((None, None, None))): + username, coins, is_wizard = user + if not username: + print("No user provided") + raise typer.Abort() + print(f"The username {username} has {coins} coins") + if is_wizard: + print("And this user is a wizard!") + + +if __name__ == "__main__": + typer.run(main) diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/multiple_values/options_with_multiple_values/tutorial001_an.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/multiple_values/options_with_multiple_values/tutorial001_an.py new file mode 100644 index 0000000000000000000000000000000000000000..f6480e73ef50ef9a02c655bdf817a710a8ccf6e4 --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/multiple_values/options_with_multiple_values/tutorial001_an.py @@ -0,0 +1,18 @@ +from typing import Tuple + +import typer +from typing_extensions import Annotated + + +def main(user: Annotated[Tuple[str, int, bool], typer.Option()] = (None, None, None)): + username, coins, is_wizard = user + if not username: + print("No user provided") + raise typer.Abort() + print(f"The username {username} has {coins} coins") + if is_wizard: + print("And this user is a wizard!") + + +if __name__ == "__main__": + typer.run(main) diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/one_file_per_command/__init__.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/one_file_per_command/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/one_file_per_command/main.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/one_file_per_command/main.py new file mode 100644 index 0000000000000000000000000000000000000000..9df47f4f79c4c0ef57839119c7bb0b4cc2ce5a56 --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/one_file_per_command/main.py @@ -0,0 +1,13 @@ +import typer + +from .users import app as users_app +from .version import app as version_app + +app = typer.Typer() + +app.add_typer(version_app) +app.add_typer(users_app, name="users") + + +if __name__ == "__main__": + app() diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/one_file_per_command/users/__init__.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/one_file_per_command/users/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..ccfbb0775d951048dca3bf3c53bb7a41e85f471c --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/one_file_per_command/users/__init__.py @@ -0,0 +1,9 @@ +import typer + +from .add import app as add_app +from .delete import app as delete_app + +app = typer.Typer() + +app.add_typer(add_app) +app.add_typer(delete_app) diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/one_file_per_command/users/add.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/one_file_per_command/users/add.py new file mode 100644 index 0000000000000000000000000000000000000000..507267b80be80512aafb3a946bbe66e5f5f6e21d --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/one_file_per_command/users/add.py @@ -0,0 +1,8 @@ +import typer + +app = typer.Typer() + + +@app.command() +def add(name: str): + print(f"Adding user: {name}") diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/one_file_per_command/users/delete.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/one_file_per_command/users/delete.py new file mode 100644 index 0000000000000000000000000000000000000000..cc39f892bd5a1703976dd6ea3f86c59dc64537c9 --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/one_file_per_command/users/delete.py @@ -0,0 +1,8 @@ +import typer + +app = typer.Typer() + + +@app.command() +def delete(name: str): + print(f"Deleting user: {name}") diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/one_file_per_command/version.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/one_file_per_command/version.py new file mode 100644 index 0000000000000000000000000000000000000000..3785df1a0c34eaea6f0d454de1f5795f2464488d --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/one_file_per_command/version.py @@ -0,0 +1,8 @@ +import typer + +app = typer.Typer() + + +@app.command() +def version(): + print("My CLI Version 1.0") diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/options/callback/tutorial001.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/options/callback/tutorial001.py new file mode 100644 index 0000000000000000000000000000000000000000..f64b8b7b68762228dc51878512dfb8793787252e --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/options/callback/tutorial001.py @@ -0,0 +1,17 @@ +from typing import Optional + +import typer + + +def name_callback(value: str): + if value != "Camila": + raise typer.BadParameter("Only Camila is allowed") + return value + + +def main(name: Optional[str] = typer.Option(default=None, callback=name_callback)): + print(f"Hello {name}") + + +if __name__ == "__main__": + typer.run(main) diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/options/callback/tutorial001_an.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/options/callback/tutorial001_an.py new file mode 100644 index 0000000000000000000000000000000000000000..c539740bc8316f54e2dc694a3c5d86ffb2149d40 --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/options/callback/tutorial001_an.py @@ -0,0 +1,18 @@ +from typing import Optional + +import typer +from typing_extensions import Annotated + + +def name_callback(value: str): + if value != "Camila": + raise typer.BadParameter("Only Camila is allowed") + return value + + +def main(name: Annotated[Optional[str], typer.Option(callback=name_callback)] = None): + print(f"Hello {name}") + + +if __name__ == "__main__": + typer.run(main) diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/options/callback/tutorial002.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/options/callback/tutorial002.py new file mode 100644 index 0000000000000000000000000000000000000000..98863c7546b3019325235ca39e11cb0ab3e5efdd --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/options/callback/tutorial002.py @@ -0,0 +1,18 @@ +from typing import Optional + +import typer + + +def name_callback(value: str): + print("Validating name") + if value != "Camila": + raise typer.BadParameter("Only Camila is allowed") + return value + + +def main(name: Optional[str] = typer.Option(default=None, callback=name_callback)): + print(f"Hello {name}") + + +if __name__ == "__main__": + typer.run(main) diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/options/callback/tutorial002_an.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/options/callback/tutorial002_an.py new file mode 100644 index 0000000000000000000000000000000000000000..f9a7013d438cae70e4820b99f9caf34b6de44bb4 --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/options/callback/tutorial002_an.py @@ -0,0 +1,19 @@ +from typing import Optional + +import typer +from typing_extensions import Annotated + + +def name_callback(value: str): + print("Validating name") + if value != "Camila": + raise typer.BadParameter("Only Camila is allowed") + return value + + +def main(name: Annotated[Optional[str], typer.Option(callback=name_callback)] = None): + print(f"Hello {name}") + + +if __name__ == "__main__": + typer.run(main) diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/options/callback/tutorial003.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/options/callback/tutorial003.py new file mode 100644 index 0000000000000000000000000000000000000000..1cc5e9b3edaad5c397fdf2766c612422cc578e2e --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/options/callback/tutorial003.py @@ -0,0 +1,20 @@ +from typing import Optional + +import typer + + +def name_callback(ctx: typer.Context, value: str): + if ctx.resilient_parsing: + return + print("Validating name") + if value != "Camila": + raise typer.BadParameter("Only Camila is allowed") + return value + + +def main(name: Optional[str] = typer.Option(default=None, callback=name_callback)): + print(f"Hello {name}") + + +if __name__ == "__main__": + typer.run(main) diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/options/callback/tutorial003_an.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/options/callback/tutorial003_an.py new file mode 100644 index 0000000000000000000000000000000000000000..609b82268d7f680eff7e6da18f5eaa6114715932 --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/options/callback/tutorial003_an.py @@ -0,0 +1,21 @@ +from typing import Optional + +import typer +from typing_extensions import Annotated + + +def name_callback(ctx: typer.Context, value: str): + if ctx.resilient_parsing: + return + print("Validating name") + if value != "Camila": + raise typer.BadParameter("Only Camila is allowed") + return value + + +def main(name: Annotated[Optional[str], typer.Option(callback=name_callback)] = None): + print(f"Hello {name}") + + +if __name__ == "__main__": + typer.run(main) diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/options/callback/tutorial004.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/options/callback/tutorial004.py new file mode 100644 index 0000000000000000000000000000000000000000..9502c65e3467f83b2c6f23d8971bf45fe6723e9d --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/options/callback/tutorial004.py @@ -0,0 +1,20 @@ +from typing import Optional + +import typer + + +def name_callback(ctx: typer.Context, param: typer.CallbackParam, value: str): + if ctx.resilient_parsing: + return + print(f"Validating param: {param.name}") + if value != "Camila": + raise typer.BadParameter("Only Camila is allowed") + return value + + +def main(name: Optional[str] = typer.Option(default=None, callback=name_callback)): + print(f"Hello {name}") + + +if __name__ == "__main__": + typer.run(main) diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/options/callback/tutorial004_an.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/options/callback/tutorial004_an.py new file mode 100644 index 0000000000000000000000000000000000000000..670f0cbc663a722c8faf90b20f7eb0e97eceb535 --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/options/callback/tutorial004_an.py @@ -0,0 +1,21 @@ +from typing import Optional + +import typer +from typing_extensions import Annotated + + +def name_callback(ctx: typer.Context, param: typer.CallbackParam, value: str): + if ctx.resilient_parsing: + return + print(f"Validating param: {param.name}") + if value != "Camila": + raise typer.BadParameter("Only Camila is allowed") + return value + + +def main(name: Annotated[Optional[str], typer.Option(callback=name_callback)] = None): + print(f"Hello {name}") + + +if __name__ == "__main__": + typer.run(main) diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/options/help/tutorial001.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/options/help/tutorial001.py new file mode 100644 index 0000000000000000000000000000000000000000..adb0dcc91716e67a417c004e05bce3942665a0a0 --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/options/help/tutorial001.py @@ -0,0 +1,21 @@ +import typer + + +def main( + name: str, + lastname: str = typer.Option("", help="Last name of person to greet."), + formal: bool = typer.Option(False, help="Say hi formally."), +): + """ + Say hi to NAME, optionally with a --lastname. + + If --formal is used, say hi very formally. + """ + if formal: + print(f"Good day Ms. {name} {lastname}.") + else: + print(f"Hello {name} {lastname}") + + +if __name__ == "__main__": + typer.run(main) diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/options/help/tutorial001_an.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/options/help/tutorial001_an.py new file mode 100644 index 0000000000000000000000000000000000000000..61613caa1f079813bfd79ae06b2ac533f29dbafb --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/options/help/tutorial001_an.py @@ -0,0 +1,22 @@ +import typer +from typing_extensions import Annotated + + +def main( + name: str, + lastname: Annotated[str, typer.Option(help="Last name of person to greet.")] = "", + formal: Annotated[bool, typer.Option(help="Say hi formally.")] = False, +): + """ + Say hi to NAME, optionally with a --lastname. + + If --formal is used, say hi very formally. + """ + if formal: + print(f"Good day Ms. {name} {lastname}.") + else: + print(f"Hello {name} {lastname}") + + +if __name__ == "__main__": + typer.run(main) diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/options/help/tutorial002.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/options/help/tutorial002.py new file mode 100644 index 0000000000000000000000000000000000000000..b28bf30e7e662b9db60c2b63c027f72c6b2a72ee --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/options/help/tutorial002.py @@ -0,0 +1,26 @@ +import typer + + +def main( + name: str, + lastname: str = typer.Option("", help="Last name of person to greet."), + formal: bool = typer.Option( + False, help="Say hi formally.", rich_help_panel="Customization and Utils" + ), + debug: bool = typer.Option( + False, help="Enable debugging.", rich_help_panel="Customization and Utils" + ), +): + """ + Say hi to NAME, optionally with a --lastname. + + If --formal is used, say hi very formally. + """ + if formal: + print(f"Good day Ms. {name} {lastname}.") + else: + print(f"Hello {name} {lastname}") + + +if __name__ == "__main__": + typer.run(main) diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/options/help/tutorial002_an.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/options/help/tutorial002_an.py new file mode 100644 index 0000000000000000000000000000000000000000..1faefce33bcdc3c279ed3b7b5113e9876d8acb80 --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/options/help/tutorial002_an.py @@ -0,0 +1,33 @@ +import typer +from typing_extensions import Annotated + + +def main( + name: str, + lastname: Annotated[str, typer.Option(help="Last name of person to greet.")] = "", + formal: Annotated[ + bool, + typer.Option( + help="Say hi formally.", rich_help_panel="Customization and Utils" + ), + ] = False, + debug: Annotated[ + bool, + typer.Option( + help="Enable debugging.", rich_help_panel="Customization and Utils" + ), + ] = False, +): + """ + Say hi to NAME, optionally with a --lastname. + + If --formal is used, say hi very formally. + """ + if formal: + print(f"Good day Ms. {name} {lastname}.") + else: + print(f"Hello {name} {lastname}") + + +if __name__ == "__main__": + typer.run(main) diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/options/help/tutorial003.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/options/help/tutorial003.py new file mode 100644 index 0000000000000000000000000000000000000000..40b554329e9dc904550e8dd011a4513c37c3cacf --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/options/help/tutorial003.py @@ -0,0 +1,9 @@ +import typer + + +def main(fullname: str = typer.Option("Wade Wilson", show_default=False)): + print(f"Hello {fullname}") + + +if __name__ == "__main__": + typer.run(main) diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/options/help/tutorial003_an.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/options/help/tutorial003_an.py new file mode 100644 index 0000000000000000000000000000000000000000..272446617f098299496ae39bafe2124562c573fb --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/options/help/tutorial003_an.py @@ -0,0 +1,10 @@ +import typer +from typing_extensions import Annotated + + +def main(fullname: Annotated[str, typer.Option(show_default=False)] = "Wade Wilson"): + print(f"Hello {fullname}") + + +if __name__ == "__main__": + typer.run(main) diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/options/help/tutorial004.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/options/help/tutorial004.py new file mode 100644 index 0000000000000000000000000000000000000000..2faff3fb47f018ac095748849fd124d534e3fe48 --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/options/help/tutorial004.py @@ -0,0 +1,13 @@ +import typer + + +def main( + fullname: str = typer.Option( + "Wade Wilson", show_default="Deadpoolio the amazing's name" + ), +): + print(f"Hello {fullname}") + + +if __name__ == "__main__": + typer.run(main) diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/options/help/tutorial004_an.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/options/help/tutorial004_an.py new file mode 100644 index 0000000000000000000000000000000000000000..f3b53f2c562b25ee3b28c7773edbd8d1afeb51d6 --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/options/help/tutorial004_an.py @@ -0,0 +1,14 @@ +import typer +from typing_extensions import Annotated + + +def main( + fullname: Annotated[ + str, typer.Option(show_default="Deadpoolio the amazing's name") + ] = "Wade Wilson", +): + print(f"Hello {fullname}") + + +if __name__ == "__main__": + typer.run(main) diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/options/name/tutorial001.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/options/name/tutorial001.py new file mode 100644 index 0000000000000000000000000000000000000000..c2094051ffc9e81f105ec56afe37a0e6177ffa26 --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/options/name/tutorial001.py @@ -0,0 +1,9 @@ +import typer + + +def main(user_name: str = typer.Option(..., "--name")): + print(f"Hello {user_name}") + + +if __name__ == "__main__": + typer.run(main) diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/options/name/tutorial001_an.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/options/name/tutorial001_an.py new file mode 100644 index 0000000000000000000000000000000000000000..9a6e4564d0b069261cacb963fa7644a7da7a1ceb --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/options/name/tutorial001_an.py @@ -0,0 +1,10 @@ +import typer +from typing_extensions import Annotated + + +def main(user_name: Annotated[str, typer.Option("--name")]): + print(f"Hello {user_name}") + + +if __name__ == "__main__": + typer.run(main) diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/options/name/tutorial002.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/options/name/tutorial002.py new file mode 100644 index 0000000000000000000000000000000000000000..a2a12a77a9ab788f914046e8417308c9587a9828 --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/options/name/tutorial002.py @@ -0,0 +1,9 @@ +import typer + + +def main(user_name: str = typer.Option(..., "--name", "-n")): + print(f"Hello {user_name}") + + +if __name__ == "__main__": + typer.run(main) diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/options/name/tutorial002_an.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/options/name/tutorial002_an.py new file mode 100644 index 0000000000000000000000000000000000000000..42362cde0314f0383d41272a3ad9405189f80fac --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/options/name/tutorial002_an.py @@ -0,0 +1,10 @@ +import typer +from typing_extensions import Annotated + + +def main(user_name: Annotated[str, typer.Option("--name", "-n")]): + print(f"Hello {user_name}") + + +if __name__ == "__main__": + typer.run(main) diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/options/name/tutorial003.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/options/name/tutorial003.py new file mode 100644 index 0000000000000000000000000000000000000000..957adb0148efd3b08f5e7b2eac2ef161c2c21a90 --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/options/name/tutorial003.py @@ -0,0 +1,9 @@ +import typer + + +def main(user_name: str = typer.Option(..., "-n")): + print(f"Hello {user_name}") + + +if __name__ == "__main__": + typer.run(main) diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/options/name/tutorial003_an.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/options/name/tutorial003_an.py new file mode 100644 index 0000000000000000000000000000000000000000..1bc1956c5fc25c06cc13766a9306a98307b105d6 --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/options/name/tutorial003_an.py @@ -0,0 +1,10 @@ +import typer +from typing_extensions import Annotated + + +def main(user_name: Annotated[str, typer.Option("-n")]): + print(f"Hello {user_name}") + + +if __name__ == "__main__": + typer.run(main) diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/options/name/tutorial004.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/options/name/tutorial004.py new file mode 100644 index 0000000000000000000000000000000000000000..80f64856a0109bd6fed49c7717ef293ae1ad721d --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/options/name/tutorial004.py @@ -0,0 +1,9 @@ +import typer + + +def main(user_name: str = typer.Option(..., "--user-name", "-n")): + print(f"Hello {user_name}") + + +if __name__ == "__main__": + typer.run(main) diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/options/name/tutorial004_an.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/options/name/tutorial004_an.py new file mode 100644 index 0000000000000000000000000000000000000000..42da7464b1b7322c6824844fd091981c04653c1a --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/options/name/tutorial004_an.py @@ -0,0 +1,10 @@ +import typer +from typing_extensions import Annotated + + +def main(user_name: Annotated[str, typer.Option("--user-name", "-n")]): + print(f"Hello {user_name}") + + +if __name__ == "__main__": + typer.run(main) diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/options/name/tutorial005.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/options/name/tutorial005.py new file mode 100644 index 0000000000000000000000000000000000000000..313c910839fe0c5f2578c02ceaf996426a5845ff --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/options/name/tutorial005.py @@ -0,0 +1,15 @@ +import typer + + +def main( + name: str = typer.Option(..., "--name", "-n"), + formal: bool = typer.Option(False, "--formal", "-f"), +): + if formal: + print(f"Good day Ms. {name}.") + else: + print(f"Hello {name}") + + +if __name__ == "__main__": + typer.run(main) diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/options/name/tutorial005_an.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/options/name/tutorial005_an.py new file mode 100644 index 0000000000000000000000000000000000000000..02fec5e4420e4105f1158527a654d0a25659c093 --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/options/name/tutorial005_an.py @@ -0,0 +1,16 @@ +import typer +from typing_extensions import Annotated + + +def main( + name: Annotated[str, typer.Option("--name", "-n")], + formal: Annotated[bool, typer.Option("--formal", "-f")] = False, +): + if formal: + print(f"Good day Ms. {name}.") + else: + print(f"Hello {name}") + + +if __name__ == "__main__": + typer.run(main) diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/options/password/tutorial001.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/options/password/tutorial001.py new file mode 100644 index 0000000000000000000000000000000000000000..98c58e222dc69a9533e97c23cf576915a235f7c0 --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/options/password/tutorial001.py @@ -0,0 +1,11 @@ +import typer + + +def main( + name: str, email: str = typer.Option(..., prompt=True, confirmation_prompt=True) +): + print(f"Hello {name}, your email is {email}") + + +if __name__ == "__main__": + typer.run(main) diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/options/password/tutorial001_an.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/options/password/tutorial001_an.py new file mode 100644 index 0000000000000000000000000000000000000000..3bd3e0d31e9ad5d0e339a6d38c4b15da30a4284c --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/options/password/tutorial001_an.py @@ -0,0 +1,13 @@ +import typer +from typing_extensions import Annotated + + +def main( + name: str, + email: Annotated[str, typer.Option(prompt=True, confirmation_prompt=True)], +): + print(f"Hello {name}, your email is {email}") + + +if __name__ == "__main__": + typer.run(main) diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/options/password/tutorial002.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/options/password/tutorial002.py new file mode 100644 index 0000000000000000000000000000000000000000..1743e69baf48113679968b91e43f00db507fe293 --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/options/password/tutorial002.py @@ -0,0 +1,15 @@ +import typer + + +def main( + name: str, + password: str = typer.Option( + ..., prompt=True, confirmation_prompt=True, hide_input=True + ), +): + print(f"Hello {name}. Doing something very secure with password.") + print(f"...just kidding, here it is, very insecure: {password}") + + +if __name__ == "__main__": + typer.run(main) diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/options/password/tutorial002_an.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/options/password/tutorial002_an.py new file mode 100644 index 0000000000000000000000000000000000000000..921942a8681c3f6923aba9c394036a093919f150 --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/options/password/tutorial002_an.py @@ -0,0 +1,16 @@ +import typer +from typing_extensions import Annotated + + +def main( + name: str, + password: Annotated[ + str, typer.Option(prompt=True, confirmation_prompt=True, hide_input=True) + ], +): + print(f"Hello {name}. Doing something very secure with password.") + print(f"...just kidding, here it is, very insecure: {password}") + + +if __name__ == "__main__": + typer.run(main) diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/options/prompt/tutorial001.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/options/prompt/tutorial001.py new file mode 100644 index 0000000000000000000000000000000000000000..242b557145802855e064422a7b0797c6039236a6 --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/options/prompt/tutorial001.py @@ -0,0 +1,9 @@ +import typer + + +def main(name: str, lastname: str = typer.Option(..., prompt=True)): + print(f"Hello {name} {lastname}") + + +if __name__ == "__main__": + typer.run(main) diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/options/prompt/tutorial001_an.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/options/prompt/tutorial001_an.py new file mode 100644 index 0000000000000000000000000000000000000000..5c34b494f0a1e2b201d446311af9f1c21a005301 --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/options/prompt/tutorial001_an.py @@ -0,0 +1,10 @@ +import typer +from typing_extensions import Annotated + + +def main(name: str, lastname: Annotated[str, typer.Option(prompt=True)]): + print(f"Hello {name} {lastname}") + + +if __name__ == "__main__": + typer.run(main) diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/options/prompt/tutorial002.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/options/prompt/tutorial002.py new file mode 100644 index 0000000000000000000000000000000000000000..b98e18a7ddaae8ebccceceeff4cbf87203dab0f6 --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/options/prompt/tutorial002.py @@ -0,0 +1,11 @@ +import typer + + +def main( + name: str, lastname: str = typer.Option(..., prompt="Please tell me your last name") +): + print(f"Hello {name} {lastname}") + + +if __name__ == "__main__": + typer.run(main) diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/options/prompt/tutorial002_an.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/options/prompt/tutorial002_an.py new file mode 100644 index 0000000000000000000000000000000000000000..fb0eef45e09d741d89956fad76f43029b40f52ac --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/options/prompt/tutorial002_an.py @@ -0,0 +1,13 @@ +import typer +from typing_extensions import Annotated + + +def main( + name: str, + lastname: Annotated[str, typer.Option(prompt="Please tell me your last name")], +): + print(f"Hello {name} {lastname}") + + +if __name__ == "__main__": + typer.run(main) diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/options/prompt/tutorial003.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/options/prompt/tutorial003.py new file mode 100644 index 0000000000000000000000000000000000000000..ffe22ef6d715febc37087470d9e7091de58fda83 --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/options/prompt/tutorial003.py @@ -0,0 +1,9 @@ +import typer + + +def main(project_name: str = typer.Option(..., prompt=True, confirmation_prompt=True)): + print(f"Deleting project {project_name}") + + +if __name__ == "__main__": + typer.run(main) diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/options/prompt/tutorial003_an.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/options/prompt/tutorial003_an.py new file mode 100644 index 0000000000000000000000000000000000000000..c12d1add77266b78731f6a970ecc465d3f9b0db7 --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/options/prompt/tutorial003_an.py @@ -0,0 +1,12 @@ +import typer +from typing_extensions import Annotated + + +def main( + project_name: Annotated[str, typer.Option(prompt=True, confirmation_prompt=True)], +): + print(f"Deleting project {project_name}") + + +if __name__ == "__main__": + typer.run(main) diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/options/required/tutorial001.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/options/required/tutorial001.py new file mode 100644 index 0000000000000000000000000000000000000000..78fc38ba17118217e8f6e58a7d91d97916f6e048 --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/options/required/tutorial001.py @@ -0,0 +1,9 @@ +import typer + + +def main(name: str, lastname: str = typer.Option()): + print(f"Hello {name} {lastname}") + + +if __name__ == "__main__": + typer.run(main) diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/options/required/tutorial001_an.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/options/required/tutorial001_an.py new file mode 100644 index 0000000000000000000000000000000000000000..d4c2e487c94e9b068b86932b385ce3848e9098b1 --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/options/required/tutorial001_an.py @@ -0,0 +1,10 @@ +import typer +from typing_extensions import Annotated + + +def main(name: str, lastname: Annotated[str, typer.Option()]): + print(f"Hello {name} {lastname}") + + +if __name__ == "__main__": + typer.run(main) diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/options/required/tutorial002.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/options/required/tutorial002.py new file mode 100644 index 0000000000000000000000000000000000000000..143cd0789ee359f647e3a66f5dd8266364270d3d --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/options/required/tutorial002.py @@ -0,0 +1,9 @@ +import typer + + +def main(name: str, lastname: str = typer.Option(default=...)): + print(f"Hello {name} {lastname}") + + +if __name__ == "__main__": + typer.run(main) diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/options/version/tutorial001.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/options/version/tutorial001.py new file mode 100644 index 0000000000000000000000000000000000000000..6ca0587e36308a96ef6c06385016ce054e874616 --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/options/version/tutorial001.py @@ -0,0 +1,24 @@ +from typing import Optional + +import typer + +__version__ = "0.1.0" + + +def version_callback(value: bool): + if value: + print(f"Awesome CLI Version: {__version__}") + raise typer.Exit() + + +def main( + name: str = typer.Option("World"), + version: Optional[bool] = typer.Option( + None, "--version", callback=version_callback + ), +): + print(f"Hello {name}") + + +if __name__ == "__main__": + typer.run(main) diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/options/version/tutorial001_an.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/options/version/tutorial001_an.py new file mode 100644 index 0000000000000000000000000000000000000000..10ad3680f15c5119ff95524c9b974b091e5d78d3 --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/options/version/tutorial001_an.py @@ -0,0 +1,25 @@ +from typing import Optional + +import typer +from typing_extensions import Annotated + +__version__ = "0.1.0" + + +def version_callback(value: bool): + if value: + print(f"Awesome CLI Version: {__version__}") + raise typer.Exit() + + +def main( + name: Annotated[str, typer.Option()] = "World", + version: Annotated[ + Optional[bool], typer.Option("--version", callback=version_callback) + ] = None, +): + print(f"Hello {name}") + + +if __name__ == "__main__": + typer.run(main) diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/options/version/tutorial002.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/options/version/tutorial002.py new file mode 100644 index 0000000000000000000000000000000000000000..34d0a280b6e97684a52ab80e194709e11e105c89 --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/options/version/tutorial002.py @@ -0,0 +1,29 @@ +from typing import Optional + +import typer + +__version__ = "0.1.0" + + +def version_callback(value: bool): + if value: + print(f"Awesome CLI Version: {__version__}") + raise typer.Exit() + + +def name_callback(name: str): + if name != "Camila": + raise typer.BadParameter("Only Camila is allowed") + + +def main( + name: str = typer.Option(..., callback=name_callback), + version: Optional[bool] = typer.Option( + None, "--version", callback=version_callback + ), +): + print(f"Hello {name}") + + +if __name__ == "__main__": + typer.run(main) diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/options/version/tutorial002_an.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/options/version/tutorial002_an.py new file mode 100644 index 0000000000000000000000000000000000000000..35f6b804d7e5ed4ce4d0fffef8f6b32acdf905b5 --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/options/version/tutorial002_an.py @@ -0,0 +1,30 @@ +from typing import Optional + +import typer +from typing_extensions import Annotated + +__version__ = "0.1.0" + + +def version_callback(value: bool): + if value: + print(f"Awesome CLI Version: {__version__}") + raise typer.Exit() + + +def name_callback(name: str): + if name != "Camila": + raise typer.BadParameter("Only Camila is allowed") + + +def main( + name: Annotated[str, typer.Option(callback=name_callback)], + version: Annotated[ + Optional[bool], typer.Option("--version", callback=version_callback) + ] = None, +): + print(f"Hello {name}") + + +if __name__ == "__main__": + typer.run(main) diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/options/version/tutorial003.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/options/version/tutorial003.py new file mode 100644 index 0000000000000000000000000000000000000000..3aa5c9a08ecbb2f6323d23bd8cd58b70133ade4d --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/options/version/tutorial003.py @@ -0,0 +1,30 @@ +from typing import Optional + +import typer + +__version__ = "0.1.0" + + +def version_callback(value: bool): + if value: + print(f"Awesome CLI Version: {__version__}") + raise typer.Exit() + + +def name_callback(name: str): + if name != "Camila": + raise typer.BadParameter("Only Camila is allowed") + return name + + +def main( + name: str = typer.Option(..., callback=name_callback), + version: Optional[bool] = typer.Option( + None, "--version", callback=version_callback, is_eager=True + ), +): + print(f"Hello {name}") + + +if __name__ == "__main__": + typer.run(main) diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/options/version/tutorial003_an.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/options/version/tutorial003_an.py new file mode 100644 index 0000000000000000000000000000000000000000..e13bddc05f4d16d353f58a050ee0da053fc0cca2 --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/options/version/tutorial003_an.py @@ -0,0 +1,32 @@ +from typing import Optional + +import typer +from typing_extensions import Annotated + +__version__ = "0.1.0" + + +def version_callback(value: bool): + if value: + print(f"Awesome CLI Version: {__version__}") + raise typer.Exit() + + +def name_callback(name: str): + if name != "Camila": + raise typer.BadParameter("Only Camila is allowed") + return name + + +def main( + name: Annotated[str, typer.Option(callback=name_callback)], + version: Annotated[ + Optional[bool], + typer.Option("--version", callback=version_callback, is_eager=True), + ] = None, +): + print(f"Hello {name}") + + +if __name__ == "__main__": + typer.run(main) diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/options_autocompletion/tutorial001.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/options_autocompletion/tutorial001.py new file mode 100644 index 0000000000000000000000000000000000000000..1cfc18cc20d46c1b4e83671ddb9d1ac634b2cba0 --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/options_autocompletion/tutorial001.py @@ -0,0 +1,12 @@ +import typer + +app = typer.Typer() + + +@app.command() +def main(name: str = typer.Option("World", help="The name to say hi to.")): + print(f"Hello {name}") + + +if __name__ == "__main__": + app() diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/options_autocompletion/tutorial001_an.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/options_autocompletion/tutorial001_an.py new file mode 100644 index 0000000000000000000000000000000000000000..d39641253b8f59aafa3ef297c51ff4ae19ac0336 --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/options_autocompletion/tutorial001_an.py @@ -0,0 +1,13 @@ +import typer +from typing_extensions import Annotated + +app = typer.Typer() + + +@app.command() +def main(name: Annotated[str, typer.Option(help="The name to say hi to.")] = "World"): + print(f"Hello {name}") + + +if __name__ == "__main__": + app() diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/options_autocompletion/tutorial002.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/options_autocompletion/tutorial002.py new file mode 100644 index 0000000000000000000000000000000000000000..6c14a97ce4966ef7769b940b30abba69026ffbb3 --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/options_autocompletion/tutorial002.py @@ -0,0 +1,21 @@ +import typer + + +def complete_name(): + return ["Camila", "Carlos", "Sebastian"] + + +app = typer.Typer() + + +@app.command() +def main( + name: str = typer.Option( + "World", help="The name to say hi to.", autocompletion=complete_name + ), +): + print(f"Hello {name}") + + +if __name__ == "__main__": + app() diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/options_autocompletion/tutorial002_an.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/options_autocompletion/tutorial002_an.py new file mode 100644 index 0000000000000000000000000000000000000000..a2df928a0f5e27f6cedb4792f475cbc0be9de10b --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/options_autocompletion/tutorial002_an.py @@ -0,0 +1,22 @@ +import typer +from typing_extensions import Annotated + + +def complete_name(): + return ["Camila", "Carlos", "Sebastian"] + + +app = typer.Typer() + + +@app.command() +def main( + name: Annotated[ + str, typer.Option(help="The name to say hi to.", autocompletion=complete_name) + ] = "World", +): + print(f"Hello {name}") + + +if __name__ == "__main__": + app() diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/options_autocompletion/tutorial003.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/options_autocompletion/tutorial003.py new file mode 100644 index 0000000000000000000000000000000000000000..9af41f23b5b37cede4e22a1fcd79efb0a11ab057 --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/options_autocompletion/tutorial003.py @@ -0,0 +1,27 @@ +import typer + +valid_names = ["Camila", "Carlos", "Sebastian"] + + +def complete_name(incomplete: str): + completion = [] + for name in valid_names: + if name.startswith(incomplete): + completion.append(name) + return completion + + +app = typer.Typer() + + +@app.command() +def main( + name: str = typer.Option( + "World", help="The name to say hi to.", autocompletion=complete_name + ), +): + print(f"Hello {name}") + + +if __name__ == "__main__": + app() diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/options_autocompletion/tutorial003_an.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/options_autocompletion/tutorial003_an.py new file mode 100644 index 0000000000000000000000000000000000000000..ed874388af287f7a1b09c8ed555ed965ed551826 --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/options_autocompletion/tutorial003_an.py @@ -0,0 +1,28 @@ +import typer +from typing_extensions import Annotated + +valid_names = ["Camila", "Carlos", "Sebastian"] + + +def complete_name(incomplete: str): + completion = [] + for name in valid_names: + if name.startswith(incomplete): + completion.append(name) + return completion + + +app = typer.Typer() + + +@app.command() +def main( + name: Annotated[ + str, typer.Option(help="The name to say hi to.", autocompletion=complete_name) + ] = "World", +): + print(f"Hello {name}") + + +if __name__ == "__main__": + app() diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/options_autocompletion/tutorial004.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/options_autocompletion/tutorial004.py new file mode 100644 index 0000000000000000000000000000000000000000..3be0cf35dbf392a2d6a02c47ba91311522e5db3b --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/options_autocompletion/tutorial004.py @@ -0,0 +1,32 @@ +import typer + +valid_completion_items = [ + ("Camila", "The reader of books."), + ("Carlos", "The writer of scripts."), + ("Sebastian", "The type hints guy."), +] + + +def complete_name(incomplete: str): + completion = [] + for name, help_text in valid_completion_items: + if name.startswith(incomplete): + completion_item = (name, help_text) + completion.append(completion_item) + return completion + + +app = typer.Typer() + + +@app.command() +def main( + name: str = typer.Option( + "World", help="The name to say hi to.", autocompletion=complete_name + ), +): + print(f"Hello {name}") + + +if __name__ == "__main__": + app() diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/options_autocompletion/tutorial004_an.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/options_autocompletion/tutorial004_an.py new file mode 100644 index 0000000000000000000000000000000000000000..673f8a4d344991094465f99cd97dd3e6ba2e6625 --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/options_autocompletion/tutorial004_an.py @@ -0,0 +1,33 @@ +import typer +from typing_extensions import Annotated + +valid_completion_items = [ + ("Camila", "The reader of books."), + ("Carlos", "The writer of scripts."), + ("Sebastian", "The type hints guy."), +] + + +def complete_name(incomplete: str): + completion = [] + for name, help_text in valid_completion_items: + if name.startswith(incomplete): + completion_item = (name, help_text) + completion.append(completion_item) + return completion + + +app = typer.Typer() + + +@app.command() +def main( + name: Annotated[ + str, typer.Option(help="The name to say hi to.", autocompletion=complete_name) + ] = "World", +): + print(f"Hello {name}") + + +if __name__ == "__main__": + app() diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/options_autocompletion/tutorial005.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/options_autocompletion/tutorial005.py new file mode 100644 index 0000000000000000000000000000000000000000..10ac532ad285a886c331bc5abea6742391797ac9 --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/options_autocompletion/tutorial005.py @@ -0,0 +1,29 @@ +import typer + +valid_completion_items = [ + ("Camila", "The reader of books."), + ("Carlos", "The writer of scripts."), + ("Sebastian", "The type hints guy."), +] + + +def complete_name(incomplete: str): + for name, help_text in valid_completion_items: + if name.startswith(incomplete): + yield (name, help_text) + + +app = typer.Typer() + + +@app.command() +def main( + name: str = typer.Option( + "World", help="The name to say hi to.", autocompletion=complete_name + ), +): + print(f"Hello {name}") + + +if __name__ == "__main__": + app() diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/options_autocompletion/tutorial005_an.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/options_autocompletion/tutorial005_an.py new file mode 100644 index 0000000000000000000000000000000000000000..bd1b62d7da3aefa3821ac491802dbf9536b90149 --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/options_autocompletion/tutorial005_an.py @@ -0,0 +1,30 @@ +import typer +from typing_extensions import Annotated + +valid_completion_items = [ + ("Camila", "The reader of books."), + ("Carlos", "The writer of scripts."), + ("Sebastian", "The type hints guy."), +] + + +def complete_name(incomplete: str): + for name, help_text in valid_completion_items: + if name.startswith(incomplete): + yield (name, help_text) + + +app = typer.Typer() + + +@app.command() +def main( + name: Annotated[ + str, typer.Option(help="The name to say hi to.", autocompletion=complete_name) + ] = "World", +): + print(f"Hello {name}") + + +if __name__ == "__main__": + app() diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/options_autocompletion/tutorial006.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/options_autocompletion/tutorial006.py new file mode 100644 index 0000000000000000000000000000000000000000..4e6dba302a9e247a0a03ff9858d1dad438194b7d --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/options_autocompletion/tutorial006.py @@ -0,0 +1,15 @@ +from typing import List + +import typer + +app = typer.Typer() + + +@app.command() +def main(name: List[str] = typer.Option(["World"], help="The name to say hi to.")): + for each_name in name: + print(f"Hello {each_name}") + + +if __name__ == "__main__": + app() diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/options_autocompletion/tutorial006_an.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/options_autocompletion/tutorial006_an.py new file mode 100644 index 0000000000000000000000000000000000000000..46319c2ecd7b0694ab25f4317c77727508040ee7 --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/options_autocompletion/tutorial006_an.py @@ -0,0 +1,18 @@ +from typing import List + +import typer +from typing_extensions import Annotated + +app = typer.Typer() + + +@app.command() +def main( + name: Annotated[List[str], typer.Option(help="The name to say hi to.")] = ["World"], +): + for each_name in name: + print(f"Hello {each_name}") + + +if __name__ == "__main__": + app() diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/options_autocompletion/tutorial007.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/options_autocompletion/tutorial007.py new file mode 100644 index 0000000000000000000000000000000000000000..7c56ac7549437fe5a9606a1e187d0ac0c3bcb438 --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/options_autocompletion/tutorial007.py @@ -0,0 +1,33 @@ +from typing import List + +import typer + +valid_completion_items = [ + ("Camila", "The reader of books."), + ("Carlos", "The writer of scripts."), + ("Sebastian", "The type hints guy."), +] + + +def complete_name(ctx: typer.Context, incomplete: str): + names = ctx.params.get("name") or [] + for name, help_text in valid_completion_items: + if name.startswith(incomplete) and name not in names: + yield (name, help_text) + + +app = typer.Typer() + + +@app.command() +def main( + name: List[str] = typer.Option( + ["World"], help="The name to say hi to.", autocompletion=complete_name + ), +): + for n in name: + print(f"Hello {n}") + + +if __name__ == "__main__": + app() diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/options_autocompletion/tutorial007_an.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/options_autocompletion/tutorial007_an.py new file mode 100644 index 0000000000000000000000000000000000000000..de6c8054e4fb4d0899fa27b6c797981aefe794dc --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/options_autocompletion/tutorial007_an.py @@ -0,0 +1,35 @@ +from typing import List + +import typer +from typing_extensions import Annotated + +valid_completion_items = [ + ("Camila", "The reader of books."), + ("Carlos", "The writer of scripts."), + ("Sebastian", "The type hints guy."), +] + + +def complete_name(ctx: typer.Context, incomplete: str): + names = ctx.params.get("name") or [] + for name, help_text in valid_completion_items: + if name.startswith(incomplete) and name not in names: + yield (name, help_text) + + +app = typer.Typer() + + +@app.command() +def main( + name: Annotated[ + List[str], + typer.Option(help="The name to say hi to.", autocompletion=complete_name), + ] = ["World"], +): + for n in name: + print(f"Hello {n}") + + +if __name__ == "__main__": + app() diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/options_autocompletion/tutorial008.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/options_autocompletion/tutorial008.py new file mode 100644 index 0000000000000000000000000000000000000000..118f4dd346011dd50d2771a711ec3f1a042534fe --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/options_autocompletion/tutorial008.py @@ -0,0 +1,36 @@ +from typing import List + +import typer +from rich.console import Console + +valid_completion_items = [ + ("Camila", "The reader of books."), + ("Carlos", "The writer of scripts."), + ("Sebastian", "The type hints guy."), +] + +err_console = Console(stderr=True) + + +def complete_name(args: List[str], incomplete: str): + err_console.print(f"{args}") + for name, help_text in valid_completion_items: + if name.startswith(incomplete): + yield (name, help_text) + + +app = typer.Typer() + + +@app.command() +def main( + name: List[str] = typer.Option( + ["World"], help="The name to say hi to.", autocompletion=complete_name + ), +): + for n in name: + print(f"Hello {n}") + + +if __name__ == "__main__": + app() diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/options_autocompletion/tutorial008_an.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/options_autocompletion/tutorial008_an.py new file mode 100644 index 0000000000000000000000000000000000000000..9dcb0df77eecdb150fbe5bcbce79261f822eaca9 --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/options_autocompletion/tutorial008_an.py @@ -0,0 +1,38 @@ +from typing import List + +import typer +from rich.console import Console +from typing_extensions import Annotated + +valid_completion_items = [ + ("Camila", "The reader of books."), + ("Carlos", "The writer of scripts."), + ("Sebastian", "The type hints guy."), +] + +err_console = Console(stderr=True) + + +def complete_name(args: List[str], incomplete: str): + err_console.print(f"{args}") + for name, help_text in valid_completion_items: + if name.startswith(incomplete): + yield (name, help_text) + + +app = typer.Typer() + + +@app.command() +def main( + name: Annotated[ + List[str], + typer.Option(help="The name to say hi to.", autocompletion=complete_name), + ] = ["World"], +): + for n in name: + print(f"Hello {n}") + + +if __name__ == "__main__": + app() diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/options_autocompletion/tutorial009.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/options_autocompletion/tutorial009.py new file mode 100644 index 0000000000000000000000000000000000000000..7e82c7ff07216d52dcd765d2bba26d3ea947203d --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/options_autocompletion/tutorial009.py @@ -0,0 +1,37 @@ +from typing import List + +import typer +from rich.console import Console + +valid_completion_items = [ + ("Camila", "The reader of books."), + ("Carlos", "The writer of scripts."), + ("Sebastian", "The type hints guy."), +] + +err_console = Console(stderr=True) + + +def complete_name(ctx: typer.Context, args: List[str], incomplete: str): + err_console.print(f"{args}") + names = ctx.params.get("name") or [] + for name, help_text in valid_completion_items: + if name.startswith(incomplete) and name not in names: + yield (name, help_text) + + +app = typer.Typer() + + +@app.command() +def main( + name: List[str] = typer.Option( + ["World"], help="The name to say hi to.", autocompletion=complete_name + ), +): + for n in name: + print(f"Hello {n}") + + +if __name__ == "__main__": + app() diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/options_autocompletion/tutorial009_an.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/options_autocompletion/tutorial009_an.py new file mode 100644 index 0000000000000000000000000000000000000000..c5b825eaf0c6d99556cebee1d53598b941067319 --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/options_autocompletion/tutorial009_an.py @@ -0,0 +1,39 @@ +from typing import List + +import typer +from rich.console import Console +from typing_extensions import Annotated + +valid_completion_items = [ + ("Camila", "The reader of books."), + ("Carlos", "The writer of scripts."), + ("Sebastian", "The type hints guy."), +] + +err_console = Console(stderr=True) + + +def complete_name(ctx: typer.Context, args: List[str], incomplete: str): + err_console.print(f"{args}") + names = ctx.params.get("name") or [] + for name, help_text in valid_completion_items: + if name.startswith(incomplete) and name not in names: + yield (name, help_text) + + +app = typer.Typer() + + +@app.command() +def main( + name: Annotated[ + List[str], + typer.Option(help="The name to say hi to.", autocompletion=complete_name), + ] = ["World"], +): + for n in name: + print(f"Hello {n}") + + +if __name__ == "__main__": + app() diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/parameter_types/bool/__init__.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/parameter_types/bool/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/parameter_types/bool/tutorial001.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/parameter_types/bool/tutorial001.py new file mode 100644 index 0000000000000000000000000000000000000000..d9b7cc1c27f6f288a0d8447bbea6c4035ae2ccc8 --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/parameter_types/bool/tutorial001.py @@ -0,0 +1,12 @@ +import typer + + +def main(force: bool = typer.Option(False, "--force")): + if force: + print("Forcing operation") + else: + print("Not forcing") + + +if __name__ == "__main__": + typer.run(main) diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/parameter_types/bool/tutorial001_an.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/parameter_types/bool/tutorial001_an.py new file mode 100644 index 0000000000000000000000000000000000000000..ea6f3d5c3e150e337ed5e45d091218964b4f55aa --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/parameter_types/bool/tutorial001_an.py @@ -0,0 +1,13 @@ +import typer +from typing_extensions import Annotated + + +def main(force: Annotated[bool, typer.Option("--force")] = False): + if force: + print("Forcing operation") + else: + print("Not forcing") + + +if __name__ == "__main__": + typer.run(main) diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/parameter_types/bool/tutorial002.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/parameter_types/bool/tutorial002.py new file mode 100644 index 0000000000000000000000000000000000000000..0bf116df9bc99d3be5822dbdfc2a071d8b02854b --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/parameter_types/bool/tutorial002.py @@ -0,0 +1,16 @@ +from typing import Optional + +import typer + + +def main(accept: Optional[bool] = typer.Option(None, "--accept/--reject")): + if accept is None: + print("I don't know what you want yet") + elif accept: + print("Accepting!") + else: + print("Rejecting!") + + +if __name__ == "__main__": + typer.run(main) diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/parameter_types/bool/tutorial002_an.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/parameter_types/bool/tutorial002_an.py new file mode 100644 index 0000000000000000000000000000000000000000..ba4cf41eb2f360cd545d03e65a0d4ffb47e81921 --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/parameter_types/bool/tutorial002_an.py @@ -0,0 +1,17 @@ +from typing import Optional + +import typer +from typing_extensions import Annotated + + +def main(accept: Annotated[Optional[bool], typer.Option("--accept/--reject")] = None): + if accept is None: + print("I don't know what you want yet") + elif accept: + print("Accepting!") + else: + print("Rejecting!") + + +if __name__ == "__main__": + typer.run(main) diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/parameter_types/bool/tutorial003.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/parameter_types/bool/tutorial003.py new file mode 100644 index 0000000000000000000000000000000000000000..3a5fdb492878ee07a84de211eb5603b520fe7e94 --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/parameter_types/bool/tutorial003.py @@ -0,0 +1,12 @@ +import typer + + +def main(force: bool = typer.Option(False, "--force/--no-force", "-f/-F")): + if force: + print("Forcing operation") + else: + print("Not forcing") + + +if __name__ == "__main__": + typer.run(main) diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/parameter_types/bool/tutorial003_an.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/parameter_types/bool/tutorial003_an.py new file mode 100644 index 0000000000000000000000000000000000000000..0687db1adb1417a0936a766a5d2e313a87babf53 --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/parameter_types/bool/tutorial003_an.py @@ -0,0 +1,13 @@ +import typer +from typing_extensions import Annotated + + +def main(force: Annotated[bool, typer.Option("--force/--no-force", "-f/-F")] = False): + if force: + print("Forcing operation") + else: + print("Not forcing") + + +if __name__ == "__main__": + typer.run(main) diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/parameter_types/bool/tutorial004.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/parameter_types/bool/tutorial004.py new file mode 100644 index 0000000000000000000000000000000000000000..933bec22a0c46e0c1f954482f69c66259489695c --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/parameter_types/bool/tutorial004.py @@ -0,0 +1,12 @@ +import typer + + +def main(in_prod: bool = typer.Option(True, " /--demo", " /-d")): + if in_prod: + print("Running in production") + else: + print("Running demo") + + +if __name__ == "__main__": + typer.run(main) diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/parameter_types/bool/tutorial004_an.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/parameter_types/bool/tutorial004_an.py new file mode 100644 index 0000000000000000000000000000000000000000..1cb42fcc86f69fbffbf6fb0cd4576c958c05ba79 --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/parameter_types/bool/tutorial004_an.py @@ -0,0 +1,13 @@ +import typer +from typing_extensions import Annotated + + +def main(in_prod: Annotated[bool, typer.Option(" /--demo", " /-d")] = True): + if in_prod: + print("Running in production") + else: + print("Running demo") + + +if __name__ == "__main__": + typer.run(main) diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/parameter_types/custom_types/__init__.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/parameter_types/custom_types/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/parameter_types/custom_types/tutorial001.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/parameter_types/custom_types/tutorial001.py new file mode 100644 index 0000000000000000000000000000000000000000..1ccf24cdfec761501e8b28f5689ad50598fccea5 --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/parameter_types/custom_types/tutorial001.py @@ -0,0 +1,25 @@ +import typer + + +class CustomClass: + def __init__(self, value: str): + self.value = value + + def __str__(self): + return f"" + + +def parse_custom_class(value: str): + return CustomClass(value * 2) + + +def main( + custom_arg: CustomClass = typer.Argument(parser=parse_custom_class), + custom_opt: CustomClass = typer.Option("Foo", parser=parse_custom_class), +): + print(f"custom_arg is {custom_arg}") + print(f"--custom-opt is {custom_opt}") + + +if __name__ == "__main__": + typer.run(main) diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/parameter_types/custom_types/tutorial001_an.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/parameter_types/custom_types/tutorial001_an.py new file mode 100644 index 0000000000000000000000000000000000000000..f43ae6320343a96ffae6a6cb70bf724bf3109869 --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/parameter_types/custom_types/tutorial001_an.py @@ -0,0 +1,26 @@ +import typer +from typing_extensions import Annotated + + +class CustomClass: + def __init__(self, value: str): + self.value = value + + def __str__(self): + return f"" + + +def parse_custom_class(value: str): + return CustomClass(value * 2) + + +def main( + custom_arg: Annotated[CustomClass, typer.Argument(parser=parse_custom_class)], + custom_opt: Annotated[CustomClass, typer.Option(parser=parse_custom_class)] = "Foo", +): + print(f"custom_arg is {custom_arg}") + print(f"--custom-opt is {custom_opt}") + + +if __name__ == "__main__": + typer.run(main) diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/parameter_types/custom_types/tutorial002.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/parameter_types/custom_types/tutorial002.py new file mode 100644 index 0000000000000000000000000000000000000000..bb8a10821b635d22952826092e97233c37a9f713 --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/parameter_types/custom_types/tutorial002.py @@ -0,0 +1,29 @@ +import click +import typer + + +class CustomClass: + def __init__(self, value: str): + self.value = value + + def __repr__(self): + return f"" + + +class CustomClassParser(click.ParamType): + name = "CustomClass" + + def convert(self, value, param, ctx): + return CustomClass(value * 3) + + +def main( + custom_arg: CustomClass = typer.Argument(click_type=CustomClassParser()), + custom_opt: CustomClass = typer.Option("Foo", click_type=CustomClassParser()), +): + print(f"custom_arg is {custom_arg}") + print(f"--custom-opt is {custom_opt}") + + +if __name__ == "__main__": + typer.run(main) diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/parameter_types/custom_types/tutorial002_an.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/parameter_types/custom_types/tutorial002_an.py new file mode 100644 index 0000000000000000000000000000000000000000..f762c17f4d6395ce60a814878cc119a41027f462 --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/parameter_types/custom_types/tutorial002_an.py @@ -0,0 +1,32 @@ +import click +import typer +from typing_extensions import Annotated + + +class CustomClass: + def __init__(self, value: str): + self.value = value + + def __repr__(self): + return f"" + + +class CustomClassParser(click.ParamType): + name = "CustomClass" + + def convert(self, value, param, ctx): + return CustomClass(value * 3) + + +def main( + custom_arg: Annotated[CustomClass, typer.Argument(click_type=CustomClassParser())], + custom_opt: Annotated[ + CustomClass, typer.Option(click_type=CustomClassParser()) + ] = "Foo", +): + print(f"custom_arg is {custom_arg}") + print(f"--custom-opt is {custom_opt}") + + +if __name__ == "__main__": + typer.run(main) diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/parameter_types/datetime/__init__.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/parameter_types/datetime/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/parameter_types/datetime/tutorial001.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/parameter_types/datetime/tutorial001.py new file mode 100644 index 0000000000000000000000000000000000000000..138cf0ce7cdb88733a505cdb71fe32d06836bd0f --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/parameter_types/datetime/tutorial001.py @@ -0,0 +1,12 @@ +from datetime import datetime + +import typer + + +def main(birth: datetime): + print(f"Interesting day to be born: {birth}") + print(f"Birth hour: {birth.hour}") + + +if __name__ == "__main__": + typer.run(main) diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/parameter_types/datetime/tutorial002.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/parameter_types/datetime/tutorial002.py new file mode 100644 index 0000000000000000000000000000000000000000..4fbf91a25034b41bb2c5fd6793e06776fa50577f --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/parameter_types/datetime/tutorial002.py @@ -0,0 +1,15 @@ +from datetime import datetime + +import typer + + +def main( + launch_date: datetime = typer.Argument( + ..., formats=["%Y-%m-%d", "%Y-%m-%dT%H:%M:%S", "%Y-%m-%d %H:%M:%S", "%m/%d/%Y"] + ), +): + print(f"Launch will be at: {launch_date}") + + +if __name__ == "__main__": + typer.run(main) diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/parameter_types/datetime/tutorial002_an.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/parameter_types/datetime/tutorial002_an.py new file mode 100644 index 0000000000000000000000000000000000000000..661e783f40f9da2a395991a50096821589e21d2e --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/parameter_types/datetime/tutorial002_an.py @@ -0,0 +1,19 @@ +from datetime import datetime + +import typer +from typing_extensions import Annotated + + +def main( + launch_date: Annotated[ + datetime, + typer.Argument( + formats=["%Y-%m-%d", "%Y-%m-%dT%H:%M:%S", "%Y-%m-%d %H:%M:%S", "%m/%d/%Y"] + ), + ], +): + print(f"Launch will be at: {launch_date}") + + +if __name__ == "__main__": + typer.run(main) diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/parameter_types/enum/__init__.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/parameter_types/enum/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/parameter_types/enum/tutorial001.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/parameter_types/enum/tutorial001.py new file mode 100644 index 0000000000000000000000000000000000000000..a353077e92a7b2e6fb8032d548e307ea35fe54de --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/parameter_types/enum/tutorial001.py @@ -0,0 +1,17 @@ +from enum import Enum + +import typer + + +class NeuralNetwork(str, Enum): + simple = "simple" + conv = "conv" + lstm = "lstm" + + +def main(network: NeuralNetwork = NeuralNetwork.simple): + print(f"Training neural network of type: {network.value}") + + +if __name__ == "__main__": + typer.run(main) diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/parameter_types/enum/tutorial002.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/parameter_types/enum/tutorial002.py new file mode 100644 index 0000000000000000000000000000000000000000..874971354a10a347354d866044fd4b7ea43c5900 --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/parameter_types/enum/tutorial002.py @@ -0,0 +1,19 @@ +from enum import Enum + +import typer + + +class NeuralNetwork(str, Enum): + simple = "simple" + conv = "conv" + lstm = "lstm" + + +def main( + network: NeuralNetwork = typer.Option(NeuralNetwork.simple, case_sensitive=False), +): + print(f"Training neural network of type: {network.value}") + + +if __name__ == "__main__": + typer.run(main) diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/parameter_types/enum/tutorial002_an.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/parameter_types/enum/tutorial002_an.py new file mode 100644 index 0000000000000000000000000000000000000000..69ea5e146dfe08750e2ca184dfcc2618f100f589 --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/parameter_types/enum/tutorial002_an.py @@ -0,0 +1,22 @@ +from enum import Enum + +import typer +from typing_extensions import Annotated + + +class NeuralNetwork(str, Enum): + simple = "simple" + conv = "conv" + lstm = "lstm" + + +def main( + network: Annotated[ + NeuralNetwork, typer.Option(case_sensitive=False) + ] = NeuralNetwork.simple, +): + print(f"Training neural network of type: {network.value}") + + +if __name__ == "__main__": + typer.run(main) diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/parameter_types/enum/tutorial003.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/parameter_types/enum/tutorial003.py new file mode 100644 index 0000000000000000000000000000000000000000..62f95e42fcac0bfa21ccfada2a911ce9928d8d44 --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/parameter_types/enum/tutorial003.py @@ -0,0 +1,18 @@ +from enum import Enum +from typing import List + +import typer + + +class Food(str, Enum): + food_1 = "Eggs" + food_2 = "Bacon" + food_3 = "Cheese" + + +def main(groceries: List[Food] = typer.Option([Food.food_1, Food.food_3])): + print(f"Buying groceries: {', '.join([f.value for f in groceries])}") + + +if __name__ == "__main__": + typer.run(main) diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/parameter_types/enum/tutorial003_an.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/parameter_types/enum/tutorial003_an.py new file mode 100644 index 0000000000000000000000000000000000000000..f2cfd7b95ac10a173f1d3fa0956e8c8bb21dbe8a --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/parameter_types/enum/tutorial003_an.py @@ -0,0 +1,19 @@ +from enum import Enum +from typing import List + +import typer +from typing_extensions import Annotated + + +class Food(str, Enum): + food_1 = "Eggs" + food_2 = "Bacon" + food_3 = "Cheese" + + +def main(groceries: Annotated[List[Food], typer.Option()] = [Food.food_1, Food.food_3]): + print(f"Buying groceries: {', '.join([f.value for f in groceries])}") + + +if __name__ == "__main__": + typer.run(main) diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/parameter_types/enum/tutorial004.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/parameter_types/enum/tutorial004.py new file mode 100644 index 0000000000000000000000000000000000000000..631dc315d91a994295fe1001e01ebf3c0ddc1952 --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/parameter_types/enum/tutorial004.py @@ -0,0 +1,10 @@ +import typer +from typing_extensions import Literal + + +def main(network: Literal["simple", "conv", "lstm"] = typer.Option("simple")): + print(f"Training neural network of type: {network}") + + +if __name__ == "__main__": + typer.run(main) diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/parameter_types/enum/tutorial004_an.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/parameter_types/enum/tutorial004_an.py new file mode 100644 index 0000000000000000000000000000000000000000..e466c0bcc38e8a935707543f04bd370fcae22b2d --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/parameter_types/enum/tutorial004_an.py @@ -0,0 +1,12 @@ +import typer +from typing_extensions import Annotated, Literal + + +def main( + network: Annotated[Literal["simple", "conv", "lstm"], typer.Option()] = "simple", +): + print(f"Training neural network of type: {network}") + + +if __name__ == "__main__": + typer.run(main) diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/parameter_types/file/__init__.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/parameter_types/file/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/parameter_types/file/tutorial001.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/parameter_types/file/tutorial001.py new file mode 100644 index 0000000000000000000000000000000000000000..899c32394c28318ea7fd778605a543915c3ce575 --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/parameter_types/file/tutorial001.py @@ -0,0 +1,10 @@ +import typer + + +def main(config: typer.FileText = typer.Option(...)): + for line in config: + print(f"Config line: {line}") + + +if __name__ == "__main__": + typer.run(main) diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/parameter_types/file/tutorial001_an.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/parameter_types/file/tutorial001_an.py new file mode 100644 index 0000000000000000000000000000000000000000..e31037af6f01bc579a26dfcadecb384750904760 --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/parameter_types/file/tutorial001_an.py @@ -0,0 +1,11 @@ +import typer +from typing_extensions import Annotated + + +def main(config: Annotated[typer.FileText, typer.Option()]): + for line in config: + print(f"Config line: {line}") + + +if __name__ == "__main__": + typer.run(main) diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/parameter_types/file/tutorial002.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/parameter_types/file/tutorial002.py new file mode 100644 index 0000000000000000000000000000000000000000..58f59b8a7f0c719bdd320b4708e25275f5f2fd46 --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/parameter_types/file/tutorial002.py @@ -0,0 +1,10 @@ +import typer + + +def main(config: typer.FileTextWrite = typer.Option(...)): + config.write("Some config written by the app") + print("Config written") + + +if __name__ == "__main__": + typer.run(main) diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/parameter_types/file/tutorial002_an.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/parameter_types/file/tutorial002_an.py new file mode 100644 index 0000000000000000000000000000000000000000..4ac474cee2ac68ab69142f17ec306649fe969291 --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/parameter_types/file/tutorial002_an.py @@ -0,0 +1,11 @@ +import typer +from typing_extensions import Annotated + + +def main(config: Annotated[typer.FileTextWrite, typer.Option()]): + config.write("Some config written by the app") + print("Config written") + + +if __name__ == "__main__": + typer.run(main) diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/parameter_types/file/tutorial003.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/parameter_types/file/tutorial003.py new file mode 100644 index 0000000000000000000000000000000000000000..375f5f57f4d16333d889a4baf8d637183b50b30e --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/parameter_types/file/tutorial003.py @@ -0,0 +1,13 @@ +import typer + + +def main(file: typer.FileBinaryRead = typer.Option(...)): + processed_total = 0 + for bytes_chunk in file: + # Process the bytes in bytes_chunk + processed_total += len(bytes_chunk) + print(f"Processed bytes total: {processed_total}") + + +if __name__ == "__main__": + typer.run(main) diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/parameter_types/file/tutorial003_an.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/parameter_types/file/tutorial003_an.py new file mode 100644 index 0000000000000000000000000000000000000000..9df65aa4f260e8394cc56cf3bc2c425254878b18 --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/parameter_types/file/tutorial003_an.py @@ -0,0 +1,14 @@ +import typer +from typing_extensions import Annotated + + +def main(file: Annotated[typer.FileBinaryRead, typer.Option()]): + processed_total = 0 + for bytes_chunk in file: + # Process the bytes in bytes_chunk + processed_total += len(bytes_chunk) + print(f"Processed bytes total: {processed_total}") + + +if __name__ == "__main__": + typer.run(main) diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/parameter_types/file/tutorial004.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/parameter_types/file/tutorial004.py new file mode 100644 index 0000000000000000000000000000000000000000..1fa3ae825c9f23b4e0ab3db5ab39759fe5de2f5f --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/parameter_types/file/tutorial004.py @@ -0,0 +1,17 @@ +import typer + + +def main(file: typer.FileBinaryWrite = typer.Option(...)): + first_line_str = "some settings\n" + # You cannot write str directly to a binary file, you have to encode it to get bytes + first_line_bytes = first_line_str.encode("utf-8") + # Then you can write the bytes + file.write(first_line_bytes) + # This is already bytes, it starts with b" + second_line = b"la cig\xc3\xbce\xc3\xb1a trae al ni\xc3\xb1o" + file.write(second_line) + print("Binary file written") + + +if __name__ == "__main__": + typer.run(main) diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/parameter_types/file/tutorial004_an.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/parameter_types/file/tutorial004_an.py new file mode 100644 index 0000000000000000000000000000000000000000..66221769f05699cf430ba3fefd020d0da463b03d --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/parameter_types/file/tutorial004_an.py @@ -0,0 +1,18 @@ +import typer +from typing_extensions import Annotated + + +def main(file: Annotated[typer.FileBinaryWrite, typer.Option()]): + first_line_str = "some settings\n" + # You cannot write str directly to a binary file, you have to encode it to get bytes + first_line_bytes = first_line_str.encode("utf-8") + # Then you can write the bytes + file.write(first_line_bytes) + # This is already bytes, it starts with b" + second_line = b"la cig\xc3\xbce\xc3\xb1a trae al ni\xc3\xb1o" + file.write(second_line) + print("Binary file written") + + +if __name__ == "__main__": + typer.run(main) diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/parameter_types/file/tutorial005.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/parameter_types/file/tutorial005.py new file mode 100644 index 0000000000000000000000000000000000000000..bab6ee0969d84c4918318251a88cbd57163a70d6 --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/parameter_types/file/tutorial005.py @@ -0,0 +1,10 @@ +import typer + + +def main(config: typer.FileText = typer.Option(..., mode="a")): + config.write("This is a single line\n") + print("Config line written") + + +if __name__ == "__main__": + typer.run(main) diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/parameter_types/file/tutorial005_an.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/parameter_types/file/tutorial005_an.py new file mode 100644 index 0000000000000000000000000000000000000000..ca1c03f5907c950b6f64f76267d6efd271c52c1a --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/parameter_types/file/tutorial005_an.py @@ -0,0 +1,11 @@ +import typer +from typing_extensions import Annotated + + +def main(config: Annotated[typer.FileText, typer.Option(mode="a")]): + config.write("This is a single line\n") + print("Config line written") + + +if __name__ == "__main__": + typer.run(main) diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/parameter_types/index/__init__.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/parameter_types/index/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/parameter_types/index/tutorial001.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/parameter_types/index/tutorial001.py new file mode 100644 index 0000000000000000000000000000000000000000..8126061880f743a4074d76bb8ff4c59920da49a0 --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/parameter_types/index/tutorial001.py @@ -0,0 +1,12 @@ +import typer + + +def main(name: str, age: int = 20, height_meters: float = 1.89, female: bool = True): + print(f"NAME is {name}, of type: {type(name)}") + print(f"--age is {age}, of type: {type(age)}") + print(f"--height-meters is {height_meters}, of type: {type(height_meters)}") + print(f"--female is {female}, of type: {type(female)}") + + +if __name__ == "__main__": + typer.run(main) diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/parameter_types/number/__init__.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/parameter_types/number/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/parameter_types/number/tutorial001.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/parameter_types/number/tutorial001.py new file mode 100644 index 0000000000000000000000000000000000000000..f8eb85946412ca31c08cb7c4c750e0e6c58788e2 --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/parameter_types/number/tutorial001.py @@ -0,0 +1,15 @@ +import typer + + +def main( + id: int = typer.Argument(..., min=0, max=1000), + age: int = typer.Option(20, min=18), + score: float = typer.Option(0, max=100), +): + print(f"ID is {id}") + print(f"--age is {age}") + print(f"--score is {score}") + + +if __name__ == "__main__": + typer.run(main) diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/parameter_types/number/tutorial001_an.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/parameter_types/number/tutorial001_an.py new file mode 100644 index 0000000000000000000000000000000000000000..b2c417eca7da825896b3cb3aefab5b0d0979f683 --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/parameter_types/number/tutorial001_an.py @@ -0,0 +1,16 @@ +import typer +from typing_extensions import Annotated + + +def main( + id: Annotated[int, typer.Argument(min=0, max=1000)], + age: Annotated[int, typer.Option(min=18)] = 20, + score: Annotated[float, typer.Option(max=100)] = 0, +): + print(f"ID is {id}") + print(f"--age is {age}") + print(f"--score is {score}") + + +if __name__ == "__main__": + typer.run(main) diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/parameter_types/number/tutorial002.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/parameter_types/number/tutorial002.py new file mode 100644 index 0000000000000000000000000000000000000000..b5f45f925f9a69d92199f517e6bbcb89139380b5 --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/parameter_types/number/tutorial002.py @@ -0,0 +1,15 @@ +import typer + + +def main( + id: int = typer.Argument(..., min=0, max=1000), + rank: int = typer.Option(0, max=10, clamp=True), + score: float = typer.Option(0, min=0, max=100, clamp=True), +): + print(f"ID is {id}") + print(f"--rank is {rank}") + print(f"--score is {score}") + + +if __name__ == "__main__": + typer.run(main) diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/parameter_types/number/tutorial002_an.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/parameter_types/number/tutorial002_an.py new file mode 100644 index 0000000000000000000000000000000000000000..78f6e0b165ee2e813a49a006cb32829dd452d879 --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/parameter_types/number/tutorial002_an.py @@ -0,0 +1,16 @@ +import typer +from typing_extensions import Annotated + + +def main( + id: Annotated[int, typer.Argument(min=0, max=1000)], + rank: Annotated[int, typer.Option(max=10, clamp=True)] = 0, + score: Annotated[float, typer.Option(min=0, max=100, clamp=True)] = 0, +): + print(f"ID is {id}") + print(f"--rank is {rank}") + print(f"--score is {score}") + + +if __name__ == "__main__": + typer.run(main) diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/parameter_types/number/tutorial003.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/parameter_types/number/tutorial003.py new file mode 100644 index 0000000000000000000000000000000000000000..8fdad8ab2361ae9a111cb5f125481637309c576f --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/parameter_types/number/tutorial003.py @@ -0,0 +1,9 @@ +import typer + + +def main(verbose: int = typer.Option(0, "--verbose", "-v", count=True)): + print(f"Verbose level is {verbose}") + + +if __name__ == "__main__": + typer.run(main) diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/parameter_types/number/tutorial003_an.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/parameter_types/number/tutorial003_an.py new file mode 100644 index 0000000000000000000000000000000000000000..82d37a5dbe25c229dc56ae64f83622348cc8b668 --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/parameter_types/number/tutorial003_an.py @@ -0,0 +1,10 @@ +import typer +from typing_extensions import Annotated + + +def main(verbose: Annotated[int, typer.Option("--verbose", "-v", count=True)] = 0): + print(f"Verbose level is {verbose}") + + +if __name__ == "__main__": + typer.run(main) diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/parameter_types/path/__init__.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/parameter_types/path/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/parameter_types/path/tutorial001.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/parameter_types/path/tutorial001.py new file mode 100644 index 0000000000000000000000000000000000000000..17a2e5ccc3641d78db0a3041e88346fcde472453 --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/parameter_types/path/tutorial001.py @@ -0,0 +1,21 @@ +from pathlib import Path +from typing import Optional + +import typer + + +def main(config: Optional[Path] = typer.Option(None)): + if config is None: + print("No config file") + raise typer.Abort() + if config.is_file(): + text = config.read_text() + print(f"Config file contents: {text}") + elif config.is_dir(): + print("Config is a directory, will use all its config files") + elif not config.exists(): + print("The config doesn't exist") + + +if __name__ == "__main__": + typer.run(main) diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/parameter_types/path/tutorial001_an.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/parameter_types/path/tutorial001_an.py new file mode 100644 index 0000000000000000000000000000000000000000..0706110164b7d49ce140d12f3592a771b8e3da7f --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/parameter_types/path/tutorial001_an.py @@ -0,0 +1,22 @@ +from pathlib import Path +from typing import Optional + +import typer +from typing_extensions import Annotated + + +def main(config: Annotated[Optional[Path], typer.Option()] = None): + if config is None: + print("No config file") + raise typer.Abort() + if config.is_file(): + text = config.read_text() + print(f"Config file contents: {text}") + elif config.is_dir(): + print("Config is a directory, will use all its config files") + elif not config.exists(): + print("The config doesn't exist") + + +if __name__ == "__main__": + typer.run(main) diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/parameter_types/path/tutorial002.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/parameter_types/path/tutorial002.py new file mode 100644 index 0000000000000000000000000000000000000000..d9121bbc40a8e0f7e3292eec961964c4b63efc8e --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/parameter_types/path/tutorial002.py @@ -0,0 +1,22 @@ +from pathlib import Path + +import typer + + +def main( + config: Path = typer.Option( + ..., + exists=True, + file_okay=True, + dir_okay=False, + writable=False, + readable=True, + resolve_path=True, + ), +): + text = config.read_text() + print(f"Config file contents: {text}") + + +if __name__ == "__main__": + typer.run(main) diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/parameter_types/path/tutorial002_an.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/parameter_types/path/tutorial002_an.py new file mode 100644 index 0000000000000000000000000000000000000000..2cd0d07cf1988470a25b2f3f63b58327b9b51a2a --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/parameter_types/path/tutorial002_an.py @@ -0,0 +1,25 @@ +from pathlib import Path + +import typer +from typing_extensions import Annotated + + +def main( + config: Annotated[ + Path, + typer.Option( + exists=True, + file_okay=True, + dir_okay=False, + writable=False, + readable=True, + resolve_path=True, + ), + ], +): + text = config.read_text() + print(f"Config file contents: {text}") + + +if __name__ == "__main__": + typer.run(main) diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/parameter_types/uuid/__init__.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/parameter_types/uuid/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/parameter_types/uuid/tutorial001.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/parameter_types/uuid/tutorial001.py new file mode 100644 index 0000000000000000000000000000000000000000..f97c5d95581a9fc3b6383f738a0e2651d7c767f1 --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/parameter_types/uuid/tutorial001.py @@ -0,0 +1,12 @@ +from uuid import UUID + +import typer + + +def main(user_id: UUID): + print(f"USER_ID is {user_id}") + print(f"UUID version is: {user_id.version}") + + +if __name__ == "__main__": + typer.run(main) diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/printing/tutorial001.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/printing/tutorial001.py new file mode 100644 index 0000000000000000000000000000000000000000..8c83c26cc7241cea6069d1b16eb835df9e734c8b --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/printing/tutorial001.py @@ -0,0 +1,19 @@ +import typer +from rich import print + +data = { + "name": "Rick", + "age": 42, + "items": [{"name": "Portal Gun"}, {"name": "Plumbus"}], + "active": True, + "affiliation": None, +} + + +def main(): + print("Here's the data") + print(data) + + +if __name__ == "__main__": + typer.run(main) diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/printing/tutorial002.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/printing/tutorial002.py new file mode 100644 index 0000000000000000000000000000000000000000..d8fe4a89b37a2953326eba06230f7072ee753a42 --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/printing/tutorial002.py @@ -0,0 +1,10 @@ +import typer +from rich import print + + +def main(): + print("[bold red]Alert![/bold red] [green]Portal gun[/green] shooting! :boom:") + + +if __name__ == "__main__": + typer.run(main) diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/printing/tutorial003.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/printing/tutorial003.py new file mode 100644 index 0000000000000000000000000000000000000000..1cfc51cbc82b410be364dd73b9bfa6b0a2576e86 --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/printing/tutorial003.py @@ -0,0 +1,16 @@ +import typer +from rich.console import Console +from rich.table import Table + +console = Console() + + +def main(): + table = Table("Name", "Item") + table.add_row("Rick", "Portal Gun") + table.add_row("Morty", "Plumbus") + console.print(table) + + +if __name__ == "__main__": + typer.run(main) diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/printing/tutorial004.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/printing/tutorial004.py new file mode 100644 index 0000000000000000000000000000000000000000..2ecb90e7cfb033d2f1dc1135114d95ddfc00b19f --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/printing/tutorial004.py @@ -0,0 +1,12 @@ +import typer +from rich.console import Console + +err_console = Console(stderr=True) + + +def main(): + err_console.print("Here is something written to standard error") + + +if __name__ == "__main__": + typer.run(main) diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/printing/tutorial005.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/printing/tutorial005.py new file mode 100644 index 0000000000000000000000000000000000000000..a9d41c92192a9784762e5e20a575fb673b277704 --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/printing/tutorial005.py @@ -0,0 +1,15 @@ +import typer + + +def main(good: bool = True): + message_start = "everything is " + if good: + ending = typer.style("good", fg=typer.colors.GREEN, bold=True) + else: + ending = typer.style("bad", fg=typer.colors.WHITE, bg=typer.colors.RED) + message = message_start + ending + typer.echo(message) + + +if __name__ == "__main__": + typer.run(main) diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/printing/tutorial006.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/printing/tutorial006.py new file mode 100644 index 0000000000000000000000000000000000000000..640055589055fffd7fc2c45791761ebaee0609b9 --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/printing/tutorial006.py @@ -0,0 +1,9 @@ +import typer + + +def main(name: str): + typer.secho(f"Welcome here {name}", fg=typer.colors.MAGENTA) + + +if __name__ == "__main__": + typer.run(main) diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/progressbar/tutorial001.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/progressbar/tutorial001.py new file mode 100644 index 0000000000000000000000000000000000000000..3e9a449212549e3c84416836f81242f48744857f --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/progressbar/tutorial001.py @@ -0,0 +1,17 @@ +import time + +import typer +from rich.progress import track + + +def main(): + total = 0 + for value in track(range(100), description="Processing..."): + # Fake processing time + time.sleep(0.01) + total += 1 + print(f"Processed {total} things.") + + +if __name__ == "__main__": + typer.run(main) diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/progressbar/tutorial002.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/progressbar/tutorial002.py new file mode 100644 index 0000000000000000000000000000000000000000..cfd4e5844d444b7931dfb78a1858359ce78f5150 --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/progressbar/tutorial002.py @@ -0,0 +1,20 @@ +import time + +import typer +from rich.progress import Progress, SpinnerColumn, TextColumn + + +def main(): + with Progress( + SpinnerColumn(), + TextColumn("[progress.description]{task.description}"), + transient=True, + ) as progress: + progress.add_task(description="Processing...", total=None) + progress.add_task(description="Preparing...", total=None) + time.sleep(5) + print("Done!") + + +if __name__ == "__main__": + typer.run(main) diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/progressbar/tutorial003.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/progressbar/tutorial003.py new file mode 100644 index 0000000000000000000000000000000000000000..c020cf7692ccadcd8ab6fc05cd2dd53e3f4d030e --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/progressbar/tutorial003.py @@ -0,0 +1,17 @@ +import time + +import typer + + +def main(): + total = 0 + with typer.progressbar(range(100)) as progress: + for value in progress: + # Fake processing time + time.sleep(0.01) + total += 1 + print(f"Processed {total} things.") + + +if __name__ == "__main__": + typer.run(main) diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/progressbar/tutorial004.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/progressbar/tutorial004.py new file mode 100644 index 0000000000000000000000000000000000000000..390e41f1271f0abce89f6def5be27a2386ea165c --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/progressbar/tutorial004.py @@ -0,0 +1,23 @@ +import time + +import typer + + +def iterate_user_ids(): + # Let's imagine this is a web API, not a range() + for i in range(100): + yield i + + +def main(): + total = 0 + with typer.progressbar(iterate_user_ids(), length=100) as progress: + for value in progress: + # Fake processing time + time.sleep(0.01) + total += 1 + print(f"Processed {total} user IDs.") + + +if __name__ == "__main__": + typer.run(main) diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/progressbar/tutorial005.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/progressbar/tutorial005.py new file mode 100644 index 0000000000000000000000000000000000000000..a4de2f9994d15d52c99efaa5801b1fee6e7e94e3 --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/progressbar/tutorial005.py @@ -0,0 +1,17 @@ +import time + +import typer + + +def main(): + total = 0 + with typer.progressbar(range(100), label="Processing") as progress: + for value in progress: + # Fake processing time + time.sleep(0.01) + total += 1 + print(f"Processed {total} things.") + + +if __name__ == "__main__": + typer.run(main) diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/progressbar/tutorial006.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/progressbar/tutorial006.py new file mode 100644 index 0000000000000000000000000000000000000000..d83b0da7cbdef62d322d7eea742a32dba9848012 --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/progressbar/tutorial006.py @@ -0,0 +1,19 @@ +import time + +import typer + + +def main(): + total = 1000 + with typer.progressbar(length=total) as progress: + for batch in range(4): + # Fake processing time + time.sleep(1) + # Increment by 250 on each loop iteration + # (it will take 4 seconds to reach 1000) + progress.update(250) + print(f"Processed {total} things in batches.") + + +if __name__ == "__main__": + typer.run(main) diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/prompt/tutorial001.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/prompt/tutorial001.py new file mode 100644 index 0000000000000000000000000000000000000000..776ac986521174fb02c6b4a56aef911623182d29 --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/prompt/tutorial001.py @@ -0,0 +1,10 @@ +import typer + + +def main(): + person_name = typer.prompt("What's your name?") + print(f"Hello {person_name}") + + +if __name__ == "__main__": + typer.run(main) diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/prompt/tutorial002.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/prompt/tutorial002.py new file mode 100644 index 0000000000000000000000000000000000000000..08b4ff1b9bf19507a51f39c1e0808cbb4cf24d45 --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/prompt/tutorial002.py @@ -0,0 +1,13 @@ +import typer + + +def main(): + delete = typer.confirm("Are you sure you want to delete it?") + if not delete: + print("Not deleting") + raise typer.Abort() + print("Deleting it!") + + +if __name__ == "__main__": + typer.run(main) diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/prompt/tutorial003.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/prompt/tutorial003.py new file mode 100644 index 0000000000000000000000000000000000000000..da0016d17fb3cb3c1d555f8dc155bfac8fc5c75c --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/prompt/tutorial003.py @@ -0,0 +1,10 @@ +import typer + + +def main(): + delete = typer.confirm("Are you sure you want to delete it?", abort=True) + print("Deleting it!") + + +if __name__ == "__main__": + typer.run(main) diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/prompt/tutorial004.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/prompt/tutorial004.py new file mode 100644 index 0000000000000000000000000000000000000000..38f54773d21f674806207298e9a910ea19ea50f2 --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/prompt/tutorial004.py @@ -0,0 +1,11 @@ +import typer +from rich.prompt import Prompt + + +def main(): + name = Prompt.ask("Enter your name :sunglasses:") + print(f"Hey there {name}!") + + +if __name__ == "__main__": + typer.run(main) diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/subcommands/callback_override/tutorial001.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/subcommands/callback_override/tutorial001.py new file mode 100644 index 0000000000000000000000000000000000000000..6442efa782fabadd99ab594e22590010097d2e93 --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/subcommands/callback_override/tutorial001.py @@ -0,0 +1,20 @@ +import typer + +app = typer.Typer() + +users_app = typer.Typer() +app.add_typer(users_app, name="users") + + +@users_app.callback() +def users_callback(): + print("Running a users command") + + +@users_app.command() +def create(name: str): + print(f"Creating user: {name}") + + +if __name__ == "__main__": + app() diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/subcommands/callback_override/tutorial002.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/subcommands/callback_override/tutorial002.py new file mode 100644 index 0000000000000000000000000000000000000000..d75042f53e6aed68ee6b245367e8bf87a033d5d2 --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/subcommands/callback_override/tutorial002.py @@ -0,0 +1,20 @@ +import typer + +app = typer.Typer() + + +def users_callback(): + print("Running a users command") + + +users_app = typer.Typer(callback=users_callback) +app.add_typer(users_app, name="users") + + +@users_app.command() +def create(name: str): + print(f"Creating user: {name}") + + +if __name__ == "__main__": + app() diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/subcommands/callback_override/tutorial003.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/subcommands/callback_override/tutorial003.py new file mode 100644 index 0000000000000000000000000000000000000000..26dc5676fc935754b0e64c2a693bb48388247f9f --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/subcommands/callback_override/tutorial003.py @@ -0,0 +1,25 @@ +import typer + +app = typer.Typer() + + +def default_callback(): + print("Running a users command") + + +users_app = typer.Typer(callback=default_callback) +app.add_typer(users_app, name="users") + + +@users_app.callback() +def user_callback(): + print("Callback override, running users command") + + +@users_app.command() +def create(name: str): + print(f"Creating user: {name}") + + +if __name__ == "__main__": + app() diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/subcommands/callback_override/tutorial004.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/subcommands/callback_override/tutorial004.py new file mode 100644 index 0000000000000000000000000000000000000000..bad099fcb48749a56d287f122d662f3679ea3bda --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/subcommands/callback_override/tutorial004.py @@ -0,0 +1,31 @@ +import typer + +app = typer.Typer() + + +def default_callback(): + print("Running a users command") + + +users_app = typer.Typer(callback=default_callback) + + +def callback_for_add_typer(): + print("I have the high land! Running users command") + + +app.add_typer(users_app, name="users", callback=callback_for_add_typer) + + +@users_app.callback() +def user_callback(): + print("Callback override, running users command") + + +@users_app.command() +def create(name: str): + print(f"Creating user: {name}") + + +if __name__ == "__main__": + app() diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/subcommands/name_help/tutorial001.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/subcommands/name_help/tutorial001.py new file mode 100644 index 0000000000000000000000000000000000000000..b49091f428ece040081b8bd1ab14edf6067d4dff --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/subcommands/name_help/tutorial001.py @@ -0,0 +1,15 @@ +import typer + +app = typer.Typer() + +users_app = typer.Typer() +app.add_typer(users_app, name="users", help="Manage users in the app.") + + +@users_app.command() +def create(name: str): + print(f"Creating user: {name}") + + +if __name__ == "__main__": + app() diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/subcommands/name_help/tutorial002.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/subcommands/name_help/tutorial002.py new file mode 100644 index 0000000000000000000000000000000000000000..ae9f1036b540bd7d9274aeeb34c23ef24db9d5f5 --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/subcommands/name_help/tutorial002.py @@ -0,0 +1,22 @@ +import typer + +app = typer.Typer() + +users_app = typer.Typer() +app.add_typer(users_app, name="users") + + +@users_app.callback() +def users(): + """ + Manage users in the app. + """ + + +@users_app.command() +def create(name: str): + print(f"Creating user: {name}") + + +if __name__ == "__main__": + app() diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/subcommands/name_help/tutorial003.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/subcommands/name_help/tutorial003.py new file mode 100644 index 0000000000000000000000000000000000000000..b6c10857dcff2189b788acd7c14db9b435ad4310 --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/subcommands/name_help/tutorial003.py @@ -0,0 +1,22 @@ +import typer + +app = typer.Typer() + + +def users(): + """ + Manage users in the app. + """ + + +users_app = typer.Typer(callback=users, name="users") +app.add_typer(users_app) + + +@users_app.command() +def create(name: str): + print(f"Creating user: {name}") + + +if __name__ == "__main__": + app() diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/subcommands/name_help/tutorial004.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/subcommands/name_help/tutorial004.py new file mode 100644 index 0000000000000000000000000000000000000000..f1f5aed5c0034187c5a737209e357fcd03aedbb2 --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/subcommands/name_help/tutorial004.py @@ -0,0 +1,29 @@ +import typer + +app = typer.Typer() + + +def old_callback(): + """ + Old callback help. + """ + + +users_app = typer.Typer(callback=old_callback) +app.add_typer(users_app, name="users") + + +@users_app.callback() +def users(): + """ + Manage users in the app. + """ + + +@users_app.command() +def create(name: str): + print(f"Creating user: {name}") + + +if __name__ == "__main__": + app() diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/subcommands/name_help/tutorial005.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/subcommands/name_help/tutorial005.py new file mode 100644 index 0000000000000000000000000000000000000000..50730171d79a49e512c2740287d70b937b75b2ab --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/subcommands/name_help/tutorial005.py @@ -0,0 +1,37 @@ +import typer + +app = typer.Typer() + + +def old_callback(): + """ + Old callback help. + """ + + +users_app = typer.Typer(callback=old_callback, name="users") + + +def new_users(): + """ + I have the highland! Create some users. + """ + + +app.add_typer(users_app, callback=new_users, name="new-users") + + +@users_app.callback() +def users(): + """ + Manage users in the app. + """ + + +@users_app.command() +def create(name: str): + print(f"Creating user: {name}") + + +if __name__ == "__main__": + app() diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/subcommands/name_help/tutorial006.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/subcommands/name_help/tutorial006.py new file mode 100644 index 0000000000000000000000000000000000000000..6395f693cc430f75ce80cd3146956c6128515f26 --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/subcommands/name_help/tutorial006.py @@ -0,0 +1,37 @@ +import typer + +app = typer.Typer() + + +def old_callback(): + """ + Old callback help. + """ + + +users_app = typer.Typer(callback=old_callback, name="exp-users", help="Explicit help.") + + +def new_users(): + """ + I have the highland! Create some users. + """ + + +app.add_typer(users_app, callback=new_users) + + +@users_app.callback() +def users(): + """ + Manage users in the app. + """ + + +@users_app.command() +def create(name: str): + print(f"Creating user: {name}") + + +if __name__ == "__main__": + app() diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/subcommands/name_help/tutorial007.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/subcommands/name_help/tutorial007.py new file mode 100644 index 0000000000000000000000000000000000000000..aaf7aec9fcab5c4e95bfdde43f4f70c9997c7d8c --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/subcommands/name_help/tutorial007.py @@ -0,0 +1,37 @@ +import typer + +app = typer.Typer() + + +def old_callback(): + """ + Old callback help. + """ + + +users_app = typer.Typer(callback=old_callback, name="users", help="Explicit help.") + + +def new_users(): + """ + I have the highland! Create some users. + """ + + +app.add_typer(users_app, callback=new_users) + + +@users_app.callback(help="Help from callback for users.") +def users(): + """ + Manage users in the app. + """ + + +@users_app.command() +def create(name: str): + print(f"Creating user: {name}") + + +if __name__ == "__main__": + app() diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/subcommands/name_help/tutorial008.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/subcommands/name_help/tutorial008.py new file mode 100644 index 0000000000000000000000000000000000000000..ddfc2650511a3167774fc41f0e178e045c188cfe --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/subcommands/name_help/tutorial008.py @@ -0,0 +1,42 @@ +import typer + +app = typer.Typer() + + +def old_callback(): + """ + Old callback help. + """ + + +users_app = typer.Typer(callback=old_callback, name="exp-users", help="Explicit help.") + + +def new_users(): + """ + I have the highland! Create some users. + """ + + +app.add_typer( + users_app, + callback=new_users, + name="cake-sith-users", + help="Unlimited powder! Eh, users.", +) + + +@users_app.callback(help="Help from callback for users.") +def users(): + """ + Manage users in the app. + """ + + +@users_app.command() +def create(name: str): + print(f"Creating user: {name}") + + +if __name__ == "__main__": + app() diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/subcommands/tutorial001/__init__.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/subcommands/tutorial001/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/subcommands/tutorial001/items.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/subcommands/tutorial001/items.py new file mode 100644 index 0000000000000000000000000000000000000000..4dc2cfaba63690c5e4e97fa9bb7a0c3779d264b7 --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/subcommands/tutorial001/items.py @@ -0,0 +1,22 @@ +import typer + +app = typer.Typer() + + +@app.command() +def create(item: str): + print(f"Creating item: {item}") + + +@app.command() +def delete(item: str): + print(f"Deleting item: {item}") + + +@app.command() +def sell(item: str): + print(f"Selling item: {item}") + + +if __name__ == "__main__": + app() diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/subcommands/tutorial001/main.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/subcommands/tutorial001/main.py new file mode 100644 index 0000000000000000000000000000000000000000..c30ccff8f41257e20623606280dd0b400eb9389a --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/subcommands/tutorial001/main.py @@ -0,0 +1,11 @@ +import typer + +import items +import users + +app = typer.Typer() +app.add_typer(users.app, name="users") +app.add_typer(items.app, name="items") + +if __name__ == "__main__": + app() diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/subcommands/tutorial001/users.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/subcommands/tutorial001/users.py new file mode 100644 index 0000000000000000000000000000000000000000..88cc4575e1966321082f27e3f53018c99b5e30ae --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/subcommands/tutorial001/users.py @@ -0,0 +1,17 @@ +import typer + +app = typer.Typer() + + +@app.command() +def create(user_name: str): + print(f"Creating user: {user_name}") + + +@app.command() +def delete(user_name: str): + print(f"Deleting user: {user_name}") + + +if __name__ == "__main__": + app() diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/subcommands/tutorial002/main.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/subcommands/tutorial002/main.py new file mode 100644 index 0000000000000000000000000000000000000000..12c32214eaad871b47645084d60ce57e13e31051 --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/subcommands/tutorial002/main.py @@ -0,0 +1,36 @@ +import typer + +app = typer.Typer() +items_app = typer.Typer() +app.add_typer(items_app, name="items") +users_app = typer.Typer() +app.add_typer(users_app, name="users") + + +@items_app.command("create") +def items_create(item: str): + print(f"Creating item: {item}") + + +@items_app.command("delete") +def items_delete(item: str): + print(f"Deleting item: {item}") + + +@items_app.command("sell") +def items_sell(item: str): + print(f"Selling item: {item}") + + +@users_app.command("create") +def users_create(user_name: str): + print(f"Creating user: {user_name}") + + +@users_app.command("delete") +def users_delete(user_name: str): + print(f"Deleting user: {user_name}") + + +if __name__ == "__main__": + app() diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/subcommands/tutorial003/__init__.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/subcommands/tutorial003/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/subcommands/tutorial003/items.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/subcommands/tutorial003/items.py new file mode 100644 index 0000000000000000000000000000000000000000..4dc2cfaba63690c5e4e97fa9bb7a0c3779d264b7 --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/subcommands/tutorial003/items.py @@ -0,0 +1,22 @@ +import typer + +app = typer.Typer() + + +@app.command() +def create(item: str): + print(f"Creating item: {item}") + + +@app.command() +def delete(item: str): + print(f"Deleting item: {item}") + + +@app.command() +def sell(item: str): + print(f"Selling item: {item}") + + +if __name__ == "__main__": + app() diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/subcommands/tutorial003/lands.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/subcommands/tutorial003/lands.py new file mode 100644 index 0000000000000000000000000000000000000000..724c20648125ce44c6f400744f9b6478e591caf2 --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/subcommands/tutorial003/lands.py @@ -0,0 +1,11 @@ +import typer + +import reigns +import towns + +app = typer.Typer() +app.add_typer(reigns.app, name="reigns") +app.add_typer(towns.app, name="towns") + +if __name__ == "__main__": + app() diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/subcommands/tutorial003/main.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/subcommands/tutorial003/main.py new file mode 100644 index 0000000000000000000000000000000000000000..b3b4ed7ccd576674e9dec8ed7734d41cf1180c96 --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/subcommands/tutorial003/main.py @@ -0,0 +1,13 @@ +import typer + +import items +import lands +import users + +app = typer.Typer() +app.add_typer(users.app, name="users") +app.add_typer(items.app, name="items") +app.add_typer(lands.app, name="lands") + +if __name__ == "__main__": + app() diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/subcommands/tutorial003/reigns.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/subcommands/tutorial003/reigns.py new file mode 100644 index 0000000000000000000000000000000000000000..5bc8d7a314f530d77890d2e7d99df87f992acccd --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/subcommands/tutorial003/reigns.py @@ -0,0 +1,17 @@ +import typer + +app = typer.Typer() + + +@app.command() +def conquer(name: str): + print(f"Conquering reign: {name}") + + +@app.command() +def destroy(name: str): + print(f"Destroying reign: {name}") + + +if __name__ == "__main__": + app() diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/subcommands/tutorial003/towns.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/subcommands/tutorial003/towns.py new file mode 100644 index 0000000000000000000000000000000000000000..66d01b5e9dab95330d54a2b6ed1e8feca4892ede --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/subcommands/tutorial003/towns.py @@ -0,0 +1,17 @@ +import typer + +app = typer.Typer() + + +@app.command() +def found(name: str): + print(f"Founding town: {name}") + + +@app.command() +def burn(name: str): + print(f"Burning town: {name}") + + +if __name__ == "__main__": + app() diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/subcommands/tutorial003/users.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/subcommands/tutorial003/users.py new file mode 100644 index 0000000000000000000000000000000000000000..88cc4575e1966321082f27e3f53018c99b5e30ae --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/subcommands/tutorial003/users.py @@ -0,0 +1,17 @@ +import typer + +app = typer.Typer() + + +@app.command() +def create(user_name: str): + print(f"Creating user: {user_name}") + + +@app.command() +def delete(user_name: str): + print(f"Deleting user: {user_name}") + + +if __name__ == "__main__": + app() diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/terminating/tutorial001.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/terminating/tutorial001.py new file mode 100644 index 0000000000000000000000000000000000000000..ff6033a3dcb3154a00b38adb1a4457ab562cea39 --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/terminating/tutorial001.py @@ -0,0 +1,25 @@ +import typer + +existing_usernames = ["rick", "morty"] + + +def maybe_create_user(username: str): + if username in existing_usernames: + print("The user already exists") + raise typer.Exit() + else: + print(f"User created: {username}") + + +def send_new_user_notification(username: str): + # Somehow send a notification here for the new user, maybe an email + print(f"Notification sent for new user: {username}") + + +def main(username: str): + maybe_create_user(username=username) + send_new_user_notification(username=username) + + +if __name__ == "__main__": + typer.run(main) diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/terminating/tutorial002.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/terminating/tutorial002.py new file mode 100644 index 0000000000000000000000000000000000000000..cb8bb5dd9db94fb89cca849106148747991bf255 --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/terminating/tutorial002.py @@ -0,0 +1,12 @@ +import typer + + +def main(username: str): + if username == "root": + print("The root user is reserved") + raise typer.Exit(code=1) + print(f"New user created: {username}") + + +if __name__ == "__main__": + typer.run(main) diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/terminating/tutorial003.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/terminating/tutorial003.py new file mode 100644 index 0000000000000000000000000000000000000000..1247442296f966a7c45b5869979f0947c0b22eb0 --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/terminating/tutorial003.py @@ -0,0 +1,12 @@ +import typer + + +def main(username: str): + if username == "root": + print("The root user is reserved") + raise typer.Abort() + print(f"New user created: {username}") + + +if __name__ == "__main__": + typer.run(main) diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/testing/app01/__init__.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/testing/app01/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/testing/app01/main.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/testing/app01/main.py new file mode 100644 index 0000000000000000000000000000000000000000..ed202734f46227b164a01bdefb337b6899eda6a0 --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/testing/app01/main.py @@ -0,0 +1,16 @@ +from typing import Optional + +import typer + +app = typer.Typer() + + +@app.command() +def main(name: str, city: Optional[str] = None): + print(f"Hello {name}") + if city: + print(f"Let's have a coffee in {city}") + + +if __name__ == "__main__": + app() diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/testing/app01/test_main.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/testing/app01/test_main.py new file mode 100644 index 0000000000000000000000000000000000000000..81d6a9cd3b964c915eadd6e1a0b4cd54f8c9c699 --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/testing/app01/test_main.py @@ -0,0 +1,12 @@ +from typer.testing import CliRunner + +from .main import app + +runner = CliRunner() + + +def test_app(): + result = runner.invoke(app, ["Camila", "--city", "Berlin"]) + assert result.exit_code == 0 + assert "Hello Camila" in result.output + assert "Let's have a coffee in Berlin" in result.output diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/testing/app02/__init__.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/testing/app02/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/testing/app02/main.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/testing/app02/main.py new file mode 100644 index 0000000000000000000000000000000000000000..c3b141c626f7a35aecd66224041aa0f1a57c865d --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/testing/app02/main.py @@ -0,0 +1,12 @@ +import typer + +app = typer.Typer() + + +@app.command() +def main(name: str, email: str = typer.Option(..., prompt=True)): + print(f"Hello {name}, your email is: {email}") + + +if __name__ == "__main__": + app() diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/testing/app02/test_main.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/testing/app02/test_main.py new file mode 100644 index 0000000000000000000000000000000000000000..f28708ba5c4e73667b2f325cd1088fef0d8e648a --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/testing/app02/test_main.py @@ -0,0 +1,11 @@ +from typer.testing import CliRunner + +from .main import app + +runner = CliRunner() + + +def test_app(): + result = runner.invoke(app, ["Camila"], input="camila@example.com\n") + assert result.exit_code == 0 + assert "Hello Camila, your email is: camila@example.com" in result.output diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/testing/app02_an/__init__.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/testing/app02_an/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/testing/app02_an/main.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/testing/app02_an/main.py new file mode 100644 index 0000000000000000000000000000000000000000..56fb327be178c3578e8e813c3c752848488fbe57 --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/testing/app02_an/main.py @@ -0,0 +1,13 @@ +import typer +from typing_extensions import Annotated + +app = typer.Typer() + + +@app.command() +def main(name: str, email: Annotated[str, typer.Option(prompt=True)]): + print(f"Hello {name}, your email is: {email}") + + +if __name__ == "__main__": + app() diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/testing/app02_an/test_main.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/testing/app02_an/test_main.py new file mode 100644 index 0000000000000000000000000000000000000000..f28708ba5c4e73667b2f325cd1088fef0d8e648a --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/testing/app02_an/test_main.py @@ -0,0 +1,11 @@ +from typer.testing import CliRunner + +from .main import app + +runner = CliRunner() + + +def test_app(): + result = runner.invoke(app, ["Camila"], input="camila@example.com\n") + assert result.exit_code == 0 + assert "Hello Camila, your email is: camila@example.com" in result.output diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/testing/app03/__init__.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/testing/app03/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/testing/app03/main.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/testing/app03/main.py new file mode 100644 index 0000000000000000000000000000000000000000..97325110d2818b917b8d6ca63277af44f0be8443 --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/testing/app03/main.py @@ -0,0 +1,9 @@ +import typer + + +def main(name: str = "World"): + print(f"Hello {name}") + + +if __name__ == "__main__": + typer.run(main) diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/testing/app03/test_main.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/testing/app03/test_main.py new file mode 100644 index 0000000000000000000000000000000000000000..f98fb0a73459c2db35a7d3c2f8f222fd0ccdb421 --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/testing/app03/test_main.py @@ -0,0 +1,15 @@ +import typer +from typer.testing import CliRunner + +from .main import main + +app = typer.Typer() +app.command()(main) + +runner = CliRunner() + + +def test_app(): + result = runner.invoke(app, ["--name", "Camila"]) + assert result.exit_code == 0 + assert "Hello Camila" in result.output diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/using_click/tutorial001.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/using_click/tutorial001.py new file mode 100644 index 0000000000000000000000000000000000000000..b3260c649421fd49e37515f0ed5c201a6cf48a2f --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/using_click/tutorial001.py @@ -0,0 +1,14 @@ +import click + + +@click.command() +@click.option("--count", default=1, help="Number of greetings.") +@click.option("--name", prompt="Your name", help="The person to greet.") +def hello(count, name): + """Simple program that greets NAME for a total of COUNT times.""" + for x in range(count): + click.echo(f"Hello {name}!") + + +if __name__ == "__main__": + hello() diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/using_click/tutorial002.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/using_click/tutorial002.py new file mode 100644 index 0000000000000000000000000000000000000000..44120e6fc611bee48b22ae693724822dc77d0ae9 --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/using_click/tutorial002.py @@ -0,0 +1,24 @@ +import click + + +@click.group() +def cli(): + pass + + +@click.command() +def initdb(): + click.echo("Initialized the database") + + +@click.command() +def dropdb(): + click.echo("Dropped the database") + + +cli.add_command(initdb) +cli.add_command(dropdb) + + +if __name__ == "__main__": + cli() diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/using_click/tutorial003.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/using_click/tutorial003.py new file mode 100644 index 0000000000000000000000000000000000000000..5b3967c0152b70bd5cd9b17fa8eadfcd1a78f1b4 --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/using_click/tutorial003.py @@ -0,0 +1,34 @@ +import click +import typer + +app = typer.Typer() + + +@app.command() +def top(): + """ + Top level command, form Typer + """ + print("The Typer app is at the top level") + + +@app.callback() +def callback(): + """ + Typer app, including Click subapp + """ + + +@click.command() +@click.option("--name", prompt="Your name", help="The person to greet.") +def hello(name): + """Simple program that greets NAME for a total of COUNT times.""" + click.echo(f"Hello {name}!") + + +typer_click_object = typer.main.get_command(app) + +typer_click_object.add_command(hello, "hello") + +if __name__ == "__main__": + typer_click_object() diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/using_click/tutorial004.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/using_click/tutorial004.py new file mode 100644 index 0000000000000000000000000000000000000000..6ac94dc5bae3684f5f589ea379b2f44575dc6a3b --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/docs_src/using_click/tutorial004.py @@ -0,0 +1,36 @@ +import click +import typer + + +@click.group() +def cli(): + pass + + +@cli.command() +def initdb(): + click.echo("Initialized the database") + + +@cli.command() +def dropdb(): + click.echo("Dropped the database") + + +app = typer.Typer() + + +@app.command() +def sub(): + """ + A single-command Typer sub app + """ + print("Typer is now below Click, the Click app is the top level") + + +typer_click_object = typer.main.get_command(app) + +cli.add_command(typer_click_object, "sub") + +if __name__ == "__main__": + cli() diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/__init__.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/assets/__init__.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/assets/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/assets/cli/__init__.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/assets/cli/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/assets/cli/app_other_name.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/assets/cli/app_other_name.py new file mode 100644 index 0000000000000000000000000000000000000000..78bb101a9037e73e997445885871f31214678bb2 --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/assets/cli/app_other_name.py @@ -0,0 +1,8 @@ +import typer + +application = typer.Typer() + + +@application.command() +def callback(name: str = "World"): + typer.echo(f"Hello {name}") diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/assets/cli/empty_script.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/assets/cli/empty_script.py new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/assets/cli/extended_app_cli.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/assets/cli/extended_app_cli.py new file mode 100644 index 0000000000000000000000000000000000000000..2ca391beac601c13d23411d858014c43a533c8c1 --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/assets/cli/extended_app_cli.py @@ -0,0 +1,31 @@ +import typer + +sub_sub_app = typer.Typer() + + +@sub_sub_app.command() +def sub_sub_command(): + typer.echo("sub_sub_command") + + +sub_app = typer.Typer() +sub_app.add_typer(sub_sub_app, name="sub") + + +@sub_app.command() +def hello(): + typer.echo("hello there") + + +@sub_app.command() +def bye(): + typer.echo("bye bye") + + +cli = typer.Typer() +cli.add_typer(sub_app) + + +@cli.command() +def top(): + typer.echo("top") diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/assets/cli/extended_empty_app_cli.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/assets/cli/extended_empty_app_cli.py new file mode 100644 index 0000000000000000000000000000000000000000..0f6c8e458d09b26ee0e240dcb7bbfc231901dc68 --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/assets/cli/extended_empty_app_cli.py @@ -0,0 +1,15 @@ +import typer + +cli = typer.Typer() +sub_app = typer.Typer() +cli.add_typer(sub_app) + + +@sub_app.command() +def hello(): + typer.echo("hello there") + + +@sub_app.command() +def bye(): + typer.echo("bye bye") diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/assets/cli/func_other_name.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/assets/cli/func_other_name.py new file mode 100644 index 0000000000000000000000000000000000000000..27a13823ef43c119b7789bef12b5d5bd93744f13 --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/assets/cli/func_other_name.py @@ -0,0 +1,2 @@ +def some_function(name: str = "World"): + print(f"Hello {name}") diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/assets/cli/multi_app.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/assets/cli/multi_app.py new file mode 100644 index 0000000000000000000000000000000000000000..1442aa24422c7877bf1e0d9eb1e73839927b9370 --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/assets/cli/multi_app.py @@ -0,0 +1,40 @@ +import typer + +sub_app = typer.Typer() + +variable = "Some text" + + +@sub_app.command() +def hello(name: str = "World", age: int = typer.Option(0, help="The age of the user")): + """ + Say Hello + """ + typer.echo(f"Hello {name}") + + +@sub_app.command() +def hi(user: str = typer.Argument("World", help="The name of the user to greet")): + """ + Say Hi + """ + + +@sub_app.command() +def bye(): + """ + Say bye + """ + typer.echo("sub bye") + + +app = typer.Typer(help="Demo App", epilog="The end") +app.add_typer(sub_app, name="sub") + + +@app.command() +def top(): + """ + Top command + """ + typer.echo("top") diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/assets/cli/multi_app_cli.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/assets/cli/multi_app_cli.py new file mode 100644 index 0000000000000000000000000000000000000000..0a73c7ebc3121672d0d4ac2481792e09adf1c673 --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/assets/cli/multi_app_cli.py @@ -0,0 +1,22 @@ +import typer + +sub_app = typer.Typer() + + +@sub_app.command() +def hello(): + typer.echo("sub hello") + + +@sub_app.command() +def bye(): + typer.echo("sub bye") + + +cli = typer.Typer() +cli.add_typer(sub_app, name="sub") + + +@cli.command() +def top(): + typer.echo("top") diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/assets/cli/multi_func.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/assets/cli/multi_func.py new file mode 100644 index 0000000000000000000000000000000000000000..c272ee2be1292c63f9ab99ead2490a4c5a369e08 --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/assets/cli/multi_func.py @@ -0,0 +1,12 @@ +message = "Stuff" + + +def say_stuff(): + print(message) + + +def main(name: str = "World"): + """ + Say hi to someone, by default to the World. + """ + print(f"Hello {name}") diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/assets/cli/multiapp-docs-title.md b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/assets/cli/multiapp-docs-title.md new file mode 100644 index 0000000000000000000000000000000000000000..ffde84373688a99d7566f69db317d3552a978f09 --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/assets/cli/multiapp-docs-title.md @@ -0,0 +1,102 @@ +# Awesome CLI + +Demo App + +**Usage**: + +```console +$ multiapp [OPTIONS] COMMAND [ARGS]... +``` + +**Options**: + +* `--install-completion`: Install completion for the current shell. +* `--show-completion`: Show completion for the current shell, to copy it or customize the installation. +* `--help`: Show this message and exit. + +The end + +**Commands**: + +* `top`: Top command +* `sub` + +## `multiapp top` + +Top command + +**Usage**: + +```console +$ multiapp top [OPTIONS] +``` + +**Options**: + +* `--help`: Show this message and exit. + +## `multiapp sub` + +**Usage**: + +```console +$ multiapp sub [OPTIONS] COMMAND [ARGS]... +``` + +**Options**: + +* `--help`: Show this message and exit. + +**Commands**: + +* `hello`: Say Hello +* `hi`: Say Hi +* `bye`: Say bye + +### `multiapp sub hello` + +Say Hello + +**Usage**: + +```console +$ multiapp sub hello [OPTIONS] +``` + +**Options**: + +* `--name TEXT`: [default: World] +* `--age INTEGER`: The age of the user [default: 0] +* `--help`: Show this message and exit. + +### `multiapp sub hi` + +Say Hi + +**Usage**: + +```console +$ multiapp sub hi [OPTIONS] [USER] +``` + +**Arguments**: + +* `[USER]`: The name of the user to greet [default: World] + +**Options**: + +* `--help`: Show this message and exit. + +### `multiapp sub bye` + +Say bye + +**Usage**: + +```console +$ multiapp sub bye [OPTIONS] +``` + +**Options**: + +* `--help`: Show this message and exit. diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/assets/cli/multiapp-docs.md b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/assets/cli/multiapp-docs.md new file mode 100644 index 0000000000000000000000000000000000000000..67d02568db75dde13151d1ce797e411f8b463f77 --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/assets/cli/multiapp-docs.md @@ -0,0 +1,102 @@ +# `multiapp` + +Demo App + +**Usage**: + +```console +$ multiapp [OPTIONS] COMMAND [ARGS]... +``` + +**Options**: + +* `--install-completion`: Install completion for the current shell. +* `--show-completion`: Show completion for the current shell, to copy it or customize the installation. +* `--help`: Show this message and exit. + +The end + +**Commands**: + +* `top`: Top command +* `sub` + +## `multiapp top` + +Top command + +**Usage**: + +```console +$ multiapp top [OPTIONS] +``` + +**Options**: + +* `--help`: Show this message and exit. + +## `multiapp sub` + +**Usage**: + +```console +$ multiapp sub [OPTIONS] COMMAND [ARGS]... +``` + +**Options**: + +* `--help`: Show this message and exit. + +**Commands**: + +* `hello`: Say Hello +* `hi`: Say Hi +* `bye`: Say bye + +### `multiapp sub hello` + +Say Hello + +**Usage**: + +```console +$ multiapp sub hello [OPTIONS] +``` + +**Options**: + +* `--name TEXT`: [default: World] +* `--age INTEGER`: The age of the user [default: 0] +* `--help`: Show this message and exit. + +### `multiapp sub hi` + +Say Hi + +**Usage**: + +```console +$ multiapp sub hi [OPTIONS] [USER] +``` + +**Arguments**: + +* `[USER]`: The name of the user to greet [default: World] + +**Options**: + +* `--help`: Show this message and exit. + +### `multiapp sub bye` + +Say bye + +**Usage**: + +```console +$ multiapp sub bye [OPTIONS] +``` + +**Options**: + +* `--help`: Show this message and exit. diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/assets/cli/not_python.txt b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/assets/cli/not_python.txt new file mode 100644 index 0000000000000000000000000000000000000000..5eb1a5ddd5cb03567f049816a28f1b18506bbcdf --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/assets/cli/not_python.txt @@ -0,0 +1 @@ +This is not Python diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/assets/cli/rich_formatted_app.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/assets/cli/rich_formatted_app.py new file mode 100644 index 0000000000000000000000000000000000000000..54d8a52267fccfebbda4d4f6cee16ed9ffbceebf --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/assets/cli/rich_formatted_app.py @@ -0,0 +1,22 @@ +import typer +from typing_extensions import Annotated + +app = typer.Typer(rich_markup_mode="rich") + + +@app.command(help="Say [bold red]hello[/bold red] to the user.") +def hello( + user_1: Annotated[ + str, + typer.Argument(help="The [bold]cool[/bold] name of the [green]user[/green]"), + ], + user_2: Annotated[str, typer.Argument(help="The world")] = "The World", + force: Annotated[ + bool, typer.Option(help="Force the welcome [red]message[/red]") + ] = False, +): + print(f"Hello {user_1} and {user_2}") # pragma: no cover + + +if __name__ == "__main__": + app() diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/assets/cli/richformattedapp-docs.md b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/assets/cli/richformattedapp-docs.md new file mode 100644 index 0000000000000000000000000000000000000000..678a2daf6f0e6c16654d6b538fbc9ef0b9f003ef --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/assets/cli/richformattedapp-docs.md @@ -0,0 +1,21 @@ +# Awesome CLI + +Say hello to the user. + +**Usage**: + +```console +$ hello [OPTIONS] USER_1 [USER_2] +``` + +**Arguments**: + +* `USER_1`: The cool name of the user [required] +* `[USER_2]`: The world [default: The World] + +**Options**: + +* `--force / --no-force`: Force the welcome message [default: no-force] +* `--install-completion`: Install completion for the current shell. +* `--show-completion`: Show completion for the current shell, to copy it or customize the installation. +* `--help`: Show this message and exit. diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/assets/cli/sample.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/assets/cli/sample.py new file mode 100644 index 0000000000000000000000000000000000000000..79ff29b5acad87155a04ed5cbd6bade028873dfb --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/assets/cli/sample.py @@ -0,0 +1,25 @@ +import typer + +app = typer.Typer() + + +@app.command() +def hello(name: str = "World", formal: bool = False): + """ + Say hi + """ + if formal: + typer.echo(f"Good morning Ms. {name}") + else: + typer.echo(f"Hello {name}!") + + +@app.command() +def bye(friend: bool = False): + """ + Say bye + """ + if friend: + typer.echo("Goodbye my friend") + else: + typer.echo("Goodbye") diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/assets/completion_argument.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/assets/completion_argument.py new file mode 100644 index 0000000000000000000000000000000000000000..f91e2b7cfb38a77431b9d0378ff16c02d9b9d922 --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/assets/completion_argument.py @@ -0,0 +1,22 @@ +import click +import typer + +app = typer.Typer() + + +def shell_complete(ctx: click.Context, param: click.Parameter, incomplete: str): + typer.echo(f"ctx: {ctx.info_name}", err=True) + typer.echo(f"arg is: {param.name}", err=True) + typer.echo(f"incomplete is: {incomplete}", err=True) + return ["Emma"] + + +@app.command(context_settings={"auto_envvar_prefix": "TEST"}) +def main(name: str = typer.Argument(shell_complete=shell_complete)): + """ + Say hello. + """ + + +if __name__ == "__main__": + app() diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/assets/completion_no_types.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/assets/completion_no_types.py new file mode 100644 index 0000000000000000000000000000000000000000..8dc610a1b205cc94e81f17e8fe9a21a3c5d9de65 --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/assets/completion_no_types.py @@ -0,0 +1,23 @@ +import typer + +app = typer.Typer() + + +def complete(ctx, args, incomplete): + typer.echo(f"info name is: {ctx.info_name}", err=True) + typer.echo(f"args is: {args}", err=True) + typer.echo(f"incomplete is: {incomplete}", err=True) + return [ + ("Camila", "The reader of books."), + ("Carlos", "The writer of scripts."), + ("Sebastian", "The type hints guy."), + ] + + +@app.command() +def main(name: str = typer.Option("World", autocompletion=complete)): + print(f"Hello {name}") + + +if __name__ == "__main__": + app() diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/assets/completion_no_types_order.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/assets/completion_no_types_order.py new file mode 100644 index 0000000000000000000000000000000000000000..dbbbc77f193978ae3cb3c061ab72b88f206a3bc5 --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/assets/completion_no_types_order.py @@ -0,0 +1,23 @@ +import typer + +app = typer.Typer() + + +def complete(args, incomplete, ctx): + typer.echo(f"info name is: {ctx.info_name}", err=True) + typer.echo(f"args is: {args}", err=True) + typer.echo(f"incomplete is: {incomplete}", err=True) + return [ + ("Camila", "The reader of books."), + ("Carlos", "The writer of scripts."), + ("Sebastian", "The type hints guy."), + ] + + +@app.command() +def main(name: str = typer.Option("World", autocompletion=complete)): + print(f"Hello {name}") + + +if __name__ == "__main__": + app() diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/assets/corner_cases.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/assets/corner_cases.py new file mode 100644 index 0000000000000000000000000000000000000000..29539b5ae4d92478bbe9d3cf91f47b34a1dfa753 --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/assets/corner_cases.py @@ -0,0 +1,19 @@ +import typer + +app = typer.Typer() + + +@app.command(context_settings={"auto_envvar_prefix": "TEST"}) +def main( + name: str = typer.Option("John", hidden=True), + lastname: str = typer.Option("Doe", "/lastname", show_default="Mr. Doe"), + age: int = typer.Option(lambda: 42, show_default=True), +): + """ + Say hello. + """ + print(f"Hello {name} {lastname}, it seems you have {age}") + + +if __name__ == "__main__": + app() diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/assets/print_modules.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/assets/print_modules.py new file mode 100644 index 0000000000000000000000000000000000000000..dbaffafaa742a3e2b8aa3616b762bebe1e5ba626 --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/assets/print_modules.py @@ -0,0 +1,15 @@ +import sys + +import typer + +app = typer.Typer() + + +@app.command() +def main(): + for m in sys.modules: + print(m) + + +if __name__ == "__main__": + app() diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/assets/prog_name.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/assets/prog_name.py new file mode 100644 index 0000000000000000000000000000000000000000..9db6683b9ccacbd95d0314bf31f26bf4281cc521 --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/assets/prog_name.py @@ -0,0 +1,12 @@ +import typer + +app = typer.Typer() + + +@app.command() +def main(i: int): # pragma: no cover + pass + + +if __name__ == "__main__": + app(prog_name="custom-name") diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/assets/type_error_no_rich.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/assets/type_error_no_rich.py new file mode 100644 index 0000000000000000000000000000000000000000..ba4d537795da3a617d940ca6b920f082592b0692 --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/assets/type_error_no_rich.py @@ -0,0 +1,12 @@ +import typer +import typer.main + +typer.main.HAS_RICH = False + + +def main(name: str = "morty"): + print(name + 3) + + +if __name__ == "__main__": + typer.run(main) diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/assets/type_error_no_rich_short_disable.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/assets/type_error_no_rich_short_disable.py new file mode 100644 index 0000000000000000000000000000000000000000..0c75055eb9b670f6e9f7378f77b12bb38515feff --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/assets/type_error_no_rich_short_disable.py @@ -0,0 +1,16 @@ +import typer +import typer.main + +typer.main.HAS_RICH = False + + +app = typer.Typer(pretty_exceptions_short=False) + + +@app.command() +def main(name: str = "morty"): + print(name + 3) + + +if __name__ == "__main__": + app() diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/assets/type_error_normal_traceback.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/assets/type_error_normal_traceback.py new file mode 100644 index 0000000000000000000000000000000000000000..bcdc0edbe0cbfbf54ca162aae65675a8bea3e4e5 --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/assets/type_error_normal_traceback.py @@ -0,0 +1,22 @@ +import typer + +app = typer.Typer() + + +@app.command() +def main(name: str = "morty"): + print(name) + + +broken_app = typer.Typer() + + +@broken_app.command() +def broken(name: str = "morty"): + print(name + 3) + + +if __name__ == "__main__": + app(standalone_mode=False) + + typer.main.get_command(broken_app)() diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_ambiguous_params.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_ambiguous_params.py new file mode 100644 index 0000000000000000000000000000000000000000..0693c8e9aa33c9f2d5edb56190333fc208a7bee1 --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_ambiguous_params.py @@ -0,0 +1,231 @@ +import pytest +import typer +from typer.testing import CliRunner +from typer.utils import ( + AnnotatedParamWithDefaultValueError, + DefaultFactoryAndDefaultValueError, + MixedAnnotatedAndDefaultStyleError, + MultipleTyperAnnotationsError, + _split_annotation_from_typer_annotations, +) +from typing_extensions import Annotated + +runner = CliRunner() + + +def test_split_annotations_from_typer_annotations_simple(): + # Simple sanity check that this utility works. If this isn't working on a given + # python version, then no other tests for Annotated will work. + given = Annotated[str, typer.Argument()] + base, typer_annotations = _split_annotation_from_typer_annotations(given) + assert base is str + # No equality check on the param types. Checking the length is sufficient. + assert len(typer_annotations) == 1 + + +def test_forbid_default_value_in_annotated_argument(): + app = typer.Typer() + + # This test case only works with `typer.Argument`. `typer.Option` uses positionals + # for param_decls too. + @app.command() + def cmd(my_param: Annotated[str, typer.Argument("foo")]): ... # pragma: no cover + + with pytest.raises(AnnotatedParamWithDefaultValueError) as excinfo: + runner.invoke(app) + + assert vars(excinfo.value) == { + "param_type": typer.models.ArgumentInfo, + "argument_name": "my_param", + } + + +def test_allow_options_to_have_names(): + app = typer.Typer() + + @app.command() + def cmd(my_param: Annotated[str, typer.Option("--some-opt")]): + print(my_param) + + result = runner.invoke(app, ["--some-opt", "hello"]) + assert result.exit_code == 0, result.output + assert "hello" in result.output + + +@pytest.mark.parametrize( + ["param", "param_info_type"], + [ + (typer.Argument, typer.models.ArgumentInfo), + (typer.Option, typer.models.OptionInfo), + ], +) +def test_forbid_annotated_param_and_default_param(param, param_info_type): + app = typer.Typer() + + @app.command() + def cmd(my_param: Annotated[str, param()] = param("foo")): ... # pragma: no cover + + with pytest.raises(MixedAnnotatedAndDefaultStyleError) as excinfo: + runner.invoke(app) + + assert vars(excinfo.value) == { + "argument_name": "my_param", + "annotated_param_type": param_info_type, + "default_param_type": param_info_type, + } + + +def test_forbid_multiple_typer_params_in_annotated(): + app = typer.Typer() + + @app.command() + def cmd( + my_param: Annotated[str, typer.Argument(), typer.Argument()], + ): ... # pragma: no cover + + with pytest.raises(MultipleTyperAnnotationsError) as excinfo: + runner.invoke(app) + + assert vars(excinfo.value) == {"argument_name": "my_param"} + + +def test_allow_multiple_non_typer_params_in_annotated(): + app = typer.Typer() + + @app.command() + def cmd(my_param: Annotated[str, "someval", typer.Argument(), 4] = "hello"): + print(my_param) + + result = runner.invoke(app) + # Should behave like normal + assert result.exit_code == 0, result.output + assert "hello" in result.output + + +@pytest.mark.parametrize( + ["param", "param_info_type"], + [ + (typer.Argument, typer.models.ArgumentInfo), + (typer.Option, typer.models.OptionInfo), + ], +) +def test_forbid_default_factory_and_default_value_in_annotated(param, param_info_type): + def make_string(): + return "foo" # pragma: no cover + + app = typer.Typer() + + @app.command() + def cmd( + my_param: Annotated[str, param(default_factory=make_string)] = "hello", + ): ... # pragma: no cover + + with pytest.raises(DefaultFactoryAndDefaultValueError) as excinfo: + runner.invoke(app) + + assert vars(excinfo.value) == { + "argument_name": "my_param", + "param_type": param_info_type, + } + + +@pytest.mark.parametrize( + "param", + [ + typer.Argument, + typer.Option, + ], +) +def test_allow_default_factory_with_default_param(param): + def make_string(): + return "foo" + + app = typer.Typer() + + @app.command() + def cmd(my_param: str = param(default_factory=make_string)): + print(my_param) + + result = runner.invoke(app) + assert result.exit_code == 0, result.output + assert "foo" in result.output + + +@pytest.mark.parametrize( + ["param", "param_info_type"], + [ + (typer.Argument, typer.models.ArgumentInfo), + (typer.Option, typer.models.OptionInfo), + ], +) +def test_forbid_default_and_default_factory_with_default_param(param, param_info_type): + def make_string(): + return "foo" # pragma: no cover + + app = typer.Typer() + + @app.command() + def cmd( + my_param: str = param("hi", default_factory=make_string), + ): ... # pragma: no cover + + with pytest.raises(DefaultFactoryAndDefaultValueError) as excinfo: + runner.invoke(app) + + assert vars(excinfo.value) == { + "argument_name": "my_param", + "param_type": param_info_type, + } + + +@pytest.mark.parametrize( + ["error", "message"], + [ + ( + AnnotatedParamWithDefaultValueError( + argument_name="my_argument", + param_type=typer.models.ArgumentInfo, + ), + "`Argument` default value cannot be set in `Annotated` for 'my_argument'. Set the default value with `=` instead.", + ), + ( + MixedAnnotatedAndDefaultStyleError( + argument_name="my_argument", + annotated_param_type=typer.models.OptionInfo, + default_param_type=typer.models.ArgumentInfo, + ), + "Cannot specify `Option` in `Annotated` and `Argument` as a default value together for 'my_argument'", + ), + ( + MixedAnnotatedAndDefaultStyleError( + argument_name="my_argument", + annotated_param_type=typer.models.OptionInfo, + default_param_type=typer.models.OptionInfo, + ), + "Cannot specify `Option` in `Annotated` and default value together for 'my_argument'", + ), + ( + MixedAnnotatedAndDefaultStyleError( + argument_name="my_argument", + annotated_param_type=typer.models.ArgumentInfo, + default_param_type=typer.models.ArgumentInfo, + ), + "Cannot specify `Argument` in `Annotated` and default value together for 'my_argument'", + ), + ( + MultipleTyperAnnotationsError( + argument_name="my_argument", + ), + "Cannot specify multiple `Annotated` Typer arguments for 'my_argument'", + ), + ( + DefaultFactoryAndDefaultValueError( + argument_name="my_argument", + param_type=typer.models.OptionInfo, + ), + "Cannot specify `default_factory` and a default value together for `Option`", + ), + ], +) +def test_error_rendering(error, message): + assert str(error) == message diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_annotated.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_annotated.py new file mode 100644 index 0000000000000000000000000000000000000000..c1be5b88d714f1c026be8f13989ec355b99007c6 --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_annotated.py @@ -0,0 +1,100 @@ +import sys +from pathlib import Path + +import typer +from typer.testing import CliRunner +from typing_extensions import Annotated + +from .utils import needs_py310 + +runner = CliRunner() + + +def test_annotated_argument_with_default(): + app = typer.Typer() + + @app.command() + def cmd(val: Annotated[int, typer.Argument()] = 0): + print(f"hello {val}") + + result = runner.invoke(app) + assert result.exit_code == 0, result.output + assert "hello 0" in result.output + + result = runner.invoke(app, ["42"]) + assert result.exit_code == 0, result.output + assert "hello 42" in result.output + + +@needs_py310 +def test_annotated_argument_in_string_type_with_default(): + app = typer.Typer() + + @app.command() + def cmd(val: "Annotated[int, typer.Argument()]" = 0): + print(f"hello {val}") + + result = runner.invoke(app) + assert result.exit_code == 0, result.output + assert "hello 0" in result.output + + result = runner.invoke(app, ["42"]) + assert result.exit_code == 0, result.output + assert "hello 42" in result.output + + +def test_annotated_argument_with_default_factory(): + app = typer.Typer() + + def make_string(): + return "I made it" + + @app.command() + def cmd(val: Annotated[str, typer.Argument(default_factory=make_string)]): + print(val) + + result = runner.invoke(app) + assert result.exit_code == 0, result.output + assert "I made it" in result.output + + result = runner.invoke(app, ["overridden"]) + assert result.exit_code == 0, result.output + assert "overridden" in result.output + + +def test_annotated_option_with_argname_doesnt_mutate_multiple_calls(): + app = typer.Typer() + + @app.command() + def cmd(force: Annotated[bool, typer.Option("--force")] = False): + if force: + print("Forcing operation") + else: + print("Not forcing") + + result = runner.invoke(app) + assert result.exit_code == 0, result.output + assert "Not forcing" in result.output + + result = runner.invoke(app, ["--force"]) + assert result.exit_code == 0, result.output + assert "Forcing operation" in result.output + + +def test_annotated_custom_path(): + app = typer.Typer() + + class CustomPath(Path): + # Subclassing Path was not fully supported before 3.12 + # https://docs.python.org/3.12/whatsnew/3.12.html + if sys.version_info < (3, 12): + _flavour = type(Path())._flavour + + @app.command() + def custom_parser( + my_path: Annotated[CustomPath, typer.Argument(parser=CustomPath)], + ): + assert isinstance(my_path, CustomPath) + + result = runner.invoke(app, "/some/quirky/path/implementation") + assert result.exit_code == 0 diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_callback_warning.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_callback_warning.py new file mode 100644 index 0000000000000000000000000000000000000000..af2d9724f1c24e0a651a5a17d71734e1e35c954f --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_callback_warning.py @@ -0,0 +1,44 @@ +import pytest +import typer +from typer.testing import CliRunner + +runner = CliRunner() + + +def test_warns_when_callback_is_not_supported(): + app = typer.Typer() + + sub_app = typer.Typer() + + @sub_app.callback() + def callback(): + """This help text is not used.""" + + app.add_typer(sub_app) + + with pytest.warns( + match="The 'callback' parameter is not supported by Typer when using `add_typer` without a name" + ): + try: + app() + except SystemExit: + pass + + +def test_warns_when_callback_is_not_supported_added_after_add_typer(): + app = typer.Typer() + + sub_app = typer.Typer() + app.add_typer(sub_app) + + @sub_app.callback() + def callback(): + """This help text is not used.""" + + with pytest.warns( + match="The 'callback' parameter is not supported by Typer when using `add_typer` without a name" + ): + try: + app() + except SystemExit: + pass diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_cli/__init__.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_cli/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_cli/test_app_other_name.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_cli/test_app_other_name.py new file mode 100644 index 0000000000000000000000000000000000000000..2811c4376f192e7e8b9637b01745326831cd7bbe --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_cli/test_app_other_name.py @@ -0,0 +1,41 @@ +import subprocess +import sys + + +def test_script_help(): + result = subprocess.run( + [ + sys.executable, + "-m", + "coverage", + "run", + "-m", + "typer", + "tests/assets/cli/app_other_name.py", + "run", + "--help", + ], + capture_output=True, + encoding="utf-8", + ) + assert "--name" in result.stdout + + +def test_script(): + result = subprocess.run( + [ + sys.executable, + "-m", + "coverage", + "run", + "-m", + "typer", + "tests/assets/cli/app_other_name.py", + "run", + "--name", + "Camila", + ], + capture_output=True, + encoding="utf-8", + ) + assert "Hello Camila" in result.stdout diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_cli/test_completion_run.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_cli/test_completion_run.py new file mode 100644 index 0000000000000000000000000000000000000000..20695b93399a9740921c396839cb0c8589f03323 --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_cli/test_completion_run.py @@ -0,0 +1,19 @@ +import os +import subprocess +import sys + + +def test_script_completion_run(): + result = subprocess.run( + [sys.executable, "-m", "coverage", "run", "-m", "typer"], + capture_output=True, + encoding="utf-8", + env={ + **os.environ, + "___MAIN__.PY_COMPLETE": "complete_bash", + "_PYTHON _M TYPER_COMPLETE": "complete_bash", + "COMP_WORDS": "typer tests/assets/cli/sample.py", + "COMP_CWORD": "2", + }, + ) + assert "run" in result.stdout diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_cli/test_doc.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_cli/test_doc.py new file mode 100644 index 0000000000000000000000000000000000000000..f0d1d9b8507c2774df457f82c5456780c044d629 --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_cli/test_doc.py @@ -0,0 +1,174 @@ +import os +import subprocess +import sys +from pathlib import Path + + +def test_doc(): + result = subprocess.run( + [ + sys.executable, + "-m", + "coverage", + "run", + "-m", + "typer", + "tests.assets.cli.multi_app", + "utils", + "docs", + "--name", + "multiapp", + ], + capture_output=True, + encoding="utf-8", + ) + docs_path: Path = Path(__file__).parent.parent / "assets/cli/multiapp-docs.md" + docs = docs_path.read_text() + assert docs in result.stdout + assert "**Arguments**" in result.stdout + + +def test_doc_output(tmp_path: Path): + out_file: Path = tmp_path / "out.md" + result = subprocess.run( + [ + sys.executable, + "-m", + "coverage", + "run", + "-m", + "typer", + "tests.assets.cli.multi_app", + "utils", + "docs", + "--name", + "multiapp", + "--output", + str(out_file), + ], + capture_output=True, + encoding="utf-8", + ) + docs_path: Path = Path(__file__).parent.parent / "assets/cli/multiapp-docs.md" + docs = docs_path.read_text() + written_docs = out_file.read_text() + assert docs in written_docs + assert "Docs saved to:" in result.stdout + + +def test_doc_title_output(tmp_path: Path): + out_file: Path = tmp_path / "out.md" + result = subprocess.run( + [ + sys.executable, + "-m", + "coverage", + "run", + "-m", + "typer", + "tests.assets.cli.multi_app", + "utils", + "docs", + "--name", + "multiapp", + "--title", + "Awesome CLI", + "--output", + str(out_file), + ], + capture_output=True, + encoding="utf-8", + ) + docs_path: Path = Path(__file__).parent.parent / "assets/cli/multiapp-docs-title.md" + docs = docs_path.read_text() + written_docs = out_file.read_text() + assert docs in written_docs + assert "Docs saved to:" in result.stdout + + +def test_doc_not_existing(): + result = subprocess.run( + [ + sys.executable, + "-m", + "coverage", + "run", + "-m", + "typer", + "no_typer", + "utils", + "docs", + ], + capture_output=True, + encoding="utf-8", + ) + assert "Could not import as Python module:" in result.stderr + + +def test_doc_no_typer(): + result = subprocess.run( + [ + sys.executable, + "-m", + "coverage", + "run", + "-m", + "typer", + "tests/assets/cli/empty_script.py", + "utils", + "docs", + ], + capture_output=True, + encoding="utf-8", + ) + assert "No Typer app found" in result.stderr + + +def test_doc_file_not_existing(): + result = subprocess.run( + [ + sys.executable, + "-m", + "coverage", + "run", + "-m", + "typer", + "assets/cli/not_existing.py", + "utils", + "docs", + ], + capture_output=True, + encoding="utf-8", + ) + assert "Not a valid file or Python module:" in result.stderr + + +def test_doc_html_output(tmp_path: Path): + out_file: Path = tmp_path / "out.md" + result = subprocess.run( + [ + sys.executable, + "-m", + "coverage", + "run", + "-m", + "typer", + "tests.assets.cli.rich_formatted_app", + "utils", + "docs", + "--title", + "Awesome CLI", + "--output", + str(out_file), + ], + capture_output=True, + encoding="utf-8", + env={**os.environ, "PYTHONIOENCODING": "utf-8"}, + ) + docs_path: Path = ( + Path(__file__).parent.parent / "assets" / "cli" / "richformattedapp-docs.md" + ) + docs = docs_path.read_text(encoding="utf-8") + written_docs = out_file.read_text(encoding="utf-8") + assert docs in written_docs + assert "Docs saved to:" in result.stdout diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_cli/test_empty_script.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_cli/test_empty_script.py new file mode 100644 index 0000000000000000000000000000000000000000..7e90789eb4b8053a39c0408f474ce45b7df66a1e --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_cli/test_empty_script.py @@ -0,0 +1,20 @@ +import subprocess +import sys + + +def test_script_help(): + result = subprocess.run( + [ + sys.executable, + "-m", + "coverage", + "run", + "-m", + "typer", + "tests/assets/cli/empty_script.py", + "--help", + ], + capture_output=True, + encoding="utf-8", + ) + assert "run" not in result.stdout diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_cli/test_extending_app.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_cli/test_extending_app.py new file mode 100644 index 0000000000000000000000000000000000000000..de02f3c15dc05297c8d6610c55376ee220854f0f --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_cli/test_extending_app.py @@ -0,0 +1,120 @@ +import subprocess +import sys + + +def test_script_help(): + result = subprocess.run( + [ + sys.executable, + "-m", + "coverage", + "run", + "-m", + "typer", + "tests/assets/cli/extended_app_cli.py", + "run", + "--help", + ], + capture_output=True, + encoding="utf-8", + ) + assert "top" in result.stdout + assert "hello" in result.stdout + assert "sub" in result.stdout + + +def test_script_top(): + result = subprocess.run( + [ + sys.executable, + "-m", + "coverage", + "run", + "-m", + "typer", + "tests/assets/cli/extended_app_cli.py", + "run", + "top", + ], + capture_output=True, + encoding="utf-8", + ) + assert "top" in result.stdout + + +def test_script_hello(): + result = subprocess.run( + [ + sys.executable, + "-m", + "coverage", + "run", + "-m", + "typer", + "tests/assets/cli/extended_app_cli.py", + "run", + "hello", + ], + capture_output=True, + encoding="utf-8", + ) + assert "hello there" in result.stdout + + +def test_script_bye(): + result = subprocess.run( + [ + sys.executable, + "-m", + "coverage", + "run", + "-m", + "typer", + "tests/assets/cli/extended_app_cli.py", + "run", + "bye", + ], + capture_output=True, + encoding="utf-8", + ) + assert "bye" in result.stdout + + +def test_script_sub_command_help(): + result = subprocess.run( + [ + sys.executable, + "-m", + "coverage", + "run", + "-m", + "typer", + "tests/assets/cli/extended_app_cli.py", + "run", + "sub", + "--help", + ], + capture_output=True, + encoding="utf-8", + ) + assert "sub-sub-command" in result.stdout + + +def test_script_sub_sub_command(): + result = subprocess.run( + [ + sys.executable, + "-m", + "coverage", + "run", + "-m", + "typer", + "tests/assets/cli/extended_app_cli.py", + "run", + "sub", + "sub-sub-command", + ], + capture_output=True, + encoding="utf-8", + ) + assert "sub_sub_command" in result.stdout diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_cli/test_extending_empty_app.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_cli/test_extending_empty_app.py new file mode 100644 index 0000000000000000000000000000000000000000..e465f60a9bee2e22417774838a3c9e662c6f69a2 --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_cli/test_extending_empty_app.py @@ -0,0 +1,59 @@ +import subprocess +import sys + + +def test_script_help(): + result = subprocess.run( + [ + sys.executable, + "-m", + "coverage", + "run", + "-m", + "typer", + "tests/assets/cli/extended_empty_app_cli.py", + "run", + "--help", + ], + capture_output=True, + encoding="utf-8", + ) + assert "hello" in result.stdout + + +def test_script_hello(): + result = subprocess.run( + [ + sys.executable, + "-m", + "coverage", + "run", + "-m", + "typer", + "tests/assets/cli/extended_empty_app_cli.py", + "run", + "hello", + ], + capture_output=True, + encoding="utf-8", + ) + assert "hello there" in result.stdout + + +def test_script_bye(): + result = subprocess.run( + [ + sys.executable, + "-m", + "coverage", + "run", + "-m", + "typer", + "tests/assets/cli/extended_empty_app_cli.py", + "run", + "bye", + ], + capture_output=True, + encoding="utf-8", + ) + assert "bye" in result.stdout diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_cli/test_func_other_name.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_cli/test_func_other_name.py new file mode 100644 index 0000000000000000000000000000000000000000..7949ff8f9b7adf35311a51847478d5b649b8a63a --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_cli/test_func_other_name.py @@ -0,0 +1,22 @@ +import subprocess +import sys + + +def test_script(): + result = subprocess.run( + [ + sys.executable, + "-m", + "coverage", + "run", + "-m", + "typer", + "tests/assets/cli/func_other_name.py", + "run", + "--name", + "Camila", + ], + capture_output=True, + encoding="utf-8", + ) + assert "Hello Camila" in result.stdout diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_cli/test_help.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_cli/test_help.py new file mode 100644 index 0000000000000000000000000000000000000000..64e5495c9aecadc2e42fc256f9e108040797835e --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_cli/test_help.py @@ -0,0 +1,38 @@ +import subprocess +import sys + + +def test_script_help(): + result = subprocess.run( + [ + sys.executable, + "-m", + "coverage", + "run", + "-m", + "typer", + "tests/assets/cli/sample.py", + "--help", + ], + capture_output=True, + encoding="utf-8", + ) + assert "run" in result.stdout + + +def test_not_python(): + result = subprocess.run( + [ + sys.executable, + "-m", + "coverage", + "run", + "-m", + "typer", + "tests/assets/cli/not_python.txt", + "run", + ], + capture_output=True, + encoding="utf-8", + ) + assert "Could not import as Python file" in result.stderr diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_cli/test_multi_app.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_cli/test_multi_app.py new file mode 100644 index 0000000000000000000000000000000000000000..5315289f5ee5bd4c1e9ed99fdc4dfcd8602994ab --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_cli/test_multi_app.py @@ -0,0 +1,123 @@ +import subprocess +import sys + + +def test_script_help(): + result = subprocess.run( + [ + sys.executable, + "-m", + "coverage", + "run", + "-m", + "typer", + "tests/assets/cli/multi_app.py", + "run", + "--help", + ], + capture_output=True, + encoding="utf-8", + ) + assert "sub" in result.stdout + assert "top" in result.stdout + + +def test_script_app_non_existent(): + result = subprocess.run( + [ + sys.executable, + "-m", + "coverage", + "run", + "-m", + "typer", + "--app", + "non_existent", + "tests/assets/cli/multi_app.py", + "run", + "--help", + ], + capture_output=True, + encoding="utf-8", + ) + assert "Not a Typer object:" in result.stderr + + +def test_script_sub(): + result = subprocess.run( + [ + sys.executable, + "-m", + "coverage", + "run", + "-m", + "typer", + "tests/assets/cli/multi_app.py", + "run", + "sub", + "--help", + ], + capture_output=True, + encoding="utf-8", + ) + assert "bye" in result.stdout + assert "hello" in result.stdout + + +def test_script_top(): + result = subprocess.run( + [ + sys.executable, + "-m", + "coverage", + "run", + "-m", + "typer", + "tests/assets/cli/multi_app.py", + "run", + "top", + ], + capture_output=True, + encoding="utf-8", + ) + assert "top" in result.stdout + + +def test_script_sub_hello(): + result = subprocess.run( + [ + sys.executable, + "-m", + "coverage", + "run", + "-m", + "typer", + "tests/assets/cli/multi_app.py", + "run", + "sub", + "hello", + ], + capture_output=True, + encoding="utf-8", + ) + assert "Hello World" in result.stdout + + +def test_script_sub_bye(): + result = subprocess.run( + [ + sys.executable, + "-m", + "coverage", + "run", + "-m", + "typer", + "tests/assets/cli/multi_app.py", + "run", + "sub", + "bye", + ], + capture_output=True, + encoding="utf-8", + ) + assert "sub bye" in result.stdout diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_cli/test_multi_app_cli.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_cli/test_multi_app_cli.py new file mode 100644 index 0000000000000000000000000000000000000000..1eaddaba87873cf9b8eae681724b6652b44bdb43 --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_cli/test_multi_app_cli.py @@ -0,0 +1,102 @@ +import subprocess +import sys + + +def test_script_help(): + result = subprocess.run( + [ + sys.executable, + "-m", + "coverage", + "run", + "-m", + "typer", + "tests/assets/cli/multi_app_cli.py", + "run", + "--help", + ], + capture_output=True, + encoding="utf-8", + ) + assert "sub" in result.stdout + assert "top" in result.stdout + + +def test_script_sub(): + result = subprocess.run( + [ + sys.executable, + "-m", + "coverage", + "run", + "-m", + "typer", + "tests/assets/cli/multi_app_cli.py", + "run", + "sub", + "--help", + ], + capture_output=True, + encoding="utf-8", + ) + assert "bye" in result.stdout + assert "hello" in result.stdout + + +def test_script_top(): + result = subprocess.run( + [ + sys.executable, + "-m", + "coverage", + "run", + "-m", + "typer", + "tests/assets/cli/multi_app_cli.py", + "run", + "top", + ], + capture_output=True, + encoding="utf-8", + ) + assert "top" in result.stdout + + +def test_script_sub_hello(): + result = subprocess.run( + [ + sys.executable, + "-m", + "coverage", + "run", + "-m", + "typer", + "tests/assets/cli/multi_app_cli.py", + "run", + "sub", + "hello", + ], + capture_output=True, + encoding="utf-8", + ) + assert "sub hello" in result.stdout + + +def test_script_sub_bye(): + result = subprocess.run( + [ + sys.executable, + "-m", + "coverage", + "run", + "-m", + "typer", + "tests/assets/cli/multi_app_cli.py", + "run", + "sub", + "bye", + ], + capture_output=True, + encoding="utf-8", + ) + assert "sub bye" in result.stdout diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_cli/test_multi_app_sub.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_cli/test_multi_app_sub.py new file mode 100644 index 0000000000000000000000000000000000000000..7d5f6f68882fc1db165579f4e43e27a0ca8a002e --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_cli/test_multi_app_sub.py @@ -0,0 +1,46 @@ +import subprocess +import sys + + +def test_script_help(): + result = subprocess.run( + [ + sys.executable, + "-m", + "coverage", + "run", + "-m", + "typer", + "--app", + "sub_app", + "tests/assets/cli/multi_app.py", + "run", + "--help", + ], + capture_output=True, + encoding="utf-8", + ) + assert "bye" in result.stdout + assert "hello" in result.stdout + assert "top" not in result.stdout + + +def test_script(): + result = subprocess.run( + [ + sys.executable, + "-m", + "coverage", + "run", + "-m", + "typer", + "--app", + "sub_app", + "tests/assets/cli/multi_app.py", + "run", + "hello", + ], + capture_output=True, + encoding="utf-8", + ) + assert "Hello World" in result.stdout diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_cli/test_multi_func.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_cli/test_multi_func.py new file mode 100644 index 0000000000000000000000000000000000000000..8b4b43a94d91009c84466eec244ab3e65d708455 --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_cli/test_multi_func.py @@ -0,0 +1,106 @@ +import subprocess +import sys + + +def test_help(): + result = subprocess.run( + [ + sys.executable, + "-m", + "coverage", + "run", + "-m", + "typer", + "tests/assets/cli/multi_func.py", + "run", + "--help", + ], + capture_output=True, + encoding="utf-8", + ) + assert "Say hi to someone, by default to the World." in result.stdout + + +def test_script(): + result = subprocess.run( + [ + sys.executable, + "-m", + "coverage", + "run", + "-m", + "typer", + "tests/assets/cli/multi_func.py", + "run", + "--name", + "Camila", + ], + capture_output=True, + encoding="utf-8", + ) + assert "Hello Camila" in result.stdout + + +def test_script_func_non_existent(): + result = subprocess.run( + [ + sys.executable, + "-m", + "coverage", + "run", + "-m", + "typer", + "--func", + "non_existent", + "tests/assets/cli/multi_func.py", + "run", + "--name", + "Camila", + ], + capture_output=True, + encoding="utf-8", + ) + assert "Not a function:" in result.stderr + + +def test_script_func_not_function(): + result = subprocess.run( + [ + sys.executable, + "-m", + "coverage", + "run", + "-m", + "typer", + "--func", + "message", + "tests/assets/cli/multi_func.py", + "run", + "--name", + "Camila", + ], + capture_output=True, + encoding="utf-8", + ) + assert "Not a function:" in result.stderr + + +def test_script_func(): + result = subprocess.run( + [ + sys.executable, + "-m", + "coverage", + "run", + "-m", + "typer", + "--func", + "say_stuff", + "tests/assets/cli/multi_func.py", + "run", + ], + capture_output=True, + encoding="utf-8", + ) + assert "Hello" not in result.stdout + assert "Stuff" in result.stdout diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_cli/test_not_python.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_cli/test_not_python.py new file mode 100644 index 0000000000000000000000000000000000000000..00384d1f559152bce67a596db2a319a027cb7ee6 --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_cli/test_not_python.py @@ -0,0 +1,20 @@ +import subprocess +import sys + + +def test_not_python(): + result = subprocess.run( + [ + sys.executable, + "-m", + "coverage", + "run", + "-m", + "typer", + "tests/assets/cli/not_python.txt", + "run", + ], + capture_output=True, + encoding="utf-8", + ) + assert "Could not import as Python file" in result.stderr diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_cli/test_sub.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_cli/test_sub.py new file mode 100644 index 0000000000000000000000000000000000000000..6eb0d4dac472367e710f6ab11b976fe90f124250 --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_cli/test_sub.py @@ -0,0 +1,139 @@ +import subprocess +import sys + + +def test_script_hello(): + result = subprocess.run( + [ + sys.executable, + "-m", + "coverage", + "run", + "-m", + "typer", + "tests/assets/cli/sample.py", + "run", + "hello", + ], + capture_output=True, + encoding="utf-8", + ) + assert "Hello World!" in result.stdout + + +def test_script_hello_name(): + result = subprocess.run( + [ + sys.executable, + "-m", + "coverage", + "run", + "-m", + "typer", + "tests/assets/cli/sample.py", + "run", + "hello", + "--name", + "Camila", + ], + capture_output=True, + encoding="utf-8", + ) + assert "Hello Camila!" in result.stdout + + +def test_script_hello_name_formal(): + result = subprocess.run( + [ + sys.executable, + "-m", + "coverage", + "run", + "-m", + "typer", + "tests/assets/cli/sample.py", + "run", + "hello", + "--name", + "Camila", + "--formal", + ], + capture_output=True, + encoding="utf-8", + ) + assert "Good morning Ms. Camila" in result.stdout + + +def test_script_bye(): + result = subprocess.run( + [ + sys.executable, + "-m", + "coverage", + "run", + "-m", + "typer", + "tests/assets/cli/sample.py", + "run", + "bye", + ], + capture_output=True, + encoding="utf-8", + ) + assert "Goodbye" in result.stdout + + +def test_script_bye_friend(): + result = subprocess.run( + [ + sys.executable, + "-m", + "coverage", + "run", + "-m", + "typer", + "tests/assets/cli/sample.py", + "run", + "bye", + "--friend", + ], + capture_output=True, + encoding="utf-8", + ) + assert "Goodbye my friend" in result.stdout + + +def test_script_help(): + result = subprocess.run( + [ + sys.executable, + "-m", + "coverage", + "run", + "-m", + "typer", + "tests/assets/cli/sample.py", + "--help", + ], + capture_output=True, + encoding="utf-8", + ) + assert "run" in result.stdout + + +def test_not_python(): + result = subprocess.run( + [ + sys.executable, + "-m", + "coverage", + "run", + "-m", + "typer", + "tests/assets/cli/not_python.txt", + "run", + ], + capture_output=True, + encoding="utf-8", + ) + assert "Could not import as Python file" in result.stderr diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_cli/test_sub_completion.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_cli/test_sub_completion.py new file mode 100644 index 0000000000000000000000000000000000000000..06588837335d6e7444556ad414a76dc13435bcb5 --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_cli/test_sub_completion.py @@ -0,0 +1,19 @@ +import os +import subprocess +import sys + + +def test_script_completion_run(): + result = subprocess.run( + [sys.executable, "-m", "coverage", "run", "-m", "typer"], + capture_output=True, + encoding="utf-8", + env={ + **os.environ, + "___MAIN__.PY_COMPLETE": "complete_bash", + "_PYTHON _M TYPER_COMPLETE": "complete_bash", + "COMP_WORDS": "typer tests/assets/cli/sample.py run hello --", + "COMP_CWORD": "4", + }, + ) + assert "--name" in result.stdout diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_cli/test_sub_help.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_cli/test_sub_help.py new file mode 100644 index 0000000000000000000000000000000000000000..d59f56fb2cf0eb5a7c54bf15962ea5757a959382 --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_cli/test_sub_help.py @@ -0,0 +1,24 @@ +import subprocess +import sys + + +def test_script_help(): + result = subprocess.run( + [ + sys.executable, + "-m", + "coverage", + "run", + "-m", + "typer", + "tests/assets/cli/sample.py", + "run", + "--help", + ], + capture_output=True, + encoding="utf-8", + ) + assert "bye" in result.stdout + assert "Say bye" in result.stdout + assert "hello" in result.stdout + assert "Say hi" in result.stdout diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_cli/test_version.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_cli/test_version.py new file mode 100644 index 0000000000000000000000000000000000000000..18f4b00efe4d8d928d2441382ef253625dffddf4 --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_cli/test_version.py @@ -0,0 +1,11 @@ +import subprocess +import sys + + +def test_script_help(): + result = subprocess.run( + [sys.executable, "-m", "coverage", "run", "-m", "typer", "--version"], + capture_output=True, + encoding="utf-8", + ) + assert "Typer version:" in result.stdout diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_completion/__init__.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_completion/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_completion/colon_example.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_completion/colon_example.py new file mode 100644 index 0000000000000000000000000000000000000000..70292385d73ed642d59224ef8d4da95cf2bc0eac --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_completion/colon_example.py @@ -0,0 +1,25 @@ +import typer + +image_desc = [ + ("alpine:latest", "latest alpine image"), + ("alpine:hello", "fake image: for testing"), + ("nvidia/cuda:10.0-devel-ubuntu18.04", ""), +] + + +def _complete(incomplete: str) -> str: + for image, desc in image_desc: + if image.startswith(incomplete): + yield image, desc + + +app = typer.Typer() + + +@app.command() +def image(name: str = typer.Option(autocompletion=_complete)): + typer.echo(name) + + +if __name__ == "__main__": + app() diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_completion/example_rich_tags.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_completion/example_rich_tags.py new file mode 100644 index 0000000000000000000000000000000000000000..4fc85c6d9240e1b80b7692c5191313aee0813b54 --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_completion/example_rich_tags.py @@ -0,0 +1,31 @@ +import typer + +app = typer.Typer() + + +@app.command() +def create(username: str): + """ + Create a [green]new[green/] user with USERNAME. + """ + print(f"Creating user: {username}") + + +@app.command() +def delete(username: str): + """ + Delete a user with [bold]USERNAME[/]. + """ + print(f"Deleting user: {username}") + + +@app.command() +def delete_all(): + """ + [red]Delete ALL users[/red] in the database. + """ + print("Deleting all users") + + +if __name__ == "__main__": + app() diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_completion/path_example.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_completion/path_example.py new file mode 100644 index 0000000000000000000000000000000000000000..887ebfef2489d3f2e1730974e743d83878a37261 --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_completion/path_example.py @@ -0,0 +1,14 @@ +from pathlib import Path + +import typer + +app = typer.Typer() + + +@app.command() +def f(p: Path): + print(p) + + +if __name__ == "__main__": + app() diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_completion/test_completion.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_completion/test_completion.py new file mode 100644 index 0000000000000000000000000000000000000000..4e1586e51d7a54ac7f91aa7ff17a1c14e22ef217 --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_completion/test_completion.py @@ -0,0 +1,164 @@ +import os +import subprocess +import sys +from pathlib import Path + +from docs_src.commands.index import tutorial001 as mod + +from ..utils import needs_bash, needs_linux, requires_completion_permission + + +@needs_bash +@needs_linux +def test_show_completion(): + result = subprocess.run( + [ + "bash", + "-c", + f"'{sys.executable}' -m coverage run '{mod.__file__}' --show-completion", + ], + capture_output=True, + encoding="utf-8", + env={**os.environ, "SHELL": "/bin/bash", "_TYPER_COMPLETE_TESTING": "True"}, + ) + assert "_TUTORIAL001.PY_COMPLETE=complete_bash" in result.stdout + + +@needs_bash +@needs_linux +@requires_completion_permission +def test_install_completion(): + bash_completion_path: Path = Path.home() / ".bashrc" + text = "" + if bash_completion_path.is_file(): # pragma: no cover + text = bash_completion_path.read_text() + result = subprocess.run( + [ + "bash", + "-c", + f"'{sys.executable}' -m coverage run '{mod.__file__}' --install-completion", + ], + capture_output=True, + encoding="utf-8", + env={**os.environ, "SHELL": "/bin/bash", "_TYPER_COMPLETE_TESTING": "True"}, + ) + new_text = bash_completion_path.read_text() + bash_completion_path.write_text(text) + assert "source" in new_text + assert str(Path(".bash_completions/tutorial001.py.sh")) in new_text + assert "completion installed in" in result.stdout + assert "Completion will take effect once you restart the terminal" in result.stdout + + +def test_completion_invalid_instruction(): + result = subprocess.run( + [sys.executable, "-m", "coverage", "run", mod.__file__], + capture_output=True, + encoding="utf-8", + env={ + **os.environ, + "_TUTORIAL001.PY_COMPLETE": "sourcebash", + }, + ) + assert result.returncode != 0 + assert "Invalid completion instruction." in result.stderr + + +def test_completion_source_bash(): + result = subprocess.run( + [sys.executable, "-m", "coverage", "run", mod.__file__], + capture_output=True, + encoding="utf-8", + env={ + **os.environ, + "_TUTORIAL001.PY_COMPLETE": "source_bash", + }, + ) + assert ( + "complete -o default -F _tutorial001py_completion tutorial001.py" + in result.stdout + ) + + +def test_completion_source_invalid_shell(): + result = subprocess.run( + [sys.executable, "-m", "coverage", "run", mod.__file__], + capture_output=True, + encoding="utf-8", + env={ + **os.environ, + "_TUTORIAL001.PY_COMPLETE": "source_xxx", + }, + ) + assert "Shell xxx not supported." in result.stderr + + +def test_completion_source_invalid_instruction(): + result = subprocess.run( + [sys.executable, "-m", "coverage", "run", mod.__file__], + capture_output=True, + encoding="utf-8", + env={ + **os.environ, + "_TUTORIAL001.PY_COMPLETE": "explode_bash", + }, + ) + assert 'Completion instruction "explode" not supported.' in result.stderr + + +def test_completion_source_zsh(): + result = subprocess.run( + [sys.executable, "-m", "coverage", "run", mod.__file__], + capture_output=True, + encoding="utf-8", + env={ + **os.environ, + "_TUTORIAL001.PY_COMPLETE": "source_zsh", + }, + ) + assert "compdef _tutorial001py_completion tutorial001.py" in result.stdout + + +def test_completion_source_fish(): + result = subprocess.run( + [sys.executable, "-m", "coverage", "run", mod.__file__], + capture_output=True, + encoding="utf-8", + env={ + **os.environ, + "_TUTORIAL001.PY_COMPLETE": "source_fish", + }, + ) + assert "complete --command tutorial001.py --no-files" in result.stdout + + +def test_completion_source_powershell(): + result = subprocess.run( + [sys.executable, "-m", "coverage", "run", mod.__file__], + capture_output=True, + encoding="utf-8", + env={ + **os.environ, + "_TUTORIAL001.PY_COMPLETE": "source_powershell", + }, + ) + assert ( + "Register-ArgumentCompleter -Native -CommandName tutorial001.py -ScriptBlock $scriptblock" + in result.stdout + ) + + +def test_completion_source_pwsh(): + result = subprocess.run( + [sys.executable, "-m", "coverage", "run", mod.__file__], + capture_output=True, + encoding="utf-8", + env={ + **os.environ, + "_TUTORIAL001.PY_COMPLETE": "source_pwsh", + }, + ) + assert ( + "Register-ArgumentCompleter -Native -CommandName tutorial001.py -ScriptBlock $scriptblock" + in result.stdout + ) diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_completion/test_completion_complete.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_completion/test_completion_complete.py new file mode 100644 index 0000000000000000000000000000000000000000..ea37f68546087780a91151cd23ec628212f3f1c7 --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_completion/test_completion_complete.py @@ -0,0 +1,160 @@ +import os +import subprocess +import sys + +from docs_src.commands.help import tutorial001 as mod + + +def test_completion_complete_subcommand_bash(): + result = subprocess.run( + [sys.executable, "-m", "coverage", "run", mod.__file__, " "], + capture_output=True, + encoding="utf-8", + env={ + **os.environ, + "_TUTORIAL001.PY_COMPLETE": "complete_bash", + "COMP_WORDS": "tutorial001.py del", + "COMP_CWORD": "1", + }, + ) + assert "delete\ndelete-all" in result.stdout + + +def test_completion_complete_subcommand_bash_invalid(): + result = subprocess.run( + [sys.executable, "-m", "coverage", "run", mod.__file__, " "], + capture_output=True, + encoding="utf-8", + env={ + **os.environ, + "_TUTORIAL001.PY_COMPLETE": "complete_bash", + "COMP_WORDS": "tutorial001.py del", + "COMP_CWORD": "42", + }, + ) + assert "create\ndelete\ndelete-all\ninit" in result.stdout + + +def test_completion_complete_subcommand_zsh(): + result = subprocess.run( + [sys.executable, "-m", "coverage", "run", mod.__file__, " "], + capture_output=True, + encoding="utf-8", + env={ + **os.environ, + "_TUTORIAL001.PY_COMPLETE": "complete_zsh", + "_TYPER_COMPLETE_ARGS": "tutorial001.py del", + }, + ) + assert ( + """_arguments '*: :(("delete":"Delete a user with USERNAME."\n""" + """\"delete-all":"Delete ALL users in the database."))'""" + ) in result.stdout + + +def test_completion_complete_subcommand_zsh_files(): + result = subprocess.run( + [sys.executable, "-m", "coverage", "run", mod.__file__, " "], + capture_output=True, + encoding="utf-8", + env={ + **os.environ, + "_TUTORIAL001.PY_COMPLETE": "complete_zsh", + "_TYPER_COMPLETE_ARGS": "tutorial001.py delete ", + }, + ) + assert ("_files") in result.stdout + + +def test_completion_complete_subcommand_fish(): + result = subprocess.run( + [sys.executable, "-m", "coverage", "run", mod.__file__, " "], + capture_output=True, + encoding="utf-8", + env={ + **os.environ, + "_TUTORIAL001.PY_COMPLETE": "complete_fish", + "_TYPER_COMPLETE_ARGS": "tutorial001.py del", + "_TYPER_COMPLETE_FISH_ACTION": "get-args", + }, + ) + assert ( + "delete\tDelete a user with USERNAME.\ndelete-all\tDelete ALL users in the database." + in result.stdout + ) + + +def test_completion_complete_subcommand_fish_should_complete(): + result = subprocess.run( + [sys.executable, "-m", "coverage", "run", mod.__file__, " "], + capture_output=True, + encoding="utf-8", + env={ + **os.environ, + "_TUTORIAL001.PY_COMPLETE": "complete_fish", + "_TYPER_COMPLETE_ARGS": "tutorial001.py del", + "_TYPER_COMPLETE_FISH_ACTION": "is-args", + }, + ) + assert result.returncode == 0 + + +def test_completion_complete_subcommand_fish_should_complete_no(): + result = subprocess.run( + [sys.executable, "-m", "coverage", "run", mod.__file__, " "], + capture_output=True, + encoding="utf-8", + env={ + **os.environ, + "_TUTORIAL001.PY_COMPLETE": "complete_fish", + "_TYPER_COMPLETE_ARGS": "tutorial001.py delete ", + "_TYPER_COMPLETE_FISH_ACTION": "is-args", + }, + ) + assert result.returncode != 0 + + +def test_completion_complete_subcommand_powershell(): + result = subprocess.run( + [sys.executable, "-m", "coverage", "run", mod.__file__, " "], + capture_output=True, + encoding="utf-8", + env={ + **os.environ, + "_TUTORIAL001.PY_COMPLETE": "complete_powershell", + "_TYPER_COMPLETE_ARGS": "tutorial001.py del", + }, + ) + assert ( + "delete:::Delete a user with USERNAME.\ndelete-all:::Delete ALL users in the database." + ) in result.stdout + + +def test_completion_complete_subcommand_pwsh(): + result = subprocess.run( + [sys.executable, "-m", "coverage", "run", mod.__file__, " "], + capture_output=True, + encoding="utf-8", + env={ + **os.environ, + "_TUTORIAL001.PY_COMPLETE": "complete_pwsh", + "_TYPER_COMPLETE_ARGS": "tutorial001.py del", + }, + ) + assert ( + "delete:::Delete a user with USERNAME.\ndelete-all:::Delete ALL users in the database." + ) in result.stdout + + +def test_completion_complete_subcommand_noshell(): + result = subprocess.run( + [sys.executable, "-m", "coverage", "run", mod.__file__, " "], + capture_output=True, + encoding="utf-8", + env={ + **os.environ, + "_TUTORIAL001.PY_COMPLETE": "complete_noshell", + "_TYPER_COMPLETE_ARGS": "tutorial001.py del", + }, + ) + assert ("") in result.stdout diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_completion/test_completion_complete_no_help.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_completion/test_completion_complete_no_help.py new file mode 100644 index 0000000000000000000000000000000000000000..4ac2bf98de88e5b202194885bb355e5a7ed5ac5a --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_completion/test_completion_complete_no_help.py @@ -0,0 +1,63 @@ +import os +import subprocess +import sys + +from docs_src.commands.index import tutorial002 as mod + + +def test_completion_complete_subcommand_zsh(): + result = subprocess.run( + [sys.executable, "-m", "coverage", "run", mod.__file__, " "], + capture_output=True, + encoding="utf-8", + env={ + **os.environ, + "_TUTORIAL002.PY_COMPLETE": "complete_zsh", + "_TYPER_COMPLETE_ARGS": "tutorial002.py ", + }, + ) + assert "create" in result.stdout + assert "delete" in result.stdout + + +def test_completion_complete_subcommand_fish(): + result = subprocess.run( + [sys.executable, "-m", "coverage", "run", mod.__file__, " "], + capture_output=True, + encoding="utf-8", + env={ + **os.environ, + "_TUTORIAL002.PY_COMPLETE": "complete_fish", + "_TYPER_COMPLETE_ARGS": "tutorial002.py ", + "_TYPER_COMPLETE_FISH_ACTION": "get-args", + }, + ) + assert "create\ndelete" in result.stdout + + +def test_completion_complete_subcommand_powershell(): + result = subprocess.run( + [sys.executable, "-m", "coverage", "run", mod.__file__, " "], + capture_output=True, + encoding="utf-8", + env={ + **os.environ, + "_TUTORIAL002.PY_COMPLETE": "complete_powershell", + "_TYPER_COMPLETE_ARGS": "tutorial002.py ", + }, + ) + assert ("create::: \ndelete::: ") in result.stdout + + +def test_completion_complete_subcommand_pwsh(): + result = subprocess.run( + [sys.executable, "-m", "coverage", "run", mod.__file__, " "], + capture_output=True, + encoding="utf-8", + env={ + **os.environ, + "_TUTORIAL002.PY_COMPLETE": "complete_pwsh", + "_TYPER_COMPLETE_ARGS": "tutorial002.py ", + }, + ) + assert ("create::: \ndelete::: ") in result.stdout diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_completion/test_completion_complete_rich.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_completion/test_completion_complete_rich.py new file mode 100644 index 0000000000000000000000000000000000000000..9c53bb1032ba90294e53347717efff41e3515df6 --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_completion/test_completion_complete_rich.py @@ -0,0 +1,113 @@ +import os +import subprocess +import sys + +from . import example_rich_tags as mod + + +def test_script(): + result = subprocess.run( + [sys.executable, "-m", "coverage", "run", mod.__file__, "create", "DeadPool"], + capture_output=True, + encoding="utf-8", + ) + assert result.returncode == 0 + assert "Creating user: DeadPool" in result.stdout + + result = subprocess.run( + [sys.executable, "-m", "coverage", "run", mod.__file__, "delete", "DeadPool"], + capture_output=True, + encoding="utf-8", + ) + assert result.returncode == 0 + assert "Deleting user: DeadPool" in result.stdout + + result = subprocess.run( + [sys.executable, "-m", "coverage", "run", mod.__file__, "delete-all"], + capture_output=True, + encoding="utf-8", + ) + assert result.returncode == 0 + assert "Deleting all users" in result.stdout + + +def test_completion_complete_subcommand_bash(): + result = subprocess.run( + [sys.executable, "-m", "coverage", "run", mod.__file__, " "], + capture_output=True, + encoding="utf-8", + env={ + **os.environ, + "_EXAMPLE_RICH_TAGS.PY_COMPLETE": "complete_bash", + "COMP_WORDS": "example_rich_tags.py del", + "COMP_CWORD": "1", + }, + ) + assert "delete\ndelete-all" in result.stdout + + +def test_completion_complete_subcommand_zsh(): + result = subprocess.run( + [sys.executable, "-m", "coverage", "run", mod.__file__, " "], + capture_output=True, + encoding="utf-8", + env={ + **os.environ, + "_EXAMPLE_RICH_TAGS.PY_COMPLETE": "complete_zsh", + "_TYPER_COMPLETE_ARGS": "example_rich_tags.py del", + }, + ) + assert ( + """_arguments '*: :(("delete":"Delete a user with USERNAME."\n""" + """\"delete-all":"Delete ALL users in the database."))'""" + ) in result.stdout + + +def test_completion_complete_subcommand_fish(): + result = subprocess.run( + [sys.executable, "-m", "coverage", "run", mod.__file__, " "], + capture_output=True, + encoding="utf-8", + env={ + **os.environ, + "_EXAMPLE_RICH_TAGS.PY_COMPLETE": "complete_fish", + "_TYPER_COMPLETE_ARGS": "example_rich_tags.py del", + "_TYPER_COMPLETE_FISH_ACTION": "get-args", + }, + ) + assert ( + "delete\tDelete a user with USERNAME.\ndelete-all\tDelete ALL users in the database." + in result.stdout + ) + + +def test_completion_complete_subcommand_powershell(): + result = subprocess.run( + [sys.executable, "-m", "coverage", "run", mod.__file__, " "], + capture_output=True, + encoding="utf-8", + env={ + **os.environ, + "_EXAMPLE_RICH_TAGS.PY_COMPLETE": "complete_powershell", + "_TYPER_COMPLETE_ARGS": "example_rich_tags.py del", + }, + ) + assert ( + "delete:::Delete a user with USERNAME.\ndelete-all:::Delete ALL users in the database." + ) in result.stdout + + +def test_completion_complete_subcommand_pwsh(): + result = subprocess.run( + [sys.executable, "-m", "coverage", "run", mod.__file__, " "], + capture_output=True, + encoding="utf-8", + env={ + **os.environ, + "_EXAMPLE_RICH_TAGS.PY_COMPLETE": "complete_pwsh", + "_TYPER_COMPLETE_ARGS": "example_rich_tags.py del", + }, + ) + assert ( + "delete:::Delete a user with USERNAME.\ndelete-all:::Delete ALL users in the database." + ) in result.stdout diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_completion/test_completion_install.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_completion/test_completion_install.py new file mode 100644 index 0000000000000000000000000000000000000000..873c1416e9cdd370fbe171d6eab3fc2531028c29 --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_completion/test_completion_install.py @@ -0,0 +1,172 @@ +import os +import subprocess +import sys +from pathlib import Path +from unittest import mock + +import shellingham +import typer +from typer.testing import CliRunner + +from docs_src.commands.index import tutorial001 as mod + +from ..utils import requires_completion_permission + +runner = CliRunner() +app = typer.Typer() +app.command()(mod.main) + + +@requires_completion_permission +def test_completion_install_no_shell(): + result = subprocess.run( + [sys.executable, "-m", "coverage", "run", mod.__file__, "--install-completion"], + capture_output=True, + encoding="utf-8", + env={ + **os.environ, + "_TYPER_COMPLETE_TEST_DISABLE_SHELL_DETECTION": "True", + }, + ) + assert "Option '--install-completion' requires an argument" in result.stderr + + +@requires_completion_permission +def test_completion_install_bash(): + bash_completion_path: Path = Path.home() / ".bashrc" + text = "" + if bash_completion_path.is_file(): + text = bash_completion_path.read_text() + result = subprocess.run( + [ + sys.executable, + "-m", + "coverage", + "run", + mod.__file__, + "--install-completion", + "bash", + ], + capture_output=True, + encoding="utf-8", + env={ + **os.environ, + "_TYPER_COMPLETE_TEST_DISABLE_SHELL_DETECTION": "True", + }, + ) + new_text = bash_completion_path.read_text() + bash_completion_path.write_text(text) + install_source = Path(".bash_completions/tutorial001.py.sh") + assert str(install_source) not in text + assert str(install_source) in new_text + assert "completion installed in" in result.stdout + assert "Completion will take effect once you restart the terminal" in result.stdout + install_source_path = Path.home() / install_source + assert install_source_path.is_file() + install_content = install_source_path.read_text() + install_source_path.unlink() + assert ( + "complete -o default -F _tutorial001py_completion tutorial001.py" + in install_content + ) + + +@requires_completion_permission +def test_completion_install_zsh(): + completion_path: Path = Path.home() / ".zshrc" + text = "" + if not completion_path.is_file(): # pragma: no cover + completion_path.write_text('echo "custom .zshrc"') + if completion_path.is_file(): + text = completion_path.read_text() + result = subprocess.run( + [ + sys.executable, + "-m", + "coverage", + "run", + mod.__file__, + "--install-completion", + "zsh", + ], + capture_output=True, + encoding="utf-8", + env={ + **os.environ, + "_TYPER_COMPLETE_TEST_DISABLE_SHELL_DETECTION": "True", + }, + ) + new_text = completion_path.read_text() + completion_path.write_text(text) + zfunc_fragment = "fpath+=~/.zfunc" + assert zfunc_fragment in new_text + assert "completion installed in" in result.stdout + assert "Completion will take effect once you restart the terminal" in result.stdout + install_source_path = Path.home() / ".zfunc/_tutorial001.py" + assert install_source_path.is_file() + install_content = install_source_path.read_text() + install_source_path.unlink() + assert "compdef _tutorial001py_completion tutorial001.py" in install_content + + +@requires_completion_permission +def test_completion_install_fish(): + script_path = Path(mod.__file__) + completion_path: Path = ( + Path.home() / f".config/fish/completions/{script_path.name}.fish" + ) + result = subprocess.run( + [ + sys.executable, + "-m", + "coverage", + "run", + mod.__file__, + "--install-completion", + "fish", + ], + capture_output=True, + encoding="utf-8", + env={ + **os.environ, + "_TYPER_COMPLETE_TEST_DISABLE_SHELL_DETECTION": "True", + }, + ) + new_text = completion_path.read_text() + completion_path.unlink() + assert "complete --command tutorial001.py" in new_text + assert "completion installed in" in result.stdout + assert "Completion will take effect once you restart the terminal" in result.stdout + + +@requires_completion_permission +def test_completion_install_powershell(): + completion_path: Path = ( + Path.home() / ".config/powershell/Microsoft.PowerShell_profile.ps1" + ) + completion_path_bytes = f"{completion_path}\n".encode("windows-1252") + text = "" + if completion_path.is_file(): # pragma: no cover + text = completion_path.read_text() + + with mock.patch.object( + shellingham, "detect_shell", return_value=("pwsh", "/usr/bin/pwsh") + ): + with mock.patch.object( + subprocess, + "run", + return_value=subprocess.CompletedProcess( + ["pwsh"], returncode=0, stdout=completion_path_bytes + ), + ): + result = runner.invoke(app, ["--install-completion"]) + install_script = "Register-ArgumentCompleter -Native -CommandName mocked-typer-testing-app -ScriptBlock $scriptblock" + parent: Path = completion_path.parent + parent.mkdir(parents=True, exist_ok=True) + completion_path.write_text(install_script) + new_text = completion_path.read_text() + completion_path.write_text(text) + assert install_script not in text + assert install_script in new_text + assert "completion installed in" in result.stdout + assert "Completion will take effect once you restart the terminal" in result.stdout diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_completion/test_completion_option_colon.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_completion/test_completion_option_colon.py new file mode 100644 index 0000000000000000000000000000000000000000..f106eca8621e301c03c9e0a5d2b4349f565949f0 --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_completion/test_completion_option_colon.py @@ -0,0 +1,219 @@ +import os +import subprocess +import sys + +from . import colon_example as mod + + +def test_script(): + result = subprocess.run( + [sys.executable, "-m", "coverage", "run", mod.__file__, "--name", "DeadPool"], + capture_output=True, + encoding="utf-8", + ) + assert result.returncode == 0 + assert "DeadPool" in result.stdout + + +def test_completion_colon_bash_all(): + result = subprocess.run( + [sys.executable, "-m", "coverage", "run", mod.__file__, " "], + capture_output=True, + encoding="utf-8", + env={ + **os.environ, + "_COLON_EXAMPLE.PY_COMPLETE": "complete_bash", + "COMP_WORDS": "colon_example.py --name ", + "COMP_CWORD": "2", + }, + ) + assert "alpine:hello" in result.stdout + assert "alpine:latest" in result.stdout + assert "nvidia/cuda:10.0-devel-ubuntu18.04" in result.stdout + + +def test_completion_colon_bash_partial(): + result = subprocess.run( + [sys.executable, "-m", "coverage", "run", mod.__file__, " "], + capture_output=True, + encoding="utf-8", + env={ + **os.environ, + "_COLON_EXAMPLE.PY_COMPLETE": "complete_bash", + "COMP_WORDS": "colon_example.py --name alpine ", + "COMP_CWORD": "2", + }, + ) + assert "alpine:hello" in result.stdout + assert "alpine:latest" in result.stdout + assert "nvidia/cuda:10.0-devel-ubuntu18.04" not in result.stdout + + +def test_completion_colon_bash_single(): + result = subprocess.run( + [sys.executable, "-m", "coverage", "run", mod.__file__, " "], + capture_output=True, + encoding="utf-8", + env={ + **os.environ, + "_COLON_EXAMPLE.PY_COMPLETE": "complete_bash", + "COMP_WORDS": "colon_example.py --name alpine:hell ", + "COMP_CWORD": "2", + }, + ) + assert "alpine:hello" in result.stdout + assert "alpine:latest" not in result.stdout + assert "nvidia/cuda:10.0-devel-ubuntu18.04" not in result.stdout + + +def test_completion_colon_zsh_all(): + result = subprocess.run( + [sys.executable, "-m", "coverage", "run", mod.__file__, " "], + capture_output=True, + encoding="utf-8", + env={ + **os.environ, + "_COLON_EXAMPLE.PY_COMPLETE": "complete_zsh", + "_TYPER_COMPLETE_ARGS": "colon_example.py --name ", + }, + ) + assert "alpine\\\\:hello" in result.stdout + assert "alpine\\\\:latest" in result.stdout + assert "nvidia/cuda\\\\:10.0-devel-ubuntu18.04" in result.stdout + + +def test_completion_colon_zsh_partial(): + result = subprocess.run( + [sys.executable, "-m", "coverage", "run", mod.__file__, " "], + capture_output=True, + encoding="utf-8", + env={ + **os.environ, + "_COLON_EXAMPLE.PY_COMPLETE": "complete_zsh", + "_TYPER_COMPLETE_ARGS": "colon_example.py --name alpine", + }, + ) + assert "alpine\\\\:hello" in result.stdout + assert "alpine\\\\:latest" in result.stdout + assert "nvidia/cuda\\\\:10.0-devel-ubuntu18.04" not in result.stdout + + +def test_completion_colon_zsh_single(): + result = subprocess.run( + [sys.executable, "-m", "coverage", "run", mod.__file__, " "], + capture_output=True, + encoding="utf-8", + env={ + **os.environ, + "_COLON_EXAMPLE.PY_COMPLETE": "complete_zsh", + "_TYPER_COMPLETE_ARGS": "colon_example.py --name alpine:hell", + }, + ) + assert "alpine\\\\:hello" in result.stdout + assert "alpine\\\\:latest" not in result.stdout + assert "nvidia/cuda\\\\:10.0-devel-ubuntu18.04" not in result.stdout + + +def test_completion_colon_powershell_all(): + result = subprocess.run( + [sys.executable, "-m", "coverage", "run", mod.__file__, " "], + capture_output=True, + encoding="utf-8", + env={ + **os.environ, + "_COLON_EXAMPLE.PY_COMPLETE": "complete_powershell", + "_TYPER_COMPLETE_ARGS": "colon_example.py --name ", + "_TYPER_COMPLETE_WORD_TO_COMPLETE": "", + }, + ) + assert "alpine:hello" in result.stdout + assert "alpine:latest" in result.stdout + assert "nvidia/cuda:10.0-devel-ubuntu18.04" in result.stdout + + +def test_completion_colon_powershell_partial(): + result = subprocess.run( + [sys.executable, "-m", "coverage", "run", mod.__file__, " "], + capture_output=True, + encoding="utf-8", + env={ + **os.environ, + "_COLON_EXAMPLE.PY_COMPLETE": "complete_powershell", + "_TYPER_COMPLETE_ARGS": "colon_example.py --name alpine", + "_TYPER_COMPLETE_WORD_TO_COMPLETE": "alpine", + }, + ) + assert "alpine:hello" in result.stdout + assert "alpine:latest" in result.stdout + assert "nvidia/cuda:10.0-devel-ubuntu18.04" not in result.stdout + + +def test_completion_colon_powershell_single(): + result = subprocess.run( + [sys.executable, "-m", "coverage", "run", mod.__file__, " "], + capture_output=True, + encoding="utf-8", + env={ + **os.environ, + "_COLON_EXAMPLE.PY_COMPLETE": "complete_powershell", + "_TYPER_COMPLETE_ARGS": "colon_example.py --name alpine:hell", + "_TYPER_COMPLETE_WORD_TO_COMPLETE": "alpine:hell", + }, + ) + assert "alpine:hello" in result.stdout + assert "alpine:latest" not in result.stdout + assert "nvidia/cuda:10.0-devel-ubuntu18.04" not in result.stdout + + +def test_completion_colon_pwsh_all(): + result = subprocess.run( + [sys.executable, "-m", "coverage", "run", mod.__file__, " "], + capture_output=True, + encoding="utf-8", + env={ + **os.environ, + "_COLON_EXAMPLE.PY_COMPLETE": "complete_pwsh", + "_TYPER_COMPLETE_ARGS": "colon_example.py --name", + }, + ) + + assert "alpine:hello" in result.stdout + assert "alpine:latest" in result.stdout + assert "nvidia/cuda:10.0-devel-ubuntu18.04" in result.stdout + + +def test_completion_colon_pwsh_partial(): + result = subprocess.run( + [sys.executable, "-m", "coverage", "run", mod.__file__, " "], + capture_output=True, + encoding="utf-8", + env={ + **os.environ, + "_COLON_EXAMPLE.PY_COMPLETE": "complete_pwsh", + "_TYPER_COMPLETE_ARGS": "colon_example.py --name alpine", + "_TYPER_COMPLETE_WORD_TO_COMPLETE": "alpine", + }, + ) + assert "alpine:hello" in result.stdout + assert "alpine:latest" in result.stdout + assert "nvidia/cuda:10.0-devel-ubuntu18.04" not in result.stdout + + +def test_completion_colon_pwsh_single(): + result = subprocess.run( + [sys.executable, "-m", "coverage", "run", mod.__file__, " "], + capture_output=True, + encoding="utf-8", + env={ + **os.environ, + "_COLON_EXAMPLE.PY_COMPLETE": "complete_pwsh", + "_TYPER_COMPLETE_ARGS": "colon_example.py --name alpine:hell", + "_TYPER_COMPLETE_WORD_TO_COMPLETE": "alpine:hell", + }, + ) + assert "alpine:hello" in result.stdout + assert "alpine:latest" not in result.stdout + assert "nvidia/cuda:10.0-devel-ubuntu18.04" not in result.stdout + + +# TODO: tests for complete_fish diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_completion/test_completion_path.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_completion/test_completion_path.py new file mode 100644 index 0000000000000000000000000000000000000000..f7bae79615dd70960264db76a01811f439f5fdd3 --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_completion/test_completion_path.py @@ -0,0 +1,30 @@ +import os +import subprocess +import sys + +from . import path_example as mod + + +def test_script(): + result = subprocess.run( + [sys.executable, "-m", "coverage", "run", mod.__file__, "path/to/deadpool"], + capture_output=True, + encoding="utf-8", + ) + assert result.returncode == 0 + assert "deadpool" in result.stdout + + +def test_completion_path_bash(): + result = subprocess.run( + [sys.executable, "-m", "coverage", "run", mod.__file__, " "], + capture_output=True, + encoding="utf-8", + env={ + **os.environ, + "_PATH_EXAMPLE.PY_COMPLETE": "complete_bash", + "COMP_WORDS": "path_example.py ", + "COMP_CWORD": "2", + }, + ) + assert result.returncode == 0 diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_completion/test_completion_show.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_completion/test_completion_show.py new file mode 100644 index 0000000000000000000000000000000000000000..10d8b6ff39fa491c71e7355c066eca526ada1850 --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_completion/test_completion_show.py @@ -0,0 +1,149 @@ +import os +import subprocess +import sys +from unittest import mock + +import shellingham +import typer +from typer.testing import CliRunner + +from docs_src.commands.index import tutorial001 as mod + +runner = CliRunner() +app = typer.Typer() +app.command()(mod.main) + + +def test_completion_show_no_shell(): + result = subprocess.run( + [sys.executable, "-m", "coverage", "run", mod.__file__, "--show-completion"], + capture_output=True, + encoding="utf-8", + env={ + **os.environ, + "_TYPER_COMPLETE_TEST_DISABLE_SHELL_DETECTION": "True", + }, + ) + assert "Option '--show-completion' requires an argument" in result.stderr + + +def test_completion_show_bash(): + result = subprocess.run( + [ + sys.executable, + "-m", + "coverage", + "run", + mod.__file__, + "--show-completion", + "bash", + ], + capture_output=True, + encoding="utf-8", + env={ + **os.environ, + "_TYPER_COMPLETE_TEST_DISABLE_SHELL_DETECTION": "True", + }, + ) + assert ( + "complete -o default -F _tutorial001py_completion tutorial001.py" + in result.stdout + ) + + +def test_completion_source_zsh(): + result = subprocess.run( + [ + sys.executable, + "-m", + "coverage", + "run", + mod.__file__, + "--show-completion", + "zsh", + ], + capture_output=True, + encoding="utf-8", + env={ + **os.environ, + "_TYPER_COMPLETE_TEST_DISABLE_SHELL_DETECTION": "True", + }, + ) + assert "compdef _tutorial001py_completion tutorial001.py" in result.stdout + + +def test_completion_source_fish(): + result = subprocess.run( + [ + sys.executable, + "-m", + "coverage", + "run", + mod.__file__, + "--show-completion", + "fish", + ], + capture_output=True, + encoding="utf-8", + env={ + **os.environ, + "_TYPER_COMPLETE_TEST_DISABLE_SHELL_DETECTION": "True", + }, + ) + assert "complete --command tutorial001.py --no-files" in result.stdout + + +def test_completion_source_powershell(): + result = subprocess.run( + [ + sys.executable, + "-m", + "coverage", + "run", + mod.__file__, + "--show-completion", + "powershell", + ], + capture_output=True, + encoding="utf-8", + env={ + **os.environ, + "_TYPER_COMPLETE_TEST_DISABLE_SHELL_DETECTION": "True", + }, + ) + assert ( + "Register-ArgumentCompleter -Native -CommandName tutorial001.py -ScriptBlock $scriptblock" + in result.stdout + ) + + +def test_completion_source_pwsh(): + result = subprocess.run( + [ + sys.executable, + "-m", + "coverage", + "run", + mod.__file__, + "--show-completion", + "pwsh", + ], + capture_output=True, + encoding="utf-8", + env={ + **os.environ, + "_TYPER_COMPLETE_TEST_DISABLE_SHELL_DETECTION": "True", + }, + ) + assert ( + "Register-ArgumentCompleter -Native -CommandName tutorial001.py -ScriptBlock $scriptblock" + in result.stdout + ) + + +def test_completion_show_invalid_shell(): + with mock.patch.object( + shellingham, "detect_shell", return_value=("xshell", "/usr/bin/xshell") + ): + result = runner.invoke(app, ["--show-completion"]) + assert "Shell xshell not supported" in result.output diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_completion/test_sanitization.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_completion/test_sanitization.py new file mode 100644 index 0000000000000000000000000000000000000000..a28dcca7d07b914b40c461c013c6d928999758f1 --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_completion/test_sanitization.py @@ -0,0 +1,39 @@ +from importlib.machinery import ModuleSpec +from typing import Union +from unittest.mock import patch + +import pytest +from typer._completion_classes import _sanitize_help_text + + +@pytest.mark.parametrize( + "find_spec, help_text, expected", + [ + ( + ModuleSpec("rich", loader=None), + "help text without rich tags", + "help text without rich tags", + ), + ( + None, + "help text without rich tags", + "help text without rich tags", + ), + ( + ModuleSpec("rich", loader=None), + "help [bold]with[/] rich tags", + "help with rich tags", + ), + ( + None, + "help [bold]with[/] rich tags", + "help [bold]with[/] rich tags", + ), + ], +) +def test_sanitize_help_text( + find_spec: Union[ModuleSpec, None], help_text: str, expected: str +): + with patch("importlib.util.find_spec", return_value=find_spec) as mock_find_spec: + assert _sanitize_help_text(help_text) == expected + mock_find_spec.assert_called_once_with("rich") diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_corner_cases.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_corner_cases.py new file mode 100644 index 0000000000000000000000000000000000000000..dfef7ddb60f5a6233099a3af95f31f75a32c2549 --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_corner_cases.py @@ -0,0 +1,35 @@ +import pytest +import typer.core +from typer.testing import CliRunner + +from tests.assets import corner_cases as mod + +runner = CliRunner() + + +def test_hidden_option(): + result = runner.invoke(mod.app, ["--help"]) + assert result.exit_code == 0 + assert "Say hello" in result.output + assert "--name" not in result.output + assert "/lastname" in result.output + assert "TEST_LASTNAME" in result.output + assert "(dynamic)" in result.output + + +def test_hidden_option_no_rich(monkeypatch: pytest.MonkeyPatch): + monkeypatch.setattr(typer.core, "HAS_RICH", False) + + result = runner.invoke(mod.app, ["--help"]) + assert result.exit_code == 0 + assert "Say hello" in result.output + assert "--name" not in result.output + assert "/lastname" in result.output + assert "TEST_LASTNAME" in result.output + assert "(dynamic)" in result.output + + +def test_coverage_call(): + result = runner.invoke(mod.app) + assert result.exit_code == 0 + assert "Hello John Doe, it seems you have 42" in result.output diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_deprecation.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_deprecation.py new file mode 100644 index 0000000000000000000000000000000000000000..bcb6fb29e28c9b958ebeb331283c70449b3ccfbc --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_deprecation.py @@ -0,0 +1,27 @@ +from typing import Optional + +import pytest +import typer +from typer.testing import CliRunner + +runner = CliRunner() + + +def test_deprecation(): + app = typer.Typer() + + def add_command(): + @app.command() + def cmd( + opt: Optional[float] = typer.Option( + 3.14, + is_flag=True, + flag_value="42", + help="Some wonderful number", + ), + ): ... # pragma: no cover + + with pytest.warns( + match="The 'is_flag' and 'flag_value' parameters are not supported by Typer" + ): + add_command() diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_exit_errors.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_exit_errors.py new file mode 100644 index 0000000000000000000000000000000000000000..1fdc3e36b0b48326274b41acc477347f9ffa9e1f --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_exit_errors.py @@ -0,0 +1,58 @@ +import errno + +import typer +import typer.completion +from typer.testing import CliRunner + +runner = CliRunner() + + +def test_eoferror(): + # Mainly for coverage/completeness + app = typer.Typer() + + @app.command() + def main(): + raise EOFError() + + result = runner.invoke(app) + assert result.exit_code == 1 + + +def test_keyboardinterrupt(): + # Mainly for coverage/completeness + app = typer.Typer() + + @app.command() + def main(): + raise KeyboardInterrupt() + + result = runner.invoke(app) + assert result.exit_code == 130 + assert result.stdout == "" + + +def test_oserror(): + # Mainly for coverage/completeness + app = typer.Typer() + + @app.command() + def main(): + e = OSError() + e.errno = errno.EPIPE + raise e + + result = runner.invoke(app) + assert result.exit_code == 1 + + +def test_oserror_no_epipe(): + # Mainly for coverage/completeness + app = typer.Typer() + + @app.command() + def main(): + raise OSError() + + result = runner.invoke(app) + assert result.exit_code == 1 diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_future_annotations.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_future_annotations.py new file mode 100644 index 0000000000000000000000000000000000000000..e820cd0923deb54f25e3c72e378fa73d2cb3eca1 --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_future_annotations.py @@ -0,0 +1,26 @@ +from __future__ import annotations + +import typer +from typer.testing import CliRunner +from typing_extensions import Annotated + +runner = CliRunner() + + +def test_annotated(): + app = typer.Typer() + + @app.command() + def cmd(force: Annotated[bool, typer.Option("--force")] = False): + if force: + print("Forcing operation") + else: + print("Not forcing") + + result = runner.invoke(app) + assert result.exit_code == 0, result.output + assert "Not forcing" in result.output + + result = runner.invoke(app, ["--force"]) + assert result.exit_code == 0, result.output + assert "Forcing operation" in result.output diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_launch.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_launch.py new file mode 100644 index 0000000000000000000000000000000000000000..75aaa2f0911dfc4c941d96456df47fe00cd6fcf1 --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_launch.py @@ -0,0 +1,51 @@ +import subprocess +from unittest.mock import patch + +import pytest +import typer + +url = "http://example.com" + + +@pytest.mark.parametrize( + "system, command", + [ + ("Darwin", "open"), + ("Linux", "xdg-open"), + ("FreeBSD", "xdg-open"), + ], +) +def test_launch_url_unix(system: str, command: str): + with patch("platform.system", return_value=system), patch( + "shutil.which", return_value=True + ), patch("subprocess.Popen") as mock_popen: + typer.launch(url) + + mock_popen.assert_called_once_with( + [command, url], stdout=subprocess.DEVNULL, stderr=subprocess.STDOUT + ) + + +def test_launch_url_windows(): + with patch("platform.system", return_value="Windows"), patch( + "webbrowser.open" + ) as mock_webbrowser_open: + typer.launch(url) + + mock_webbrowser_open.assert_called_once_with(url) + + +def test_launch_url_no_xdg_open(): + with patch("platform.system", return_value="Linux"), patch( + "shutil.which", return_value=None + ), patch("webbrowser.open") as mock_webbrowser_open: + typer.launch(url) + + mock_webbrowser_open.assert_called_once_with(url) + + +def test_calls_original_launch_when_not_passing_urls(): + with patch("typer.main.click.launch", return_value=0) as launch_mock: + typer.launch("not a url") + + launch_mock.assert_called_once_with("not a url") diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_others.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_others.py new file mode 100644 index 0000000000000000000000000000000000000000..a8ba207a5fa8e2ec15a350fe0f0fab8c78522725 --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_others.py @@ -0,0 +1,323 @@ +import os +import subprocess +import sys +import typing +from pathlib import Path +from unittest import mock + +import click +import pytest +import shellingham +import typer +import typer.completion +from typer.core import _split_opt +from typer.main import solve_typer_info_defaults, solve_typer_info_help +from typer.models import ParameterInfo, TyperInfo +from typer.testing import CliRunner +from typing_extensions import Annotated + +from .utils import requires_completion_permission + +runner = CliRunner() + + +def test_help_from_info(): + # Mainly for coverage/completeness + value = solve_typer_info_help(TyperInfo()) + assert value is None + + +def test_defaults_from_info(): + # Mainly for coverage/completeness + value = solve_typer_info_defaults(TyperInfo()) + assert value + + +def test_too_many_parsers(): + def custom_parser(value: str) -> int: + return int(value) # pragma: no cover + + class CustomClickParser(click.ParamType): + name = "custom_parser" + + def convert( + self, + value: str, + param: typing.Optional[click.Parameter], + ctx: typing.Optional[click.Context], + ) -> typing.Any: + return int(value) # pragma: no cover + + expected_error = ( + "Multiple custom type parsers provided. " + "`parser` and `click_type` may not both be provided." + ) + + with pytest.raises(ValueError, match=expected_error): + ParameterInfo(parser=custom_parser, click_type=CustomClickParser()) + + +def test_valid_parser_permutations(): + def custom_parser(value: str) -> int: + return int(value) # pragma: no cover + + class CustomClickParser(click.ParamType): + name = "custom_parser" + + def convert( + self, + value: str, + param: typing.Optional[click.Parameter], + ctx: typing.Optional[click.Context], + ) -> typing.Any: + return int(value) # pragma: no cover + + ParameterInfo() + ParameterInfo(parser=custom_parser) + ParameterInfo(click_type=CustomClickParser()) + + +@requires_completion_permission +def test_install_invalid_shell(): + app = typer.Typer() + + @app.command() + def main(): + print("Hello World") + + with mock.patch.object( + shellingham, "detect_shell", return_value=("xshell", "/usr/bin/xshell") + ): + result = runner.invoke(app, ["--install-completion"]) + assert "Shell xshell is not supported." in result.stdout + result = runner.invoke(app) + assert "Hello World" in result.stdout + + +def test_callback_too_many_parameters(): + app = typer.Typer() + + def name_callback(ctx, param, val1, val2): + pass # pragma: no cover + + @app.command() + def main(name: str = typer.Option(..., callback=name_callback)): + pass # pragma: no cover + + with pytest.raises(click.ClickException) as exc_info: + runner.invoke(app, ["--name", "Camila"]) + assert ( + exc_info.value.message == "Too many CLI parameter callback function parameters" + ) + + +def test_callback_2_untyped_parameters(): + app = typer.Typer() + + def name_callback(ctx, value): + print(f"info name is: {ctx.info_name}") + print(f"value is: {value}") + + @app.command() + def main(name: str = typer.Option(..., callback=name_callback)): + print("Hello World") + + result = runner.invoke(app, ["--name", "Camila"]) + assert "info name is: main" in result.stdout + assert "value is: Camila" in result.stdout + + +def test_callback_3_untyped_parameters(): + app = typer.Typer() + + def name_callback(ctx, param, value): + print(f"info name is: {ctx.info_name}") + print(f"param name is: {param.name}") + print(f"value is: {value}") + + @app.command() + def main(name: str = typer.Option(..., callback=name_callback)): + print("Hello World") + + result = runner.invoke(app, ["--name", "Camila"]) + assert "info name is: main" in result.stdout + assert "param name is: name" in result.stdout + assert "value is: Camila" in result.stdout + + +def test_callback_4_list_none(): + app = typer.Typer() + + def names_callback(ctx, param, values: typing.Optional[typing.List[str]]): + if values is None: + return values + return [value.upper() for value in values] + + @app.command() + def main( + names: typing.Optional[typing.List[str]] = typer.Option( + None, "--name", callback=names_callback + ), + ): + if names is None: + print("Hello World") + else: + print(f"Hello {', '.join(names)}") + + result = runner.invoke(app, ["--name", "Sideshow", "--name", "Bob"]) + assert "Hello SIDESHOW, BOB" in result.stdout + + result = runner.invoke(app, []) + assert "Hello World" in result.stdout + + +def test_empty_list_default_generator(): + def empty_list() -> typing.List[str]: + return [] + + app = typer.Typer() + + @app.command() + def main( + names: Annotated[typing.List[str], typer.Option(default_factory=empty_list)], + ): + print(names) + + result = runner.invoke(app) + assert "[]" in result.output + + +def test_completion_argument(): + file_path = Path(__file__).parent / "assets/completion_argument.py" + result = subprocess.run( + [sys.executable, "-m", "coverage", "run", str(file_path), "E"], + capture_output=True, + encoding="utf-8", + env={ + **os.environ, + "_COMPLETION_ARGUMENT.PY_COMPLETE": "complete_zsh", + "_TYPER_COMPLETE_ARGS": "completion_argument.py E", + "_TYPER_COMPLETE_TESTING": "True", + }, + ) + assert "Emma" in result.stdout or "_files" in result.stdout + assert "ctx: completion_argument" in result.stderr + assert "arg is: name" in result.stderr + assert "incomplete is: E" in result.stderr + + +def test_completion_untyped_parameters(): + file_path = Path(__file__).parent / "assets/completion_no_types.py" + result = subprocess.run( + [sys.executable, "-m", "coverage", "run", str(file_path)], + capture_output=True, + encoding="utf-8", + env={ + **os.environ, + "_COMPLETION_NO_TYPES.PY_COMPLETE": "complete_zsh", + "_TYPER_COMPLETE_ARGS": "completion_no_types.py --name Sebastian --name Ca", + }, + ) + assert "info name is: completion_no_types.py" in result.stderr + assert "args is: []" in result.stderr + assert "incomplete is: Ca" in result.stderr + assert '"Camila":"The reader of books."' in result.stdout + assert '"Carlos":"The writer of scripts."' in result.stdout + + result = subprocess.run( + [sys.executable, "-m", "coverage", "run", str(file_path)], + capture_output=True, + encoding="utf-8", + ) + assert "Hello World" in result.stdout + + +def test_completion_untyped_parameters_different_order_correct_names(): + file_path = Path(__file__).parent / "assets/completion_no_types_order.py" + result = subprocess.run( + [sys.executable, "-m", "coverage", "run", str(file_path)], + capture_output=True, + encoding="utf-8", + env={ + **os.environ, + "_COMPLETION_NO_TYPES_ORDER.PY_COMPLETE": "complete_zsh", + "_TYPER_COMPLETE_ARGS": "completion_no_types_order.py --name Sebastian --name Ca", + }, + ) + assert "info name is: completion_no_types_order.py" in result.stderr + assert "args is: []" in result.stderr + assert "incomplete is: Ca" in result.stderr + assert '"Camila":"The reader of books."' in result.stdout + assert '"Carlos":"The writer of scripts."' in result.stdout + + result = subprocess.run( + [sys.executable, "-m", "coverage", "run", str(file_path)], + capture_output=True, + encoding="utf-8", + ) + assert "Hello World" in result.stdout + + +def test_autocompletion_too_many_parameters(): + app = typer.Typer() + + def name_callback(ctx, args, incomplete, val2): + pass # pragma: no cover + + @app.command() + def main(name: str = typer.Option(..., autocompletion=name_callback)): + pass # pragma: no cover + + with pytest.raises(click.ClickException) as exc_info: + runner.invoke(app, ["--name", "Camila"]) + assert exc_info.value.message == "Invalid autocompletion callback parameters: val2" + + +def test_forward_references(): + app = typer.Typer() + + @app.command() + def main(arg1, arg2: int, arg3: "int", arg4: bool = False, arg5: "bool" = False): + print(f"arg1: {type(arg1)} {arg1}") + print(f"arg2: {type(arg2)} {arg2}") + print(f"arg3: {type(arg3)} {arg3}") + print(f"arg4: {type(arg4)} {arg4}") + print(f"arg5: {type(arg5)} {arg5}") + + result = runner.invoke(app, ["Hello", "2", "invalid"]) + + assert "Invalid value for 'ARG3': 'invalid' is not a valid integer" in result.output + result = runner.invoke(app, ["Hello", "2", "3", "--arg4", "--arg5"]) + assert ( + "arg1: Hello\narg2: 2\narg3: 3\narg4: True\narg5: True\n" + in result.stdout + ) + + +def test_context_settings_inheritance_single_command(): + app = typer.Typer(context_settings={"help_option_names": ["-h", "--help"]}) + + @app.command() + def main(name: str): + pass # pragma: no cover + + result = runner.invoke(app, ["main", "-h"]) + assert "Show this message and exit." in result.stdout + + +def test_split_opt(): + prefix, opt = _split_opt("--verbose") + assert prefix == "--" + assert opt == "verbose" + + prefix, opt = _split_opt("//verbose") + assert prefix == "//" + assert opt == "verbose" + + prefix, opt = _split_opt("-verbose") + assert prefix == "-" + assert opt == "verbose" + + prefix, opt = _split_opt("verbose") + assert prefix == "" + assert opt == "verbose" diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_param_meta_empty.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_param_meta_empty.py new file mode 100644 index 0000000000000000000000000000000000000000..49f94dd3b4acc086eacbfe6484adf7d9bc7e6a65 --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_param_meta_empty.py @@ -0,0 +1,36 @@ +import typer +from typer.testing import CliRunner + +runner = CliRunner() + + +def test_default_with_class_with_custom_eq(): + app = typer.Typer() + + from typer.models import ParamMeta + + class StupidClass: + def __init__(self, a): + self.a = a + + def __eq__(self, other) -> bool: + if other is ParamMeta.empty: + return True + try: + return self.a == other.a + except Exception: + return False + + def __ne__(self, other: object) -> bool: + return not self.__eq__(other) + + @app.command() + def cmd(val=StupidClass(42)): + print(val) + + assert StupidClass(666) == ParamMeta.empty + assert StupidClass(666) != StupidClass(1) + + result = runner.invoke(app) + assert result.exit_code == 0, result.output + assert "StupidClass" in result.output diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_prog_name.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_prog_name.py new file mode 100644 index 0000000000000000000000000000000000000000..cfb5a3464f1e79f8e965dd4865ffaeae672b5e88 --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_prog_name.py @@ -0,0 +1,13 @@ +import subprocess +import sys +from pathlib import Path + + +def test_custom_prog_name(): + file_path = Path(__file__).parent / "assets/prog_name.py" + result = subprocess.run( + [sys.executable, "-m", "coverage", "run", str(file_path), "--help"], + capture_output=True, + encoding="utf-8", + ) + assert "Usage: custom-name [OPTIONS] I" in result.stdout diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_rich_import.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_rich_import.py new file mode 100644 index 0000000000000000000000000000000000000000..f1c26bfe76d579cdf77f41a6787c0046ae401bf4 --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_rich_import.py @@ -0,0 +1,21 @@ +import subprocess +import sys +from pathlib import Path + +ACCEPTED_MODULES = {"rich._extension", "rich"} + + +def test_rich_not_imported_unnecessary(): + file_path = Path(__file__).parent / "assets/print_modules.py" + result = subprocess.run( + [sys.executable, "-m", "coverage", "run", str(file_path)], + capture_output=True, + encoding="utf-8", + ) + modules = result.stdout.splitlines() + modules = [ + module + for module in modules + if module not in ACCEPTED_MODULES and module.startswith("rich") + ] + assert not modules diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_rich_markup_mode.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_rich_markup_mode.py new file mode 100644 index 0000000000000000000000000000000000000000..df5d0323f03a599e3279124381d02a88b3ac9b67 --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_rich_markup_mode.py @@ -0,0 +1,286 @@ +from typing import List + +import pytest +import typer +import typer.completion +from typer.testing import CliRunner + +runner = CliRunner() +rounded = ["ā•­", "─", "┬", "ā•®", "│", "ā”œ", "┼", "┤", "ā•°", "┓", "╯"] + + +def test_rich_markup_mode_none(): + app = typer.Typer(rich_markup_mode=None) + + @app.command() + def main(arg: str): + """Main function""" + print(f"Hello {arg}") + + assert app.rich_markup_mode is None + + result = runner.invoke(app, ["World"]) + assert "Hello World" in result.stdout + + result = runner.invoke(app, ["--help"]) + assert all(c not in result.stdout for c in rounded) + + +def test_rich_markup_mode_rich(): + app = typer.Typer(rich_markup_mode="rich") + + @app.command() + def main(arg: str): + """Main function""" + print(f"Hello {arg}") + + assert app.rich_markup_mode == "rich" + + result = runner.invoke(app, ["World"]) + assert "Hello World" in result.stdout + + result = runner.invoke(app, ["--help"]) + assert any(c in result.stdout for c in rounded) + + +@pytest.mark.parametrize( + "mode,lines", + [ + pytest.param( + "markdown", + ["First line", "", "Line 1", "", "Line 2", "", "Line 3", ""], + ), + pytest.param( + "rich", ["First line", "", "Line 1", "", "Line 2", "", "Line 3", ""] + ), + pytest.param( + None, ["First line", "", "Line 1", "", "Line 2", "", "Line 3", ""] + ), + ], +) +def test_markup_mode_newline_pr815(mode: str, lines: List[str]): + app = typer.Typer(rich_markup_mode=mode) + + @app.command() + def main(arg: str): + """First line + + Line 1 + + Line 2 + + Line 3 + """ + print(f"Hello {arg}") + + assert app.rich_markup_mode == mode + + result = runner.invoke(app, ["World"]) + assert "Hello World" in result.stdout + + result = runner.invoke(app, ["--help"]) + result_lines = [line.strip() for line in result.stdout.split("\n")] + if mode: + assert any(c in result.stdout for c in rounded) + help_start = result_lines.index("First line") + arg_start = [i for i, row in enumerate(result_lines) if "Arguments" in row][0] + assert help_start != -1 + assert result_lines[help_start:arg_start] == lines + + +@pytest.mark.parametrize( + "mode,lines", + [ + pytest.param("markdown", ["First line", "", "Line 1 Line 2 Line 3", ""]), + pytest.param("rich", ["First line", "", "Line 1", "Line 2", "Line 3", ""]), + pytest.param(None, ["First line", "", "Line 1 Line 2 Line 3", ""]), + ], +) +def test_markup_mode_newline_issue447(mode: str, lines: List[str]): + app = typer.Typer(rich_markup_mode=mode) + + @app.command() + def main(arg: str): + """First line + + Line 1 + Line 2 + Line 3 + """ + print(f"Hello {arg}") + + assert app.rich_markup_mode == mode + + result = runner.invoke(app, ["World"]) + assert "Hello World" in result.stdout + + result = runner.invoke(app, ["--help"]) + result_lines = [line.strip() for line in result.stdout.split("\n")] + if mode: + assert any(c in result.stdout for c in rounded) + help_start = result_lines.index("First line") + arg_start = [i for i, row in enumerate(result_lines) if "Arguments" in row][0] + assert help_start != -1 + assert result_lines[help_start:arg_start] == lines + + +@pytest.mark.parametrize( + "mode,lines", + [ + pytest.param( + "markdown", + [ + "This header is long", + "", + "Line 1", + "", + "Line 2 continues here", + "", + "Line 3", + "", + ], + ), + pytest.param( + "rich", + [ + "This header is long", + "", + "Line 1", + "", + "Line 2", + "continues here", + "", + "Line 3", + "", + ], + ), + pytest.param( + None, + [ + "This header is long", + "", + "Line 1", + "", + "Line 2 continues here", + "", + "Line 3", + "", + ], + ), + ], +) +def test_markup_mode_newline_mixed(mode: str, lines: List[str]): + app = typer.Typer(rich_markup_mode=mode) + + @app.command() + def main(arg: str): + """This header + is long + + Line 1 + + Line 2 + continues here + + Line 3 + """ + print(f"Hello {arg}") + + assert app.rich_markup_mode == mode + + result = runner.invoke(app, ["World"]) + assert "Hello World" in result.stdout + + result = runner.invoke(app, ["--help"]) + result_lines = [line.strip() for line in result.stdout.split("\n")] + if mode: + assert any(c in result.stdout for c in rounded) + help_start = [i for i, row in enumerate(result_lines) if "This header" in row][0] + arg_start = [i for i, row in enumerate(result_lines) if "Arguments" in row][0] + assert help_start != -1 + assert result_lines[help_start:arg_start] == lines + + +@pytest.mark.parametrize( + "mode,lines", + [ + pytest.param( + "markdown", + ["First line", "", "• 1", "• 2", "• 3", ""], + marks=pytest.mark.xfail, + ), + pytest.param("rich", ["First line", "", "- 1", "- 2", "- 3", ""]), + pytest.param(None, ["First line", "", "- 1 - 2 - 3", ""]), + ], +) +def test_markup_mode_bullets_single_newline(mode: str, lines: List[str]): + app = typer.Typer(rich_markup_mode=mode) + + @app.command() + def main(arg: str): + """First line + + - 1 + - 2 + - 3 + """ + print(f"Hello {arg}") + + assert app.rich_markup_mode == mode + + result = runner.invoke(app, ["World"]) + assert "Hello World" in result.stdout + + result = runner.invoke(app, ["--help"]) + result_lines = [line.strip() for line in result.stdout.split("\n")] + if mode: + assert any(c in result.stdout for c in rounded) + help_start = result_lines.index("First line") + arg_start = [i for i, row in enumerate(result_lines) if "Arguments" in row][0] + assert help_start != -1 + assert result_lines[help_start:arg_start] == lines + + +@pytest.mark.parametrize( + "mode,lines", + [ + pytest.param( + "markdown", + ["First line", "", "• 1", "• 2", "• 3", ""], + marks=pytest.mark.xfail, + ), + ( + "rich", + ["First line", "", "- 1", "", "- 2", "", "- 3", ""], + ), + (None, ["First line", "", "- 1", "", "- 2", "", "- 3", ""]), + ], +) +def test_markup_mode_bullets_double_newline(mode: str, lines: List[str]): + app = typer.Typer(rich_markup_mode=mode) + + @app.command() + def main(arg: str): + """First line + + - 1 + + - 2 + + - 3 + """ + print(f"Hello {arg}") + + assert app.rich_markup_mode == mode + + result = runner.invoke(app, ["World"]) + assert "Hello World" in result.stdout + + result = runner.invoke(app, ["--help"]) + result_lines = [line.strip() for line in result.stdout.split("\n")] + if mode: + assert any(c in result.stdout for c in rounded) + help_start = result_lines.index("First line") + arg_start = [i for i, row in enumerate(result_lines) if "Arguments" in row][0] + assert help_start != -1 + assert result_lines[help_start:arg_start] == lines diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_rich_utils.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_rich_utils.py new file mode 100644 index 0000000000000000000000000000000000000000..d31dbafb5c23b22aae24e000a47fd07893654406 --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_rich_utils.py @@ -0,0 +1,101 @@ +import sys + +import typer +import typer.completion +from typer.testing import CliRunner + +runner = CliRunner() + + +def test_rich_utils_click_rewrapp(): + app = typer.Typer(rich_markup_mode="markdown") + + @app.command() + def main(): + """ + \b + Some text + + Some unwrapped text + """ + print("Hello World") + + @app.command() + def secondary(): + """ + \b + Secondary text + + Some unwrapped text + """ + print("Hello Secondary World") + + result = runner.invoke(app, ["--help"]) + assert "Some text" in result.stdout + assert "Secondary text" in result.stdout + assert "\b" not in result.stdout + result = runner.invoke(app, ["main"]) + assert "Hello World" in result.stdout + result = runner.invoke(app, ["secondary"]) + assert "Hello Secondary World" in result.stdout + + +def test_rich_help_no_commands(): + """Ensure that the help still works for a Typer instance with no commands, but with a callback.""" + app = typer.Typer(help="My cool Typer app") + + @app.callback(invoke_without_command=True, no_args_is_help=True) + def main() -> None: + return None # pragma: no cover + + result = runner.invoke(app, ["--help"]) + + assert result.exit_code == 0 + assert "Show this message" in result.stdout + + +def test_rich_doesnt_print_None_default(): + app = typer.Typer(rich_markup_mode="rich") + + @app.command() + def main( + name: str, + option_1: str = typer.Option( + "option_1_default", + ), + option_2: str = typer.Option( + ..., + ), + ): + print(f"Hello {name}") + print(f"First: {option_1}") + print(f"Second: {option_2}") + + result = runner.invoke(app, ["--help"]) + assert "Usage" in result.stdout + assert "name" in result.stdout + assert "option-1" in result.stdout + assert "option-2" in result.stdout + assert result.stdout.count("[default: None]") == 0 + result = runner.invoke(app, ["Rick", "--option-2=Morty"]) + assert "Hello Rick" in result.stdout + assert "First: option_1_default" in result.stdout + assert "Second: Morty" in result.stdout + + +def test_rich_markup_import_regression(): + # Remove rich.markup if it was imported by other tests + if "rich" in sys.modules: + rich_module = sys.modules["rich"] + if hasattr(rich_module, "markup"): + delattr(rich_module, "markup") + + app = typer.Typer(rich_markup_mode=None) + + @app.command() + def main(bar: str): + pass # pragma: no cover + + result = runner.invoke(app, ["--help"]) + assert "Usage" in result.stdout + assert "BAR" in result.stdout diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_suggest_commands.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_suggest_commands.py new file mode 100644 index 0000000000000000000000000000000000000000..71f2398bb971aec76dea4efe2710959b5ac4b619 --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_suggest_commands.py @@ -0,0 +1,98 @@ +import typer +from typer.testing import CliRunner + +runner = CliRunner() + + +def test_typo_suggestion_enabled(): + """Test that typo suggestions work when enabled""" + app = typer.Typer() + + @app.command() + def create(): # pragma: no cover + typer.echo("Creating...") + + @app.command() + def delete(): # pragma: no cover + typer.echo("Deleting...") + + result = runner.invoke(app, ["crate"]) + assert result.exit_code != 0 + assert "No such command" in result.output + assert "Did you mean 'create'?" in result.output + + +def test_typo_suggestion_multiple_matches(): + """Test that multiple suggestions are shown when there are multiple close matches""" + app = typer.Typer() + + @app.command() + def create(): # pragma: no cover + typer.echo("Creating...") + + @app.command() + def createnew(): # pragma: no cover + typer.echo("Creating new...") + + result = runner.invoke(app, ["crate"]) + assert result.exit_code != 0 + assert "No such command" in result.output + assert "Did you mean" in result.output + assert "create" in result.output and "createnew" in result.output + + +def test_typo_suggestion_no_matches(): + """Test that no suggestions are shown when there are no close matches""" + app = typer.Typer() + + @app.command() + def create(): # pragma: no cover + typer.echo("Creating...") + + @app.command() + def delete(): # pragma: no cover + typer.echo("Deleting...") + + result = runner.invoke(app, ["xyz"]) + assert result.exit_code != 0 + assert "No such command" in result.output + assert "Did you mean" not in result.output + + +def test_typo_suggestion_exact_match_works(): + """Test that exact matches still work normally""" + app = typer.Typer() + + @app.command() + def create(): + typer.echo("Creating...") + + @app.command() + def delete(): + typer.echo("Deleting...") + + result = runner.invoke(app, ["create"]) + assert result.exit_code == 0 + assert "Creating..." in result.output + + result = runner.invoke(app, ["delete"]) + assert result.exit_code == 0 + assert "Deleting..." in result.output + + +def test_typo_suggestion_disabled(): + """Test that typo suggestions can be explicitly disabled""" + app = typer.Typer(suggest_commands=False) + + @app.command() + def create(): # pragma: no cover + typer.echo("Creating...") + + @app.command() + def delete(): # pragma: no cover + typer.echo("Deleting...") + + result = runner.invoke(app, ["crate"]) + assert result.exit_code != 0 + assert "No such command" in result.output + assert "Did you mean" not in result.output diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tracebacks.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tracebacks.py new file mode 100644 index 0000000000000000000000000000000000000000..8c8ab0295de7d541d3592b53bd759f17a08cc922 --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tracebacks.py @@ -0,0 +1,52 @@ +import os +import subprocess +import sys +from pathlib import Path + + +def test_traceback_no_rich(): + file_path = Path(__file__).parent / "assets/type_error_no_rich.py" + result = subprocess.run( + [sys.executable, "-m", "coverage", "run", str(file_path)], + capture_output=True, + encoding="utf-8", + env={**os.environ, "_TYPER_STANDARD_TRACEBACK": ""}, + ) + assert "return get_command(self)(*args, **kwargs)" not in result.stderr + + assert "typer.run(main)" in result.stderr + assert "print(name + 3)" in result.stderr + assert 'TypeError: can only concatenate str (not "int") to str' in result.stderr + + +def test_traceback_no_rich_short_disable(): + file_path = Path(__file__).parent / "assets/type_error_no_rich_short_disable.py" + result = subprocess.run( + [sys.executable, "-m", "coverage", "run", str(file_path)], + capture_output=True, + encoding="utf-8", + env={**os.environ, "_TYPER_STANDARD_TRACEBACK": ""}, + ) + assert "return get_command(self)(*args, **kwargs)" not in result.stderr + + assert "app()" in result.stderr + assert "print(name + 3)" in result.stderr + assert 'TypeError: can only concatenate str (not "int") to str' in result.stderr + + +def test_unmodified_traceback(): + file_path = Path(__file__).parent / "assets/type_error_normal_traceback.py" + result = subprocess.run( + [sys.executable, "-m", "coverage", "run", str(file_path)], + capture_output=True, + encoding="utf-8", + env={**os.environ, "_TYPER_STANDARD_TRACEBACK": ""}, + ) + assert "morty" in result.stdout, "the call to the first app should work normally" + assert "return callback(**use_params)" in result.stderr, ( + "calling outside of Typer should show the normal traceback, " + "even after the hook is installed" + ) + assert "typer.main.get_command(broken_app)()" in result.stderr + assert "print(name + 3)" in result.stderr + assert 'TypeError: can only concatenate str (not "int") to str' in result.stderr diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/__init__.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_arguments/__init__.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_arguments/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_arguments/test_default/__init__.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_arguments/test_default/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_arguments/test_default/test_tutorial001.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_arguments/test_default/test_tutorial001.py new file mode 100644 index 0000000000000000000000000000000000000000..cb1836bfd386b238ffc2c35202cac7c5ddd577e6 --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_arguments/test_default/test_tutorial001.py @@ -0,0 +1,41 @@ +import subprocess +import sys + +import typer +from typer.testing import CliRunner + +from docs_src.arguments.default import tutorial001 as mod + +runner = CliRunner() + +app = typer.Typer() +app.command()(mod.main) + + +def test_help(): + result = runner.invoke(app, ["--help"]) + assert result.exit_code == 0 + assert "[OPTIONS] [NAME]" in result.output + assert "Arguments" in result.output + assert "[default: Wade Wilson]" in result.output + + +def test_call_no_arg(): + result = runner.invoke(app) + assert result.exit_code == 0 + assert "Hello Wade Wilson" in result.output + + +def test_call_arg(): + result = runner.invoke(app, ["Camila"]) + assert result.exit_code == 0 + assert "Hello Camila" in result.output + + +def test_script(): + result = subprocess.run( + [sys.executable, "-m", "coverage", "run", mod.__file__, "--help"], + capture_output=True, + encoding="utf-8", + ) + assert "Usage" in result.stdout diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_arguments/test_default/test_tutorial001_an.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_arguments/test_default/test_tutorial001_an.py new file mode 100644 index 0000000000000000000000000000000000000000..1db27f81a5e61c92244584bcc77491d6f1488231 --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_arguments/test_default/test_tutorial001_an.py @@ -0,0 +1,41 @@ +import subprocess +import sys + +import typer +from typer.testing import CliRunner + +from docs_src.arguments.default import tutorial001_an as mod + +runner = CliRunner() + +app = typer.Typer() +app.command()(mod.main) + + +def test_help(): + result = runner.invoke(app, ["--help"]) + assert result.exit_code == 0 + assert "[OPTIONS] [NAME]" in result.output + assert "Arguments" in result.output + assert "[default: Wade Wilson]" in result.output + + +def test_call_no_arg(): + result = runner.invoke(app) + assert result.exit_code == 0, result.output + assert "Hello Wade Wilson" in result.output + + +def test_call_arg(): + result = runner.invoke(app, ["Camila"]) + assert result.exit_code == 0 + assert "Hello Camila" in result.output + + +def test_script(): + result = subprocess.run( + [sys.executable, "-m", "coverage", "run", mod.__file__, "--help"], + capture_output=True, + encoding="utf-8", + ) + assert "Usage" in result.stdout diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_arguments/test_default/test_tutorial002.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_arguments/test_default/test_tutorial002.py new file mode 100644 index 0000000000000000000000000000000000000000..9750a6dc7f79270d5e88ce4f7064aa9706ffdb06 --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_arguments/test_default/test_tutorial002.py @@ -0,0 +1,43 @@ +import subprocess +import sys + +import typer +from typer.testing import CliRunner + +from docs_src.arguments.default import tutorial002 as mod + +runner = CliRunner() + +app = typer.Typer() +app.command()(mod.main) + + +def test_help(): + result = runner.invoke(app, ["--help"]) + assert result.exit_code == 0 + assert "[OPTIONS] [NAME]" in result.output + assert "Arguments" in result.output + assert "[default: (dynamic)]" in result.output + + +def test_call_no_arg(): + greetings = ["Hello Deadpool", "Hello Rick", "Hello Morty", "Hello Hiro"] + for _i in range(3): + result = runner.invoke(app) + assert result.exit_code == 0 + assert any(greet in result.output for greet in greetings) + + +def test_call_arg(): + result = runner.invoke(app, ["Camila"]) + assert result.exit_code == 0 + assert "Hello Camila" in result.output + + +def test_script(): + result = subprocess.run( + [sys.executable, "-m", "coverage", "run", mod.__file__, "--help"], + capture_output=True, + encoding="utf-8", + ) + assert "Usage" in result.stdout diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_arguments/test_default/test_tutorial002_an.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_arguments/test_default/test_tutorial002_an.py new file mode 100644 index 0000000000000000000000000000000000000000..cf818bde8f97a359c03a5a6faba43e25adb65fbd --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_arguments/test_default/test_tutorial002_an.py @@ -0,0 +1,43 @@ +import subprocess +import sys + +import typer +from typer.testing import CliRunner + +from docs_src.arguments.default import tutorial002_an as mod + +runner = CliRunner() + +app = typer.Typer() +app.command()(mod.main) + + +def test_help(): + result = runner.invoke(app, ["--help"]) + assert result.exit_code == 0 + assert "[OPTIONS] [NAME]" in result.output + assert "Arguments" in result.output + assert "[default: (dynamic)]" in result.output + + +def test_call_no_arg(): + greetings = ["Hello Deadpool", "Hello Rick", "Hello Morty", "Hello Hiro"] + for _i in range(3): + result = runner.invoke(app) + assert result.exit_code == 0 + assert any(greet in result.output for greet in greetings) + + +def test_call_arg(): + result = runner.invoke(app, ["Camila"]) + assert result.exit_code == 0 + assert "Hello Camila" in result.output + + +def test_script(): + result = subprocess.run( + [sys.executable, "-m", "coverage", "run", mod.__file__, "--help"], + capture_output=True, + encoding="utf-8", + ) + assert "Usage" in result.stdout diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_arguments/test_envvar/__init__.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_arguments/test_envvar/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_arguments/test_envvar/test_tutorial001.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_arguments/test_envvar/test_tutorial001.py new file mode 100644 index 0000000000000000000000000000000000000000..a07c008e37dec14bec6e6ea95fd53497d4747751 --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_arguments/test_envvar/test_tutorial001.py @@ -0,0 +1,60 @@ +import subprocess +import sys + +import pytest +import typer +import typer.core +from typer.testing import CliRunner + +from docs_src.arguments.envvar import tutorial001 as mod + +runner = CliRunner() + +app = typer.Typer() +app.command()(mod.main) + + +def test_help(): + result = runner.invoke(app, ["--help"]) + assert result.exit_code == 0 + assert "[OPTIONS] [NAME]" in result.output + assert "Arguments" in result.output + assert "env var: AWESOME_NAME" in result.output + assert "default: World" in result.output + + +def test_help_no_rich(monkeypatch: pytest.MonkeyPatch): + monkeypatch.setattr(typer.core, "HAS_RICH", False) + result = runner.invoke(app, ["--help"]) + assert result.exit_code == 0 + assert "[OPTIONS] [NAME]" in result.output + assert "Arguments" in result.output + assert "env var: AWESOME_NAME" in result.output + assert "default: World" in result.output + + +def test_call_arg(): + result = runner.invoke(app, ["Wednesday"]) + assert result.exit_code == 0 + assert "Hello Mr. Wednesday" in result.output + + +def test_call_env_var(): + result = runner.invoke(app, env={"AWESOME_NAME": "Wednesday"}) + assert result.exit_code == 0 + assert "Hello Mr. Wednesday" in result.output + + +def test_call_env_var_arg(): + result = runner.invoke(app, ["Czernobog"], env={"AWESOME_NAME": "Wednesday"}) + assert result.exit_code == 0 + assert "Hello Mr. Czernobog" in result.output + + +def test_script(): + result = subprocess.run( + [sys.executable, "-m", "coverage", "run", mod.__file__, "--help"], + capture_output=True, + encoding="utf-8", + ) + assert "Usage" in result.stdout diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_arguments/test_envvar/test_tutorial001_an.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_arguments/test_envvar/test_tutorial001_an.py new file mode 100644 index 0000000000000000000000000000000000000000..cf568271446df0b601d80f962841f1d83f72cfd0 --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_arguments/test_envvar/test_tutorial001_an.py @@ -0,0 +1,61 @@ +import subprocess +import sys + +import pytest +import typer +import typer.core +from typer.testing import CliRunner + +from docs_src.arguments.envvar import tutorial001_an as mod + +runner = CliRunner() + +app = typer.Typer() +app.command()(mod.main) + + +def test_help(): + result = runner.invoke(app, ["--help"]) + assert result.exit_code == 0 + assert "[OPTIONS] [NAME]" in result.output + assert "Arguments" in result.output + assert "env var: AWESOME_NAME" in result.output + assert "default: World" in result.output + + +def test_help_no_rich(monkeypatch: pytest.MonkeyPatch): + monkeypatch.setattr(typer.core, "HAS_RICH", False) + + result = runner.invoke(app, ["--help"]) + assert result.exit_code == 0 + assert "[OPTIONS] [NAME]" in result.output + assert "Arguments" in result.output + assert "env var: AWESOME_NAME" in result.output + assert "default: World" in result.output + + +def test_call_arg(): + result = runner.invoke(app, ["Wednesday"]) + assert result.exit_code == 0 + assert "Hello Mr. Wednesday" in result.output + + +def test_call_env_var(): + result = runner.invoke(app, env={"AWESOME_NAME": "Wednesday"}) + assert result.exit_code == 0 + assert "Hello Mr. Wednesday" in result.output + + +def test_call_env_var_arg(): + result = runner.invoke(app, ["Czernobog"], env={"AWESOME_NAME": "Wednesday"}) + assert result.exit_code == 0 + assert "Hello Mr. Czernobog" in result.output + + +def test_script(): + result = subprocess.run( + [sys.executable, "-m", "coverage", "run", mod.__file__, "--help"], + capture_output=True, + encoding="utf-8", + ) + assert "Usage" in result.stdout diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_arguments/test_envvar/test_tutorial002.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_arguments/test_envvar/test_tutorial002.py new file mode 100644 index 0000000000000000000000000000000000000000..b34a601a0b929df2d011a7697a868b1df939e2ad --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_arguments/test_envvar/test_tutorial002.py @@ -0,0 +1,48 @@ +import subprocess +import sys + +import typer +from typer.testing import CliRunner + +from docs_src.arguments.envvar import tutorial002 as mod + +runner = CliRunner() + +app = typer.Typer() +app.command()(mod.main) + + +def test_help(): + result = runner.invoke(app, ["--help"]) + assert result.exit_code == 0 + assert "[OPTIONS] [NAME]" in result.output + assert "Arguments" in result.output + assert "env var: AWESOME_NAME, GOD_NAME" in result.output + assert "default: World" in result.output + + +def test_call_arg(): + result = runner.invoke(app, ["Wednesday"]) + assert result.exit_code == 0 + assert "Hello Mr. Wednesday" in result.output + + +def test_call_env_var1(): + result = runner.invoke(app, env={"AWESOME_NAME": "Wednesday"}) + assert result.exit_code == 0 + assert "Hello Mr. Wednesday" in result.output + + +def test_call_env_var2(): + result = runner.invoke(app, env={"GOD_NAME": "Anubis"}) + assert result.exit_code == 0 + assert "Hello Mr. Anubis" in result.output + + +def test_script(): + result = subprocess.run( + [sys.executable, "-m", "coverage", "run", mod.__file__, "--help"], + capture_output=True, + encoding="utf-8", + ) + assert "Usage" in result.stdout diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_arguments/test_envvar/test_tutorial002_an.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_arguments/test_envvar/test_tutorial002_an.py new file mode 100644 index 0000000000000000000000000000000000000000..e8768ff2a3d530383a136b5a52aa69290c716c83 --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_arguments/test_envvar/test_tutorial002_an.py @@ -0,0 +1,48 @@ +import subprocess +import sys + +import typer +from typer.testing import CliRunner + +from docs_src.arguments.envvar import tutorial002_an as mod + +runner = CliRunner() + +app = typer.Typer() +app.command()(mod.main) + + +def test_help(): + result = runner.invoke(app, ["--help"]) + assert result.exit_code == 0 + assert "[OPTIONS] [NAME]" in result.output + assert "Arguments" in result.output + assert "env var: AWESOME_NAME, GOD_NAME" in result.output + assert "default: World" in result.output + + +def test_call_arg(): + result = runner.invoke(app, ["Wednesday"]) + assert result.exit_code == 0 + assert "Hello Mr. Wednesday" in result.output + + +def test_call_env_var1(): + result = runner.invoke(app, env={"AWESOME_NAME": "Wednesday"}) + assert result.exit_code == 0 + assert "Hello Mr. Wednesday" in result.output + + +def test_call_env_var2(): + result = runner.invoke(app, env={"GOD_NAME": "Anubis"}) + assert result.exit_code == 0 + assert "Hello Mr. Anubis" in result.output + + +def test_script(): + result = subprocess.run( + [sys.executable, "-m", "coverage", "run", mod.__file__, "--help"], + capture_output=True, + encoding="utf-8", + ) + assert "Usage" in result.stdout diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_arguments/test_envvar/test_tutorial003.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_arguments/test_envvar/test_tutorial003.py new file mode 100644 index 0000000000000000000000000000000000000000..74928cb3a5a8e69927df44e9e9412c6ec1c0a426 --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_arguments/test_envvar/test_tutorial003.py @@ -0,0 +1,48 @@ +import subprocess +import sys + +import typer +from typer.testing import CliRunner + +from docs_src.arguments.envvar import tutorial003 as mod + +runner = CliRunner() + +app = typer.Typer() +app.command()(mod.main) + + +def test_help(): + result = runner.invoke(app, ["--help"]) + assert result.exit_code == 0 + assert "[OPTIONS] [NAME]" in result.output + assert "Arguments" in result.output + assert "env var: AWESOME_NAME" not in result.output + assert "default: World" in result.output + + +def test_call_arg(): + result = runner.invoke(app, ["Wednesday"]) + assert result.exit_code == 0 + assert "Hello Mr. Wednesday" in result.output + + +def test_call_env_var(): + result = runner.invoke(app, env={"AWESOME_NAME": "Wednesday"}) + assert result.exit_code == 0 + assert "Hello Mr. Wednesday" in result.output + + +def test_call_env_var_arg(): + result = runner.invoke(app, ["Czernobog"], env={"AWESOME_NAME": "Wednesday"}) + assert result.exit_code == 0 + assert "Hello Mr. Czernobog" in result.output + + +def test_script(): + result = subprocess.run( + [sys.executable, "-m", "coverage", "run", mod.__file__, "--help"], + capture_output=True, + encoding="utf-8", + ) + assert "Usage" in result.stdout diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_arguments/test_envvar/test_tutorial003_an.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_arguments/test_envvar/test_tutorial003_an.py new file mode 100644 index 0000000000000000000000000000000000000000..01cc303c20178d99f85e7a141caf7fece4953e9a --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_arguments/test_envvar/test_tutorial003_an.py @@ -0,0 +1,48 @@ +import subprocess +import sys + +import typer +from typer.testing import CliRunner + +from docs_src.arguments.envvar import tutorial003_an as mod + +runner = CliRunner() + +app = typer.Typer() +app.command()(mod.main) + + +def test_help(): + result = runner.invoke(app, ["--help"]) + assert result.exit_code == 0 + assert "[OPTIONS] [NAME]" in result.output + assert "Arguments" in result.output + assert "env var: AWESOME_NAME" not in result.output + assert "default: World" in result.output + + +def test_call_arg(): + result = runner.invoke(app, ["Wednesday"]) + assert result.exit_code == 0 + assert "Hello Mr. Wednesday" in result.output + + +def test_call_env_var(): + result = runner.invoke(app, env={"AWESOME_NAME": "Wednesday"}) + assert result.exit_code == 0 + assert "Hello Mr. Wednesday" in result.output + + +def test_call_env_var_arg(): + result = runner.invoke(app, ["Czernobog"], env={"AWESOME_NAME": "Wednesday"}) + assert result.exit_code == 0 + assert "Hello Mr. Czernobog" in result.output + + +def test_script(): + result = subprocess.run( + [sys.executable, "-m", "coverage", "run", mod.__file__, "--help"], + capture_output=True, + encoding="utf-8", + ) + assert "Usage" in result.stdout diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_arguments/test_help/__init__.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_arguments/test_help/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_arguments/test_help/test_tutorial001.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_arguments/test_help/test_tutorial001.py new file mode 100644 index 0000000000000000000000000000000000000000..f0c408de8c4f32e36b745a9cf703b9f865f2dbf1 --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_arguments/test_help/test_tutorial001.py @@ -0,0 +1,50 @@ +import subprocess +import sys + +import pytest +import typer +import typer.core +from typer.testing import CliRunner + +from docs_src.arguments.help import tutorial001 as mod + +runner = CliRunner() + +app = typer.Typer() +app.command()(mod.main) + + +def test_help(): + result = runner.invoke(app, ["--help"]) + assert result.exit_code == 0 + assert "[OPTIONS] NAME" in result.output + assert "Arguments" in result.output + assert "NAME" in result.output + assert "The name of the user to greet" in result.output + assert "[required]" in result.output + + +def test_help_no_rich(monkeypatch: pytest.MonkeyPatch): + monkeypatch.setattr(typer.core, "HAS_RICH", False) + result = runner.invoke(app, ["--help"]) + assert result.exit_code == 0 + assert "[OPTIONS] NAME" in result.output + assert "Arguments" in result.output + assert "NAME" in result.output + assert "The name of the user to greet" in result.output + assert "[required]" in result.output + + +def test_call_arg(): + result = runner.invoke(app, ["Camila"]) + assert result.exit_code == 0 + assert "Hello Camila" in result.output + + +def test_script(): + result = subprocess.run( + [sys.executable, "-m", "coverage", "run", mod.__file__, "--help"], + capture_output=True, + encoding="utf-8", + ) + assert "Usage" in result.stdout diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_arguments/test_help/test_tutorial001_an.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_arguments/test_help/test_tutorial001_an.py new file mode 100644 index 0000000000000000000000000000000000000000..224fbc4b29414289c4599de8cc07991ea008db77 --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_arguments/test_help/test_tutorial001_an.py @@ -0,0 +1,50 @@ +import subprocess +import sys + +import pytest +import typer +import typer.core +from typer.testing import CliRunner + +from docs_src.arguments.help import tutorial001_an as mod + +runner = CliRunner() + +app = typer.Typer() +app.command()(mod.main) + + +def test_help(): + result = runner.invoke(app, ["--help"]) + assert result.exit_code == 0 + assert "[OPTIONS] NAME" in result.output + assert "Arguments" in result.output + assert "NAME" in result.output + assert "The name of the user to greet" in result.output + assert "[required]" in result.output + + +def test_help_no_rich(monkeypatch: pytest.MonkeyPatch): + monkeypatch.setattr(typer.core, "HAS_RICH", False) + result = runner.invoke(app, ["--help"]) + assert result.exit_code == 0 + assert "[OPTIONS] NAME" in result.output + assert "Arguments" in result.output + assert "NAME" in result.output + assert "The name of the user to greet" in result.output + assert "[required]" in result.output + + +def test_call_arg(): + result = runner.invoke(app, ["Camila"]) + assert result.exit_code == 0 + assert "Hello Camila" in result.output + + +def test_script(): + result = subprocess.run( + [sys.executable, "-m", "coverage", "run", mod.__file__, "--help"], + capture_output=True, + encoding="utf-8", + ) + assert "Usage" in result.stdout diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_arguments/test_help/test_tutorial002.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_arguments/test_help/test_tutorial002.py new file mode 100644 index 0000000000000000000000000000000000000000..78c8cd2d115f3b58eed885d252a9b3ae74a2ffbf --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_arguments/test_help/test_tutorial002.py @@ -0,0 +1,38 @@ +import subprocess +import sys + +import typer +from typer.testing import CliRunner + +from docs_src.arguments.help import tutorial002 as mod + +runner = CliRunner() + +app = typer.Typer() +app.command()(mod.main) + + +def test_help(): + result = runner.invoke(app, ["--help"]) + assert result.exit_code == 0 + assert "[OPTIONS] NAME" in result.output + assert "Say hi to NAME very gently, like Dirk." in result.output + assert "Arguments" in result.output + assert "NAME" in result.output + assert "The name of the user to greet" in result.output + assert "[required]" in result.output + + +def test_call_arg(): + result = runner.invoke(app, ["Camila"]) + assert result.exit_code == 0 + assert "Hello Camila" in result.output + + +def test_script(): + result = subprocess.run( + [sys.executable, "-m", "coverage", "run", mod.__file__, "--help"], + capture_output=True, + encoding="utf-8", + ) + assert "Usage" in result.stdout diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_arguments/test_help/test_tutorial002_an.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_arguments/test_help/test_tutorial002_an.py new file mode 100644 index 0000000000000000000000000000000000000000..f1ad669abce0d8d9e4fed591316dab7d471304bc --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_arguments/test_help/test_tutorial002_an.py @@ -0,0 +1,38 @@ +import subprocess +import sys + +import typer +from typer.testing import CliRunner + +from docs_src.arguments.help import tutorial002_an as mod + +runner = CliRunner() + +app = typer.Typer() +app.command()(mod.main) + + +def test_help(): + result = runner.invoke(app, ["--help"]) + assert result.exit_code == 0 + assert "[OPTIONS] NAME" in result.output + assert "Say hi to NAME very gently, like Dirk." in result.output + assert "Arguments" in result.output + assert "NAME" in result.output + assert "The name of the user to greet" in result.output + assert "[required]" in result.output + + +def test_call_arg(): + result = runner.invoke(app, ["Camila"]) + assert result.exit_code == 0 + assert "Hello Camila" in result.output + + +def test_script(): + result = subprocess.run( + [sys.executable, "-m", "coverage", "run", mod.__file__, "--help"], + capture_output=True, + encoding="utf-8", + ) + assert "Usage" in result.stdout diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_arguments/test_help/test_tutorial003.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_arguments/test_help/test_tutorial003.py new file mode 100644 index 0000000000000000000000000000000000000000..df486cf199abdee88cc2afafb280370bae3c8322 --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_arguments/test_help/test_tutorial003.py @@ -0,0 +1,38 @@ +import subprocess +import sys + +import typer +from typer.testing import CliRunner + +from docs_src.arguments.help import tutorial003 as mod + +runner = CliRunner() + +app = typer.Typer() +app.command()(mod.main) + + +def test_help(): + result = runner.invoke(app, ["--help"]) + assert result.exit_code == 0 + assert "[OPTIONS] [NAME]" in result.output + assert "Say hi to NAME very gently, like Dirk." in result.output + assert "Arguments" in result.output + assert "NAME" in result.output + assert "Who to greet" in result.output + assert "[default: World]" in result.output + + +def test_call_arg(): + result = runner.invoke(app, ["Camila"]) + assert result.exit_code == 0 + assert "Hello Camila" in result.output + + +def test_script(): + result = subprocess.run( + [sys.executable, "-m", "coverage", "run", mod.__file__, "--help"], + capture_output=True, + encoding="utf-8", + ) + assert "Usage" in result.stdout diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_arguments/test_help/test_tutorial003_an.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_arguments/test_help/test_tutorial003_an.py new file mode 100644 index 0000000000000000000000000000000000000000..e0d09f881f0252c51aa84445adea83f4dd4718ab --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_arguments/test_help/test_tutorial003_an.py @@ -0,0 +1,38 @@ +import subprocess +import sys + +import typer +from typer.testing import CliRunner + +from docs_src.arguments.help import tutorial003_an as mod + +runner = CliRunner() + +app = typer.Typer() +app.command()(mod.main) + + +def test_help(): + result = runner.invoke(app, ["--help"]) + assert result.exit_code == 0 + assert "[OPTIONS] [NAME]" in result.output + assert "Say hi to NAME very gently, like Dirk." in result.output + assert "Arguments" in result.output + assert "NAME" in result.output + assert "Who to greet" in result.output + assert "[default: World]" in result.output + + +def test_call_arg(): + result = runner.invoke(app, ["Camila"]) + assert result.exit_code == 0 + assert "Hello Camila" in result.output + + +def test_script(): + result = subprocess.run( + [sys.executable, "-m", "coverage", "run", mod.__file__, "--help"], + capture_output=True, + encoding="utf-8", + ) + assert "Usage" in result.stdout diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_arguments/test_help/test_tutorial004.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_arguments/test_help/test_tutorial004.py new file mode 100644 index 0000000000000000000000000000000000000000..805753e08eeef489df810551aa71a167a50a7525 --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_arguments/test_help/test_tutorial004.py @@ -0,0 +1,38 @@ +import subprocess +import sys + +import typer +from typer.testing import CliRunner + +from docs_src.arguments.help import tutorial004 as mod + +runner = CliRunner() + +app = typer.Typer() +app.command()(mod.main) + + +def test_help(): + result = runner.invoke(app, ["--help"]) + assert result.exit_code == 0 + assert "[OPTIONS] [NAME]" in result.output + assert "Say hi to NAME very gently, like Dirk." in result.output + assert "Arguments" in result.output + assert "NAME" in result.output + assert "Who to greet" in result.output + assert "[default: World]" not in result.output + + +def test_call_arg(): + result = runner.invoke(app, ["Camila"]) + assert result.exit_code == 0 + assert "Hello Camila" in result.output + + +def test_script(): + result = subprocess.run( + [sys.executable, "-m", "coverage", "run", mod.__file__, "--help"], + capture_output=True, + encoding="utf-8", + ) + assert "Usage" in result.stdout diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_arguments/test_help/test_tutorial004_an.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_arguments/test_help/test_tutorial004_an.py new file mode 100644 index 0000000000000000000000000000000000000000..c2613a4285d342801b87fdd315ef59cb5dacfbb0 --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_arguments/test_help/test_tutorial004_an.py @@ -0,0 +1,38 @@ +import subprocess +import sys + +import typer +from typer.testing import CliRunner + +from docs_src.arguments.help import tutorial004_an as mod + +runner = CliRunner() + +app = typer.Typer() +app.command()(mod.main) + + +def test_help(): + result = runner.invoke(app, ["--help"]) + assert result.exit_code == 0 + assert "[OPTIONS] [NAME]" in result.output + assert "Say hi to NAME very gently, like Dirk." in result.output + assert "Arguments" in result.output + assert "NAME" in result.output + assert "Who to greet" in result.output + assert "[default: World]" not in result.output + + +def test_call_arg(): + result = runner.invoke(app, ["Camila"]) + assert result.exit_code == 0 + assert "Hello Camila" in result.output + + +def test_script(): + result = subprocess.run( + [sys.executable, "-m", "coverage", "run", mod.__file__, "--help"], + capture_output=True, + encoding="utf-8", + ) + assert "Usage" in result.stdout diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_arguments/test_help/test_tutorial005.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_arguments/test_help/test_tutorial005.py new file mode 100644 index 0000000000000000000000000000000000000000..64c99a5271ec449f48ab984c4a3a9f92d79be075 --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_arguments/test_help/test_tutorial005.py @@ -0,0 +1,36 @@ +import subprocess +import sys + +import typer +from typer.testing import CliRunner + +from docs_src.arguments.help import tutorial005 as mod + +runner = CliRunner() + +app = typer.Typer() +app.command()(mod.main) + + +def test_help(): + result = runner.invoke(app, ["--help"]) + assert result.exit_code == 0 + assert "[OPTIONS] [NAME]" in result.output + assert "Arguments" in result.output + assert "Who to greet" in result.output + assert "[default: (Deadpoolio the amazing's name)]" in result.output + + +def test_call_arg(): + result = runner.invoke(app, ["Camila"]) + assert result.exit_code == 0 + assert "Hello Camila" in result.output + + +def test_script(): + result = subprocess.run( + [sys.executable, "-m", "coverage", "run", mod.__file__, "--help"], + capture_output=True, + encoding="utf-8", + ) + assert "Usage" in result.stdout diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_arguments/test_help/test_tutorial005_an.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_arguments/test_help/test_tutorial005_an.py new file mode 100644 index 0000000000000000000000000000000000000000..28d8ee57b98a260c065fa8b88b12d799cc421f78 --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_arguments/test_help/test_tutorial005_an.py @@ -0,0 +1,36 @@ +import subprocess +import sys + +import typer +from typer.testing import CliRunner + +from docs_src.arguments.help import tutorial005_an as mod + +runner = CliRunner() + +app = typer.Typer() +app.command()(mod.main) + + +def test_help(): + result = runner.invoke(app, ["--help"]) + assert result.exit_code == 0 + assert "[OPTIONS] [NAME]" in result.output + assert "Arguments" in result.output + assert "Who to greet" in result.output + assert "[default: (Deadpoolio the amazing's name)]" in result.output + + +def test_call_arg(): + result = runner.invoke(app, ["Camila"]) + assert result.exit_code == 0 + assert "Hello Camila" in result.output + + +def test_script(): + result = subprocess.run( + [sys.executable, "-m", "coverage", "run", mod.__file__, "--help"], + capture_output=True, + encoding="utf-8", + ) + assert "Usage" in result.stdout diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_arguments/test_help/test_tutorial006.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_arguments/test_help/test_tutorial006.py new file mode 100644 index 0000000000000000000000000000000000000000..4c8abb8a86a463d75b799b0bfe8141104c439485 --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_arguments/test_help/test_tutorial006.py @@ -0,0 +1,36 @@ +import subprocess +import sys + +import typer +from typer.testing import CliRunner + +from docs_src.arguments.help import tutorial006 as mod + +runner = CliRunner() + +app = typer.Typer() +app.command()(mod.main) + + +def test_help(): + result = runner.invoke(app, ["--help"]) + assert result.exit_code == 0 + assert "[OPTIONS] ✨username✨" in result.output + assert "Arguments" in result.output + assert "✨username✨" in result.output + assert "[default: World]" in result.output + + +def test_call_arg(): + result = runner.invoke(app, ["Camila"]) + assert result.exit_code == 0 + assert "Hello Camila" in result.output + + +def test_script(): + result = subprocess.run( + [sys.executable, "-m", "coverage", "run", mod.__file__, "--help"], + capture_output=True, + encoding="utf-8", + ) + assert "Usage" in result.stdout diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_arguments/test_help/test_tutorial006_an.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_arguments/test_help/test_tutorial006_an.py new file mode 100644 index 0000000000000000000000000000000000000000..e60ec5166606ee230a975050dc14a932b0a23062 --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_arguments/test_help/test_tutorial006_an.py @@ -0,0 +1,36 @@ +import subprocess +import sys + +import typer +from typer.testing import CliRunner + +from docs_src.arguments.help import tutorial006_an as mod + +runner = CliRunner() + +app = typer.Typer() +app.command()(mod.main) + + +def test_help(): + result = runner.invoke(app, ["--help"]) + assert result.exit_code == 0 + assert "[OPTIONS] ✨username✨" in result.output + assert "Arguments" in result.output + assert "✨username✨" in result.output + assert "[default: World]" in result.output + + +def test_call_arg(): + result = runner.invoke(app, ["Camila"]) + assert result.exit_code == 0 + assert "Hello Camila" in result.output + + +def test_script(): + result = subprocess.run( + [sys.executable, "-m", "coverage", "run", mod.__file__, "--help"], + capture_output=True, + encoding="utf-8", + ) + assert "Usage" in result.stdout diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_arguments/test_help/test_tutorial007.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_arguments/test_help/test_tutorial007.py new file mode 100644 index 0000000000000000000000000000000000000000..56b38254e430af481ab6249beac77ad43fcb6ca0 --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_arguments/test_help/test_tutorial007.py @@ -0,0 +1,36 @@ +import subprocess +import sys + +import typer +import typer.core +from typer.testing import CliRunner + +from docs_src.arguments.help import tutorial007 as mod + +runner = CliRunner() + +app = typer.Typer() +app.command()(mod.main) + + +def test_help(): + result = runner.invoke(app, ["--help"]) + assert result.exit_code == 0 + assert "Say hi to NAME very gently, like Dirk." in result.output + assert "Arguments" in result.output + assert "Secondary Arguments" in result.output + + +def test_call_arg(): + result = runner.invoke(app, ["Camila"]) + assert result.exit_code == 0 + assert "Hello Camila" in result.output + + +def test_script(): + result = subprocess.run( + [sys.executable, "-m", "coverage", "run", mod.__file__, "--help"], + capture_output=True, + encoding="utf-8", + ) + assert "Usage" in result.stdout diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_arguments/test_help/test_tutorial007_an.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_arguments/test_help/test_tutorial007_an.py new file mode 100644 index 0000000000000000000000000000000000000000..9be2f57831fe73f386929bc380c2b0e604153cd6 --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_arguments/test_help/test_tutorial007_an.py @@ -0,0 +1,36 @@ +import subprocess +import sys + +import typer +import typer.core +from typer.testing import CliRunner + +from docs_src.arguments.help import tutorial007_an as mod + +runner = CliRunner() + +app = typer.Typer() +app.command()(mod.main) + + +def test_help(): + result = runner.invoke(app, ["--help"]) + assert result.exit_code == 0 + assert "Say hi to NAME very gently, like Dirk." in result.output + assert "Arguments" in result.output + assert "Secondary Arguments" in result.output + + +def test_call_arg(): + result = runner.invoke(app, ["Camila"]) + assert result.exit_code == 0 + assert "Hello Camila" in result.output + + +def test_script(): + result = subprocess.run( + [sys.executable, "-m", "coverage", "run", mod.__file__, "--help"], + capture_output=True, + encoding="utf-8", + ) + assert "Usage" in result.stdout diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_arguments/test_help/test_tutorial008.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_arguments/test_help/test_tutorial008.py new file mode 100644 index 0000000000000000000000000000000000000000..a0eda7540179527a65df496baf1d06078c58c14e --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_arguments/test_help/test_tutorial008.py @@ -0,0 +1,48 @@ +import subprocess +import sys + +import pytest +import typer +import typer.core +from typer.testing import CliRunner + +from docs_src.arguments.help import tutorial008 as mod + +runner = CliRunner() + +app = typer.Typer() +app.command()(mod.main) + + +def test_help(): + result = runner.invoke(app, ["--help"]) + assert result.exit_code == 0 + assert "[OPTIONS] [NAME]" in result.output + assert "Say hi to NAME very gently, like Dirk." in result.output + assert "Arguments" not in result.output + assert "[default: World]" not in result.output + + +def test_help_no_rich(monkeypatch: pytest.MonkeyPatch): + monkeypatch.setattr(typer.core, "HAS_RICH", False) + result = runner.invoke(app, ["--help"]) + assert result.exit_code == 0 + assert "[OPTIONS] [NAME]" in result.output + assert "Say hi to NAME very gently, like Dirk." in result.output + assert "Arguments" not in result.output + assert "[default: World]" not in result.output + + +def test_call_arg(): + result = runner.invoke(app, ["Camila"]) + assert result.exit_code == 0 + assert "Hello Camila" in result.output + + +def test_script(): + result = subprocess.run( + [sys.executable, "-m", "coverage", "run", mod.__file__, "--help"], + capture_output=True, + encoding="utf-8", + ) + assert "Usage" in result.stdout diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_arguments/test_help/test_tutorial008_an.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_arguments/test_help/test_tutorial008_an.py new file mode 100644 index 0000000000000000000000000000000000000000..a857723454c0a5c805bda1226b2a071652d7559d --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_arguments/test_help/test_tutorial008_an.py @@ -0,0 +1,48 @@ +import subprocess +import sys + +import pytest +import typer +import typer.core +from typer.testing import CliRunner + +from docs_src.arguments.help import tutorial008_an as mod + +runner = CliRunner() + +app = typer.Typer() +app.command()(mod.main) + + +def test_help(): + result = runner.invoke(app, ["--help"]) + assert result.exit_code == 0 + assert "[OPTIONS] [NAME]" in result.output + assert "Say hi to NAME very gently, like Dirk." in result.output + assert "Arguments" not in result.output + assert "[default: World]" not in result.output + + +def test_help_no_rich(monkeypatch: pytest.MonkeyPatch): + monkeypatch.setattr(typer.core, "HAS_RICH", False) + result = runner.invoke(app, ["--help"]) + assert result.exit_code == 0 + assert "[OPTIONS] [NAME]" in result.output + assert "Say hi to NAME very gently, like Dirk." in result.output + assert "Arguments" not in result.output + assert "[default: World]" not in result.output + + +def test_call_arg(): + result = runner.invoke(app, ["Camila"]) + assert result.exit_code == 0 + assert "Hello Camila" in result.output + + +def test_script(): + result = subprocess.run( + [sys.executable, "-m", "coverage", "run", mod.__file__, "--help"], + capture_output=True, + encoding="utf-8", + ) + assert "Usage" in result.stdout diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_arguments/test_optional/__init__.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_arguments/test_optional/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_arguments/test_optional/test_tutorial001.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_arguments/test_optional/test_tutorial001.py new file mode 100644 index 0000000000000000000000000000000000000000..803a330faee69822d1d5077dcfecb5ad08c78fce --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_arguments/test_optional/test_tutorial001.py @@ -0,0 +1,49 @@ +import subprocess +import sys + +import pytest +import typer +import typer.core +from typer.testing import CliRunner + +from docs_src.arguments.optional import tutorial001 as mod + +runner = CliRunner() + +app = typer.Typer() +app.command()(mod.main) + + +def test_call_no_arg(): + result = runner.invoke(app) + assert result.exit_code != 0 + assert "Missing argument 'NAME'." in result.output + + +def test_call_no_arg_standalone(): + # Mainly for coverage + result = runner.invoke(app, standalone_mode=False) + assert result.exit_code != 0 + + +def test_call_no_arg_no_rich(monkeypatch: pytest.MonkeyPatch): + # Mainly for coverage + monkeypatch.setattr(typer.core, "HAS_RICH", False) + result = runner.invoke(app) + assert result.exit_code != 0 + assert "Error: Missing argument 'NAME'" in result.output + + +def test_call_arg(): + result = runner.invoke(app, ["Camila"]) + assert result.exit_code == 0 + assert "Hello Camila" in result.output + + +def test_script(): + result = subprocess.run( + [sys.executable, "-m", "coverage", "run", mod.__file__, "--help"], + capture_output=True, + encoding="utf-8", + ) + assert "Usage" in result.stdout diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_arguments/test_optional/test_tutorial001_an.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_arguments/test_optional/test_tutorial001_an.py new file mode 100644 index 0000000000000000000000000000000000000000..700b8c9c05cc5bf86c7c97a7f3825ec51141b31a --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_arguments/test_optional/test_tutorial001_an.py @@ -0,0 +1,49 @@ +import subprocess +import sys + +import pytest +import typer +import typer.core +from typer.testing import CliRunner + +from docs_src.arguments.optional import tutorial001_an as mod + +runner = CliRunner() + +app = typer.Typer() +app.command()(mod.main) + + +def test_call_no_arg(): + result = runner.invoke(app) + assert result.exit_code != 0 + assert "Missing argument 'NAME'." in result.output + + +def test_call_no_arg_standalone(): + # Mainly for coverage + result = runner.invoke(app, standalone_mode=False) + assert result.exit_code != 0 + + +def test_call_no_arg_no_rich(monkeypatch: pytest.MonkeyPatch): + # Mainly for coverage + monkeypatch.setattr(typer.core, "HAS_RICH", False) + result = runner.invoke(app) + assert result.exit_code != 0 + assert "Error: Missing argument 'NAME'" in result.output + + +def test_call_arg(): + result = runner.invoke(app, ["Camila"]) + assert result.exit_code == 0 + assert "Hello Camila" in result.output + + +def test_script(): + result = subprocess.run( + [sys.executable, "-m", "coverage", "run", mod.__file__, "--help"], + capture_output=True, + encoding="utf-8", + ) + assert "Usage" in result.stdout diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_arguments/test_optional/test_tutorial002.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_arguments/test_optional/test_tutorial002.py new file mode 100644 index 0000000000000000000000000000000000000000..ed04c26e199d55ae9afc2620024e2ce2c915405c --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_arguments/test_optional/test_tutorial002.py @@ -0,0 +1,39 @@ +import subprocess +import sys + +import typer +from typer.testing import CliRunner + +from docs_src.arguments.optional import tutorial002 as mod + +runner = CliRunner() + +app = typer.Typer() +app.command()(mod.main) + + +def test_help(): + result = runner.invoke(app, ["--help"]) + assert result.exit_code == 0 + assert "[OPTIONS] [NAME]" in result.output + + +def test_call_no_arg(): + result = runner.invoke(app) + assert result.exit_code == 0 + assert "Hello World!" in result.output + + +def test_call_arg(): + result = runner.invoke(app, ["Camila"]) + assert result.exit_code == 0 + assert "Hello Camila" in result.output + + +def test_script(): + result = subprocess.run( + [sys.executable, "-m", "coverage", "run", mod.__file__, "--help"], + capture_output=True, + encoding="utf-8", + ) + assert "Usage" in result.stdout diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_arguments/test_optional/test_tutorial002_an.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_arguments/test_optional/test_tutorial002_an.py new file mode 100644 index 0000000000000000000000000000000000000000..0696b6b386ec6ae866e0e1f8531fa7e8d208cf70 --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_arguments/test_optional/test_tutorial002_an.py @@ -0,0 +1,39 @@ +import subprocess +import sys + +import typer +from typer.testing import CliRunner + +from docs_src.arguments.optional import tutorial002_an as mod + +runner = CliRunner() + +app = typer.Typer() +app.command()(mod.main) + + +def test_help(): + result = runner.invoke(app, ["--help"]) + assert result.exit_code == 0 + assert "[OPTIONS] [NAME]" in result.output + + +def test_call_no_arg(): + result = runner.invoke(app) + assert result.exit_code == 0 + assert "Hello World!" in result.output + + +def test_call_arg(): + result = runner.invoke(app, ["Camila"]) + assert result.exit_code == 0 + assert "Hello Camila" in result.output + + +def test_script(): + result = subprocess.run( + [sys.executable, "-m", "coverage", "run", mod.__file__, "--help"], + capture_output=True, + encoding="utf-8", + ) + assert "Usage" in result.stdout diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_arguments/test_optional/test_tutorial003.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_arguments/test_optional/test_tutorial003.py new file mode 100644 index 0000000000000000000000000000000000000000..12a57f1ee4bdfa4e9ac401a949934462b9ae434c --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_arguments/test_optional/test_tutorial003.py @@ -0,0 +1,49 @@ +import subprocess +import sys + +import pytest +import typer +import typer.core +from typer.testing import CliRunner + +from docs_src.arguments.optional import tutorial003 as mod + +runner = CliRunner() + +app = typer.Typer() +app.command()(mod.main) + + +def test_call_no_arg(): + result = runner.invoke(app) + assert result.exit_code != 0 + assert "Missing argument 'NAME'." in result.output + + +def test_call_no_arg_standalone(): + # Mainly for coverage + result = runner.invoke(app, standalone_mode=False) + assert result.exit_code != 0 + + +def test_call_no_arg_no_rich(monkeypatch: pytest.MonkeyPatch): + # Mainly for coverage + monkeypatch.setattr(typer.core, "HAS_RICH", False) + result = runner.invoke(app) + assert result.exit_code != 0 + assert "Error: Missing argument 'NAME'" in result.output + + +def test_call_arg(): + result = runner.invoke(app, ["Camila"]) + assert result.exit_code == 0 + assert "Hello Camila" in result.output + + +def test_script(): + result = subprocess.run( + [sys.executable, "-m", "coverage", "run", mod.__file__, "--help"], + capture_output=True, + encoding="utf-8", + ) + assert "Usage" in result.stdout diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_commands/__init__.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_commands/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_commands/test_arguments/__init__.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_commands/test_arguments/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_commands/test_arguments/test_tutorial001.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_commands/test_arguments/test_tutorial001.py new file mode 100644 index 0000000000000000000000000000000000000000..fd5abae1ef85bd727b21c375b204d662689440e2 --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_commands/test_arguments/test_tutorial001.py @@ -0,0 +1,43 @@ +import subprocess +import sys + +from typer.testing import CliRunner + +from docs_src.commands.arguments import tutorial001 as mod + +app = mod.app + +runner = CliRunner() + + +def test_help_create(): + result = runner.invoke(app, ["create", "--help"]) + assert result.exit_code == 0 + assert "create [OPTIONS] USERNAME" in result.output + + +def test_help_delete(): + result = runner.invoke(app, ["delete", "--help"]) + assert result.exit_code == 0 + assert "delete [OPTIONS] USERNAME" in result.output + + +def test_create(): + result = runner.invoke(app, ["create", "Camila"]) + assert result.exit_code == 0 + assert "Creating user: Camila" in result.output + + +def test_delete(): + result = runner.invoke(app, ["delete", "Camila"]) + assert result.exit_code == 0 + assert "Deleting user: Camila" in result.output + + +def test_script(): + result = subprocess.run( + [sys.executable, "-m", "coverage", "run", mod.__file__, "--help"], + capture_output=True, + encoding="utf-8", + ) + assert "Usage" in result.stdout diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_commands/test_callback/__init__.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_commands/test_callback/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_commands/test_callback/test_tutorial001.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_commands/test_callback/test_tutorial001.py new file mode 100644 index 0000000000000000000000000000000000000000..d0a417960a4cd7fa04a5654ed2f8bca8a15e6da0 --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_commands/test_callback/test_tutorial001.py @@ -0,0 +1,74 @@ +import subprocess +import sys + +import pytest +import typer.core +from typer.testing import CliRunner + +from docs_src.commands.callback import tutorial001 as mod + +app = mod.app + +runner = CliRunner() + + +def test_help(): + result = runner.invoke(app, ["--help"]) + assert result.exit_code == 0 + assert "Manage users in the awesome CLI app." in result.output + assert "--verbose" in result.output + assert "--no-verbose" in result.output + + +def test_help_no_rich(monkeypatch: pytest.MonkeyPatch): + monkeypatch.setattr(typer.core, "HAS_RICH", False) + result = runner.invoke(app, ["--help"]) + assert result.exit_code == 0 + assert "Manage users in the awesome CLI app." in result.output + assert "--verbose" in result.output + assert "--no-verbose" in result.output + + +def test_create(): + result = runner.invoke(app, ["create", "Camila"]) + assert result.exit_code == 0 + assert "Creating user: Camila" in result.output + + +def test_create_verbose(): + result = runner.invoke(app, ["--verbose", "create", "Camila"]) + assert result.exit_code == 0 + assert "Will write verbose output" in result.output + assert "About to create a user" in result.output + assert "Creating user: Camila" in result.output + assert "Just created a user" in result.output + + +def test_delete(): + result = runner.invoke(app, ["delete", "Camila"]) + assert result.exit_code == 0 + assert "Deleting user: Camila" in result.output + + +def test_delete_verbose(): + result = runner.invoke(app, ["--verbose", "delete", "Camila"]) + assert result.exit_code == 0 + assert "Will write verbose output" in result.output + assert "About to delete a user" in result.output + assert "Deleting user: Camila" in result.output + assert "Just deleted a user" in result.output + + +def test_wrong_verbose(): + result = runner.invoke(app, ["delete", "--verbose", "Camila"]) + assert result.exit_code != 0 + assert "No such option: --verbose" in result.output + + +def test_script(): + result = subprocess.run( + [sys.executable, "-m", "coverage", "run", mod.__file__, "--help"], + capture_output=True, + encoding="utf-8", + ) + assert "Usage" in result.stdout diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_commands/test_callback/test_tutorial002.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_commands/test_callback/test_tutorial002.py new file mode 100644 index 0000000000000000000000000000000000000000..e19ca9d22bed59b9aad80d4f8a65412100805fb2 --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_commands/test_callback/test_tutorial002.py @@ -0,0 +1,26 @@ +import subprocess +import sys + +from typer.testing import CliRunner + +from docs_src.commands.callback import tutorial002 as mod + +app = mod.app + +runner = CliRunner() + + +def test_app(): + result = runner.invoke(app, ["create", "Camila"]) + assert result.exit_code == 0 + assert "Running a command" in result.output + assert "Creating user: Camila" in result.output + + +def test_script(): + result = subprocess.run( + [sys.executable, "-m", "coverage", "run", mod.__file__, "--help"], + capture_output=True, + encoding="utf-8", + ) + assert "Usage" in result.stdout diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_commands/test_callback/test_tutorial003.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_commands/test_callback/test_tutorial003.py new file mode 100644 index 0000000000000000000000000000000000000000..163341f67e081d0200a7a4ca1142e04129730712 --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_commands/test_callback/test_tutorial003.py @@ -0,0 +1,31 @@ +import subprocess +import sys + +from typer.testing import CliRunner + +from docs_src.commands.callback import tutorial003 as mod + +app = mod.app + +runner = CliRunner() + + +def test_app(): + result = runner.invoke(app, ["create", "Camila"]) + assert result.exit_code == 0 + assert "Override callback, running a command" in result.output + assert "Running a command" not in result.output + assert "Creating user: Camila" in result.output + + +def test_for_coverage(): + mod.callback() + + +def test_script(): + result = subprocess.run( + [sys.executable, "-m", "coverage", "run", mod.__file__, "--help"], + capture_output=True, + encoding="utf-8", + ) + assert "Usage" in result.stdout diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_commands/test_callback/test_tutorial004.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_commands/test_callback/test_tutorial004.py new file mode 100644 index 0000000000000000000000000000000000000000..23179d66b7d70af3b3814e3dbd589fe2adf82eea --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_commands/test_callback/test_tutorial004.py @@ -0,0 +1,33 @@ +import subprocess +import sys + +from typer.testing import CliRunner + +from docs_src.commands.callback import tutorial004 as mod + +app = mod.app + +runner = CliRunner() + + +def test_help(): + result = runner.invoke(app, ["--help"]) + assert result.exit_code == 0 + assert "Manage users CLI app." in result.output + assert "Use it with the create command." in result.output + assert "A new user with the given NAME will be created." in result.output + + +def test_app(): + result = runner.invoke(app, ["create", "Camila"]) + assert result.exit_code == 0 + assert "Creating user: Camila" in result.output + + +def test_script(): + result = subprocess.run( + [sys.executable, "-m", "coverage", "run", mod.__file__, "--help"], + capture_output=True, + encoding="utf-8", + ) + assert "Usage" in result.stdout diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_commands/test_context/__init__.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_commands/test_context/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_commands/test_context/test_tutorial001.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_commands/test_context/test_tutorial001.py new file mode 100644 index 0000000000000000000000000000000000000000..be6c0dce43d1a87ea59c7d95a9a6f686c78e4627 --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_commands/test_context/test_tutorial001.py @@ -0,0 +1,33 @@ +import subprocess +import sys + +from typer.testing import CliRunner + +from docs_src.commands.context import tutorial001 as mod + +app = mod.app + +runner = CliRunner() + + +def test_create(): + result = runner.invoke(app, ["create", "Camila"]) + assert result.exit_code == 0 + assert "About to execute command: create" in result.output + assert "Creating user: Camila" in result.output + + +def test_delete(): + result = runner.invoke(app, ["delete", "Camila"]) + assert result.exit_code == 0 + assert "About to execute command: delete" in result.output + assert "Deleting user: Camila" in result.output + + +def test_script(): + result = subprocess.run( + [sys.executable, "-m", "coverage", "run", mod.__file__, "--help"], + capture_output=True, + encoding="utf-8", + ) + assert "Usage" in result.stdout diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_commands/test_context/test_tutorial002.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_commands/test_context/test_tutorial002.py new file mode 100644 index 0000000000000000000000000000000000000000..a83f81a80c6056614acd297815d2bfa59ea7d706 --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_commands/test_context/test_tutorial002.py @@ -0,0 +1,39 @@ +import subprocess +import sys + +from typer.testing import CliRunner + +from docs_src.commands.context import tutorial002 as mod + +app = mod.app + +runner = CliRunner() + + +def test_create(): + result = runner.invoke(app, ["create", "Camila"]) + assert result.exit_code == 0 + assert "Initializing database" in result.output + assert "Creating user: Camila" in result.output + + +def test_delete(): + result = runner.invoke(app, ["delete", "Camila"]) + assert result.exit_code == 0 + assert "Initializing database" in result.output + assert "Deleting user: Camila" in result.output + + +def test_callback(): + result = runner.invoke(app) + assert result.exit_code == 0 + assert "Initializing database" in result.output + + +def test_script(): + result = subprocess.run( + [sys.executable, "-m", "coverage", "run", mod.__file__, "--help"], + capture_output=True, + encoding="utf-8", + ) + assert "Usage" in result.stdout diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_commands/test_context/test_tutorial003.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_commands/test_context/test_tutorial003.py new file mode 100644 index 0000000000000000000000000000000000000000..1ec8f5464992f2e41c77aad697688f7972c5f404 --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_commands/test_context/test_tutorial003.py @@ -0,0 +1,39 @@ +import subprocess +import sys + +from typer.testing import CliRunner + +from docs_src.commands.context import tutorial003 as mod + +app = mod.app + +runner = CliRunner() + + +def test_create(): + result = runner.invoke(app, ["create", "Camila"]) + assert result.exit_code == 0 + assert "Initializing database" not in result.output + assert "Creating user: Camila" in result.output + + +def test_delete(): + result = runner.invoke(app, ["delete", "Camila"]) + assert result.exit_code == 0 + assert "Initializing database" not in result.output + assert "Deleting user: Camila" in result.output + + +def test_callback(): + result = runner.invoke(app) + assert result.exit_code == 0 + assert "Initializing database" in result.output + + +def test_script(): + result = subprocess.run( + [sys.executable, "-m", "coverage", "run", mod.__file__, "--help"], + capture_output=True, + encoding="utf-8", + ) + assert "Usage" in result.stdout diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_commands/test_context/test_tutorial004.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_commands/test_context/test_tutorial004.py new file mode 100644 index 0000000000000000000000000000000000000000..ade78ad252d12b8a91168b6107208f509f967620 --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_commands/test_context/test_tutorial004.py @@ -0,0 +1,28 @@ +import subprocess +import sys + +from typer.testing import CliRunner + +from docs_src.commands.context import tutorial004 as mod + +app = mod.app + +runner = CliRunner() + + +def test_1(): + result = runner.invoke(app, ["--name", "Camila", "--city", "Berlin"]) + assert result.exit_code == 0 + assert "Got extra arg: --name" in result.output + assert "Got extra arg: Camila" in result.output + assert "Got extra arg: --city" in result.output + assert "Got extra arg: Berlin" in result.output + + +def test_script(): + result = subprocess.run( + [sys.executable, "-m", "coverage", "run", mod.__file__, "--help"], + capture_output=True, + encoding="utf-8", + ) + assert "Usage" in result.stdout diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_commands/test_help/__init__.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_commands/test_help/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_commands/test_help/test_tutorial001.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_commands/test_help/test_tutorial001.py new file mode 100644 index 0000000000000000000000000000000000000000..91f0fb615b8749ababb8674e22afc58a7750758e --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_commands/test_help/test_tutorial001.py @@ -0,0 +1,109 @@ +import subprocess +import sys + +from typer.testing import CliRunner + +from docs_src.commands.help import tutorial001 as mod + +app = mod.app + +runner = CliRunner() + + +def test_help(): + result = runner.invoke(app, ["--help"]) + assert result.exit_code == 0 + assert "Awesome CLI user manager." in result.output + assert "create" in result.output + assert "Create a new user with USERNAME." in result.output + assert "delete" in result.output + assert "Delete a user with USERNAME." in result.output + assert "delete-all" in result.output + assert "Delete ALL users in the database." in result.output + assert "init" in result.output + assert "Initialize the users database." in result.output + + +def test_help_create(): + result = runner.invoke(app, ["create", "--help"]) + assert result.exit_code == 0 + assert "create [OPTIONS] USERNAME" in result.output + assert "Create a new user with USERNAME." in result.output + + +def test_help_delete(): + result = runner.invoke(app, ["delete", "--help"]) + assert result.exit_code == 0 + assert "delete [OPTIONS] USERNAME" in result.output + assert "Delete a user with USERNAME." in result.output + assert "--force" in result.output + assert "--no-force" in result.output + assert "Force deletion without confirmation." in result.output + + +def test_help_delete_all(): + result = runner.invoke(app, ["delete-all", "--help"]) + assert result.exit_code == 0 + assert "delete-all [OPTIONS]" in result.output + assert "Delete ALL users in the database." in result.output + assert "If --force is not used, will ask for confirmation." in result.output + assert "[required]" in result.output + assert "--force" in result.output + assert "--no-force" in result.output + assert "Force deletion without confirmation." in result.output + + +def test_help_init(): + result = runner.invoke(app, ["init", "--help"]) + assert result.exit_code == 0 + assert "init [OPTIONS]" in result.output + assert "Initialize the users database." in result.output + + +def test_create(): + result = runner.invoke(app, ["create", "Camila"]) + assert result.exit_code == 0 + assert "Creating user: Camila" in result.output + + +def test_delete(): + result = runner.invoke(app, ["delete", "Camila"], input="y\n") + assert result.exit_code == 0 + assert "Are you sure you want to delete the user? [y/n]:" in result.output + assert "Deleting user: Camila" in result.output + + +def test_no_delete(): + result = runner.invoke(app, ["delete", "Camila"], input="n\n") + assert result.exit_code == 0 + assert "Are you sure you want to delete the user? [y/n]:" in result.output + assert "Operation cancelled" in result.output + + +def test_delete_all(): + result = runner.invoke(app, ["delete-all"], input="y\n") + assert result.exit_code == 0 + assert "Are you sure you want to delete ALL users? [y/n]:" in result.output + assert "Deleting all users" in result.output + + +def test_no_delete_all(): + result = runner.invoke(app, ["delete-all"], input="n\n") + assert result.exit_code == 0 + assert "Are you sure you want to delete ALL users? [y/n]:" in result.output + assert "Operation cancelled" in result.output + + +def test_init(): + result = runner.invoke(app, ["init"]) + assert result.exit_code == 0 + assert "Initializing user database" in result.output + + +def test_script(): + result = subprocess.run( + [sys.executable, "-m", "coverage", "run", mod.__file__, "--help"], + capture_output=True, + encoding="utf-8", + ) + assert "Usage" in result.stdout diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_commands/test_help/test_tutorial001_an.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_commands/test_help/test_tutorial001_an.py new file mode 100644 index 0000000000000000000000000000000000000000..0a8667e13364406d8ba0513537585343998c9d86 --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_commands/test_help/test_tutorial001_an.py @@ -0,0 +1,109 @@ +import subprocess +import sys + +from typer.testing import CliRunner + +from docs_src.commands.help import tutorial001_an as mod + +app = mod.app + +runner = CliRunner() + + +def test_help(): + result = runner.invoke(app, ["--help"]) + assert result.exit_code == 0 + assert "Awesome CLI user manager." in result.output + assert "create" in result.output + assert "Create a new user with USERNAME." in result.output + assert "delete" in result.output + assert "Delete a user with USERNAME." in result.output + assert "delete-all" in result.output + assert "Delete ALL users in the database." in result.output + assert "init" in result.output + assert "Initialize the users database." in result.output + + +def test_help_create(): + result = runner.invoke(app, ["create", "--help"]) + assert result.exit_code == 0 + assert "create [OPTIONS] USERNAME" in result.output + assert "Create a new user with USERNAME." in result.output + + +def test_help_delete(): + result = runner.invoke(app, ["delete", "--help"]) + assert result.exit_code == 0 + assert "delete [OPTIONS] USERNAME" in result.output + assert "Delete a user with USERNAME." in result.output + assert "--force" in result.output + assert "--no-force" in result.output + assert "Force deletion without confirmation." in result.output + + +def test_help_delete_all(): + result = runner.invoke(app, ["delete-all", "--help"]) + assert result.exit_code == 0 + assert "delete-all [OPTIONS]" in result.output + assert "Delete ALL users in the database." in result.output + assert "If --force is not used, will ask for confirmation." in result.output + assert "[required]" in result.output + assert "--force" in result.output + assert "--no-force" in result.output + assert "Force deletion without confirmation." in result.output + + +def test_help_init(): + result = runner.invoke(app, ["init", "--help"]) + assert result.exit_code == 0 + assert "init [OPTIONS]" in result.output + assert "Initialize the users database." in result.output + + +def test_create(): + result = runner.invoke(app, ["create", "Camila"]) + assert result.exit_code == 0 + assert "Creating user: Camila" in result.output + + +def test_delete(): + result = runner.invoke(app, ["delete", "Camila"], input="y\n") + assert result.exit_code == 0 + assert "Are you sure you want to delete the user? [y/n]:" in result.output + assert "Deleting user: Camila" in result.output + + +def test_no_delete(): + result = runner.invoke(app, ["delete", "Camila"], input="n\n") + assert result.exit_code == 0 + assert "Are you sure you want to delete the user? [y/n]:" in result.output + assert "Operation cancelled" in result.output + + +def test_delete_all(): + result = runner.invoke(app, ["delete-all"], input="y\n") + assert result.exit_code == 0 + assert "Are you sure you want to delete ALL users? [y/n]:" in result.output + assert "Deleting all users" in result.output + + +def test_no_delete_all(): + result = runner.invoke(app, ["delete-all"], input="n\n") + assert result.exit_code == 0 + assert "Are you sure you want to delete ALL users? [y/n]:" in result.output + assert "Operation cancelled" in result.output + + +def test_init(): + result = runner.invoke(app, ["init"]) + assert result.exit_code == 0 + assert "Initializing user database" in result.output + + +def test_script(): + result = subprocess.run( + [sys.executable, "-m", "coverage", "run", mod.__file__, "--help"], + capture_output=True, + encoding="utf-8", + ) + assert "Usage" in result.stdout diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_commands/test_help/test_tutorial002.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_commands/test_help/test_tutorial002.py new file mode 100644 index 0000000000000000000000000000000000000000..447012dcc4294a88cce31539e2b07eea849064fd --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_commands/test_help/test_tutorial002.py @@ -0,0 +1,56 @@ +import subprocess +import sys + +from typer.testing import CliRunner + +from docs_src.commands.help import tutorial002 as mod + +app = mod.app + +runner = CliRunner() + + +def test_help(): + result = runner.invoke(app, ["--help"]) + assert result.exit_code == 0 + assert "create" in result.output + assert "Create a new user with USERNAME." in result.output + assert "delete" in result.output + assert "Delete a user with USERNAME." in result.output + assert "Some internal utility function to create." not in result.output + assert "Some internal utility function to delete." not in result.output + + +def test_help_create(): + result = runner.invoke(app, ["create", "--help"]) + assert result.exit_code == 0 + assert "Create a new user with USERNAME." in result.output + assert "Some internal utility function to create." not in result.output + + +def test_help_delete(): + result = runner.invoke(app, ["delete", "--help"]) + assert result.exit_code == 0 + assert "Delete a user with USERNAME." in result.output + assert "Some internal utility function to delete." not in result.output + + +def test_create(): + result = runner.invoke(app, ["create", "Camila"]) + assert result.exit_code == 0 + assert "Creating user: Camila" in result.output + + +def test_delete(): + result = runner.invoke(app, ["delete", "Camila"]) + assert result.exit_code == 0 + assert "Deleting user: Camila" in result.output + + +def test_script(): + result = subprocess.run( + [sys.executable, "-m", "coverage", "run", mod.__file__, "--help"], + capture_output=True, + encoding="utf-8", + ) + assert "Usage" in result.stdout diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_commands/test_help/test_tutorial003.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_commands/test_help/test_tutorial003.py new file mode 100644 index 0000000000000000000000000000000000000000..d4e423a03e7a51f03b3171f71d263af904a85d02 --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_commands/test_help/test_tutorial003.py @@ -0,0 +1,44 @@ +import subprocess +import sys + +from typer.testing import CliRunner + +from docs_src.commands.help import tutorial003 as mod + +app = mod.app + +runner = CliRunner() + + +def test_help(): + result = runner.invoke(app, ["--help"]) + assert result.exit_code == 0 + assert "create" in result.output + assert "Create a user." in result.output + assert "delete" in result.output + assert "(deprecated)" in result.output + assert "Delete a user." in result.output + + +def test_help_delete(): + result = runner.invoke(app, ["delete", "--help"]) + assert result.exit_code == 0 + assert "(deprecated)" in result.output + assert "Delete a user." in result.output + + +def test_call(): + # Mainly for coverage + result = runner.invoke(app, ["create", "Camila"]) + assert result.exit_code == 0 + result = runner.invoke(app, ["delete", "Camila"]) + assert result.exit_code == 0 + + +def test_script(): + result = subprocess.run( + [sys.executable, "-m", "coverage", "run", mod.__file__, "--help"], + capture_output=True, + encoding="utf-8", + ) + assert "Usage" in result.stdout diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_commands/test_help/test_tutorial004.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_commands/test_help/test_tutorial004.py new file mode 100644 index 0000000000000000000000000000000000000000..9d67b68f643740f8d69c2e12048aee6f2a815ca0 --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_commands/test_help/test_tutorial004.py @@ -0,0 +1,61 @@ +import os +import subprocess +import sys + +from typer.testing import CliRunner + +from docs_src.commands.help import tutorial004 as mod + +app = mod.app + +runner = CliRunner() + + +def test_help(): + result = runner.invoke(app, ["--help"]) + assert result.exit_code == 0 + assert "create" in result.output + assert "Create a new shiny user. ✨" in result.output + assert "delete" in result.output + assert "Delete a user with USERNAME." in result.output + assert "Some internal utility function to create." not in result.output + assert "Some internal utility function to delete." not in result.output + + +def test_help_create(): + result = runner.invoke(app, ["create", "--help"]) + assert result.exit_code == 0 + assert "Create a new shiny user. ✨" in result.output + assert "The username to be created" in result.output + assert "Some internal utility function to create." not in result.output + + +def test_help_delete(): + result = runner.invoke(app, ["delete", "--help"]) + assert result.exit_code == 0 + assert "Delete a user with USERNAME." in result.output + assert "The username to be deleted" in result.output + assert "Force the deletion šŸ’„" in result.output + assert "Some internal utility function to delete." not in result.output + + +def test_create(): + result = runner.invoke(app, ["create", "Camila"]) + assert result.exit_code == 0 + assert "Creating user: Camila" in result.output + + +def test_delete(): + result = runner.invoke(app, ["delete", "Camila"]) + assert result.exit_code == 0 + assert "Deleting user: Camila" in result.output + + +def test_script(): + result = subprocess.run( + [sys.executable, "-m", "coverage", "run", mod.__file__, "--help"], + capture_output=True, + encoding="utf-8", + env={**os.environ, "PYTHONIOENCODING": "utf-8"}, + ) + assert "Usage" in result.stdout diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_commands/test_help/test_tutorial004_an.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_commands/test_help/test_tutorial004_an.py new file mode 100644 index 0000000000000000000000000000000000000000..fbc9fd28dbbd321cbd98f6ca56f7196671383c49 --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_commands/test_help/test_tutorial004_an.py @@ -0,0 +1,61 @@ +import os +import subprocess +import sys + +from typer.testing import CliRunner + +from docs_src.commands.help import tutorial004_an as mod + +app = mod.app + +runner = CliRunner() + + +def test_help(): + result = runner.invoke(app, ["--help"]) + assert result.exit_code == 0 + assert "create" in result.output + assert "Create a new shinny user. ✨" in result.output + assert "delete" in result.output + assert "Delete a user with USERNAME." in result.output + assert "Some internal utility function to create." not in result.output + assert "Some internal utility function to delete." not in result.output + + +def test_help_create(): + result = runner.invoke(app, ["create", "--help"]) + assert result.exit_code == 0 + assert "Create a new shinny user. ✨" in result.output + assert "The username to be created" in result.output + assert "Some internal utility function to create." not in result.output + + +def test_help_delete(): + result = runner.invoke(app, ["delete", "--help"]) + assert result.exit_code == 0 + assert "Delete a user with USERNAME." in result.output + assert "The username to be deleted" in result.output + assert "Force the deletion šŸ’„" in result.output + assert "Some internal utility function to delete." not in result.output + + +def test_create(): + result = runner.invoke(app, ["create", "Camila"]) + assert result.exit_code == 0 + assert "Creating user: Camila" in result.output + + +def test_delete(): + result = runner.invoke(app, ["delete", "Camila"]) + assert result.exit_code == 0 + assert "Deleting user: Camila" in result.output + + +def test_script(): + result = subprocess.run( + [sys.executable, "-m", "coverage", "run", mod.__file__, "--help"], + capture_output=True, + encoding="utf-8", + env={**os.environ, "PYTHONIOENCODING": "utf-8"}, + ) + assert "Usage" in result.stdout diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_commands/test_help/test_tutorial005.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_commands/test_help/test_tutorial005.py new file mode 100644 index 0000000000000000000000000000000000000000..8d62cabdaec81bd9e39812b4c536148b5e18541c --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_commands/test_help/test_tutorial005.py @@ -0,0 +1,62 @@ +import os +import subprocess +import sys + +from typer.testing import CliRunner + +from docs_src.commands.help import tutorial005 as mod + +app = mod.app + +runner = CliRunner() + + +def test_help(): + result = runner.invoke(app, ["--help"]) + assert result.exit_code == 0 + assert "create" in result.output + assert "Create a new shiny user. ✨" in result.output + assert "delete" in result.output + assert "Delete a user with USERNAME." in result.output + assert "Some internal utility function to create." not in result.output + assert "Some internal utility function to delete." not in result.output + + +def test_help_create(): + result = runner.invoke(app, ["create", "--help"]) + assert result.exit_code == 0 + assert "Create a new shiny user. ✨" in result.output + assert "The username to be created" in result.output + assert "Learn more at the Typer docs website" in result.output + assert "Some internal utility function to create." not in result.output + + +def test_help_delete(): + result = runner.invoke(app, ["delete", "--help"]) + assert result.exit_code == 0 + assert "Delete a user with USERNAME." in result.output + assert "The username to be deleted" in result.output + assert "Force the deletion šŸ’„" in result.output + assert "Some internal utility function to delete." not in result.output + + +def test_create(): + result = runner.invoke(app, ["create", "Camila"]) + assert result.exit_code == 0 + assert "Creating user: Camila" in result.output + + +def test_delete(): + result = runner.invoke(app, ["delete", "Camila"]) + assert result.exit_code == 0 + assert "Deleting user: Camila" in result.output + + +def test_script(): + result = subprocess.run( + [sys.executable, "-m", "coverage", "run", mod.__file__, "--help"], + capture_output=True, + encoding="utf-8", + env={**os.environ, "PYTHONIOENCODING": "utf-8"}, + ) + assert "Usage" in result.stdout diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_commands/test_help/test_tutorial005_an.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_commands/test_help/test_tutorial005_an.py new file mode 100644 index 0000000000000000000000000000000000000000..65335e6176c374460deb87d796c642c828cab89c --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_commands/test_help/test_tutorial005_an.py @@ -0,0 +1,62 @@ +import os +import subprocess +import sys + +from typer.testing import CliRunner + +from docs_src.commands.help import tutorial005_an as mod + +app = mod.app + +runner = CliRunner() + + +def test_help(): + result = runner.invoke(app, ["--help"]) + assert result.exit_code == 0 + assert "create" in result.output + assert "Create a new shinny user. ✨" in result.output + assert "delete" in result.output + assert "Delete a user with USERNAME." in result.output + assert "Some internal utility function to create." not in result.output + assert "Some internal utility function to delete." not in result.output + + +def test_help_create(): + result = runner.invoke(app, ["create", "--help"]) + assert result.exit_code == 0 + assert "Create a new shinny user. ✨" in result.output + assert "The username to be created" in result.output + assert "Learn more at the Typer docs website" in result.output + assert "Some internal utility function to create." not in result.output + + +def test_help_delete(): + result = runner.invoke(app, ["delete", "--help"]) + assert result.exit_code == 0 + assert "Delete a user with USERNAME." in result.output + assert "The username to be deleted" in result.output + assert "Force the deletion šŸ’„" in result.output + assert "Some internal utility function to delete." not in result.output + + +def test_create(): + result = runner.invoke(app, ["create", "Camila"]) + assert result.exit_code == 0 + assert "Creating user: Camila" in result.output + + +def test_delete(): + result = runner.invoke(app, ["delete", "Camila"]) + assert result.exit_code == 0 + assert "Deleting user: Camila" in result.output + + +def test_script(): + result = subprocess.run( + [sys.executable, "-m", "coverage", "run", mod.__file__, "--help"], + capture_output=True, + encoding="utf-8", + env={**os.environ, "PYTHONIOENCODING": "utf-8"}, + ) + assert "Usage" in result.stdout diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_commands/test_help/test_tutorial006.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_commands/test_help/test_tutorial006.py new file mode 100644 index 0000000000000000000000000000000000000000..d645164b575e5e8538f713c48ec91bc0346561bb --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_commands/test_help/test_tutorial006.py @@ -0,0 +1,53 @@ +import os +import subprocess +import sys + +from typer.testing import CliRunner + +from docs_src.commands.help import tutorial006 as mod + +app = mod.app + +runner = CliRunner() + + +def test_main_help(): + result = runner.invoke(app, ["--help"]) + assert result.exit_code == 0 + assert "create" in result.output + assert "Create a new user. ✨" in result.output + assert "delete" in result.output + assert "Delete a user. šŸ”„" in result.output + assert "Utils and Configs" in result.output + assert "config" in result.output + assert "Configure the system. šŸ”§" in result.output + assert "Synchronize the system or something fancy like that. ā™»" in result.output + assert "Help and Others" in result.output + assert "Get help with the system. ā“" in result.output + assert "Report an issue. šŸ›" in result.output + + +def test_call(): + # Mainly for coverage + result = runner.invoke(app, ["create", "Morty"]) + assert result.exit_code == 0 + result = runner.invoke(app, ["delete", "Morty"]) + assert result.exit_code == 0 + result = runner.invoke(app, ["config", "Morty"]) + assert result.exit_code == 0 + result = runner.invoke(app, ["sync"]) + assert result.exit_code == 0 + result = runner.invoke(app, ["help"]) + assert result.exit_code == 0 + result = runner.invoke(app, ["report"]) + assert result.exit_code == 0 + + +def test_script(): + result = subprocess.run( + [sys.executable, "-m", "coverage", "run", mod.__file__, "--help"], + capture_output=True, + encoding="utf-8", + env={**os.environ, "PYTHONIOENCODING": "utf-8"}, + ) + assert "Usage" in result.stdout diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_commands/test_help/test_tutorial007.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_commands/test_help/test_tutorial007.py new file mode 100644 index 0000000000000000000000000000000000000000..f262c251f54ccfe60db4663a9067ea98cf4794cd --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_commands/test_help/test_tutorial007.py @@ -0,0 +1,57 @@ +import os +import subprocess +import sys + +from typer.testing import CliRunner + +from docs_src.commands.help import tutorial007 as mod + +app = mod.app + +runner = CliRunner() + + +def test_main_help(): + result = runner.invoke(app, ["--help"]) + assert result.exit_code == 0 + assert "create" in result.output + assert "Create a new user. ✨" in result.output + assert "Utils and Configs" in result.output + assert "config" in result.output + assert "Configure the system. šŸ”§" in result.output + + +def test_create_help(): + result = runner.invoke(app, ["create", "--help"]) + assert result.exit_code == 0 + assert "username" in result.output + assert "The username to create" in result.output + assert "Secondary Arguments" in result.output + assert "lastname" in result.output + assert "The last name of the new user" in result.output + assert "--force" in result.output + assert "--no-force" in result.output + assert "Force the creation of the user" in result.output + assert "Additional Data" in result.output + assert "--age" in result.output + assert "The age of the new user" in result.output + assert "--favorite-color" in result.output + assert "The favorite color of the new user" in result.output + + +def test_call(): + # Mainly for coverage + result = runner.invoke(app, ["create", "Morty"]) + assert result.exit_code == 0 + result = runner.invoke(app, ["config", "Morty"]) + assert result.exit_code == 0 + + +def test_script(): + result = subprocess.run( + [sys.executable, "-m", "coverage", "run", mod.__file__, "--help"], + capture_output=True, + encoding="utf-8", + env={**os.environ, "PYTHONIOENCODING": "utf-8"}, + ) + assert "Usage" in result.stdout diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_commands/test_help/test_tutorial007_an.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_commands/test_help/test_tutorial007_an.py new file mode 100644 index 0000000000000000000000000000000000000000..1a8c3d60a7a9449f7a6c83acdd848ff6c045d468 --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_commands/test_help/test_tutorial007_an.py @@ -0,0 +1,57 @@ +import os +import subprocess +import sys + +from typer.testing import CliRunner + +from docs_src.commands.help import tutorial007_an as mod + +app = mod.app + +runner = CliRunner() + + +def test_main_help(): + result = runner.invoke(app, ["--help"]) + assert result.exit_code == 0 + assert "create" in result.output + assert "Create a new user. ✨" in result.output + assert "Utils and Configs" in result.output + assert "config" in result.output + assert "Configure the system. šŸ”§" in result.output + + +def test_create_help(): + result = runner.invoke(app, ["create", "--help"]) + assert result.exit_code == 0 + assert "username" in result.output + assert "The username to create" in result.output + assert "Secondary Arguments" in result.output + assert "lastname" in result.output + assert "The last name of the new user" in result.output + assert "--force" in result.output + assert "--no-force" in result.output + assert "Force the creation of the user" in result.output + assert "Additional Data" in result.output + assert "--age" in result.output + assert "The age of the new user" in result.output + assert "--favorite-color" in result.output + assert "The favorite color of the new user" in result.output + + +def test_call(): + # Mainly for coverage + result = runner.invoke(app, ["create", "Morty"]) + assert result.exit_code == 0 + result = runner.invoke(app, ["config", "Morty"]) + assert result.exit_code == 0 + + +def test_script(): + result = subprocess.run( + [sys.executable, "-m", "coverage", "run", mod.__file__, "--help"], + capture_output=True, + encoding="utf-8", + env={**os.environ, "PYTHONIOENCODING": "utf-8"}, + ) + assert "Usage" in result.stdout diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_commands/test_help/test_tutorial008.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_commands/test_help/test_tutorial008.py new file mode 100644 index 0000000000000000000000000000000000000000..299a4afb58b15283366a4683b165fb7413091c28 --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_commands/test_help/test_tutorial008.py @@ -0,0 +1,32 @@ +import subprocess +import sys + +from typer.testing import CliRunner + +from docs_src.commands.help import tutorial008 as mod + +app = mod.app + +runner = CliRunner() + + +def test_main_help(): + result = runner.invoke(app, ["--help"]) + assert result.exit_code == 0 + assert "Create a new user. ✨" in result.output + assert "Made with ā¤ in Venus" in result.output + + +def test_call(): + # Mainly for coverage + result = runner.invoke(app, ["Morty"]) + assert result.exit_code == 0 + + +def test_script(): + result = subprocess.run( + [sys.executable, "-m", "coverage", "run", mod.__file__, "--help"], + capture_output=True, + encoding="utf-8", + ) + assert "Usage" in result.stdout diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_commands/test_index/__init__.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_commands/test_index/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_commands/test_index/test_tutorial001.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_commands/test_index/test_tutorial001.py new file mode 100644 index 0000000000000000000000000000000000000000..4c978e0ae55878d0b48f535f28814103f40341d8 --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_commands/test_index/test_tutorial001.py @@ -0,0 +1,31 @@ +import subprocess +import sys + +from typer.testing import CliRunner + +from docs_src.commands.index import tutorial001 as mod + +app = mod.app + +runner = CliRunner() + + +def test_no_arg(): + result = runner.invoke(app) + assert result.exit_code != 0 + assert "Missing argument 'NAME'." in result.output + + +def test_arg(): + result = runner.invoke(app, ["Camila"]) + assert result.exit_code == 0 + assert "Hello Camila" in result.output + + +def test_script(): + result = subprocess.run( + [sys.executable, "-m", "coverage", "run", mod.__file__, "--help"], + capture_output=True, + encoding="utf-8", + ) + assert "Usage" in result.stdout diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_commands/test_index/test_tutorial002.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_commands/test_index/test_tutorial002.py new file mode 100644 index 0000000000000000000000000000000000000000..fd10fe0204ee009a5dcdca4b8f5608d32e52d5f6 --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_commands/test_index/test_tutorial002.py @@ -0,0 +1,40 @@ +import subprocess +import sys + +from typer.testing import CliRunner + +from docs_src.commands.index import tutorial002 as mod + +app = mod.app + +runner = CliRunner() + + +def test_help(): + result = runner.invoke(app, ["--help"]) + assert result.exit_code == 0 + assert "[OPTIONS] COMMAND [ARGS]..." in result.output + assert "Commands" in result.output + assert "create" in result.output + assert "delete" in result.output + + +def test_create(): + result = runner.invoke(app, ["create"]) + assert result.exit_code == 0 + assert "Creating user: Hiro Hamada" in result.output + + +def test_delete(): + result = runner.invoke(app, ["delete"]) + assert result.exit_code == 0 + assert "Deleting user: Hiro Hamada" in result.output + + +def test_script(): + result = subprocess.run( + [sys.executable, "-m", "coverage", "run", mod.__file__, "--help"], + capture_output=True, + encoding="utf-8", + ) + assert "Usage" in result.stdout diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_commands/test_index/test_tutorial003.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_commands/test_index/test_tutorial003.py new file mode 100644 index 0000000000000000000000000000000000000000..a7dd9b77b874fd9086196b4e70ff4c59d3c835f9 --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_commands/test_index/test_tutorial003.py @@ -0,0 +1,46 @@ +import subprocess +import sys + +from typer.testing import CliRunner + +from docs_src.commands.index import tutorial003 as mod + +app = mod.app + +runner = CliRunner() + + +def test_no_arg(): + result = runner.invoke(app) + assert "[OPTIONS] COMMAND [ARGS]..." in result.output + assert "Commands" in result.output + assert "create" in result.output + assert "delete" in result.output + + +def test_no_additional_output(): + """Ensure that no additional output was generated (cf. PR #1262)""" + result = runner.invoke(app) + assert result.output.count("Usage") == 1 + assert "Error" not in result.output + + +def test_create(): + result = runner.invoke(app, ["create"]) + assert result.exit_code == 0 + assert "Creating user: Hiro Hamada" in result.output + + +def test_delete(): + result = runner.invoke(app, ["delete"]) + assert result.exit_code == 0 + assert "Deleting user: Hiro Hamada" in result.output + + +def test_script(): + result = subprocess.run( + [sys.executable, "-m", "coverage", "run", mod.__file__, "--help"], + capture_output=True, + encoding="utf-8", + ) + assert "Usage" in result.stdout diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_commands/test_index/test_tutorial004.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_commands/test_index/test_tutorial004.py new file mode 100644 index 0000000000000000000000000000000000000000..ae0139e93a84036e839dc91ee165c35c6e937e84 --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_commands/test_index/test_tutorial004.py @@ -0,0 +1,45 @@ +import subprocess +import sys + +from typer.testing import CliRunner + +from docs_src.commands.index import tutorial004 as mod + +app = mod.app + +runner = CliRunner() + + +def test_help(): + result = runner.invoke(app, ["--help"]) + assert result.exit_code == 0 + assert "[OPTIONS] COMMAND [ARGS]..." in result.output + print(result.output) + assert "Commands" in result.output + assert "create" in result.output + assert "delete" in result.output + # Test that the 'delete' command precedes the 'create' command in the help output + create_char = result.output.index("create") + delete_char = result.output.index("delete") + assert delete_char < create_char + + +def test_create(): + result = runner.invoke(app, ["create"]) + assert result.exit_code == 0 + assert "Creating user: Hiro Hamada" in result.output + + +def test_delete(): + result = runner.invoke(app, ["delete"]) + assert result.exit_code == 0 + assert "Deleting user: Hiro Hamada" in result.output + + +def test_script(): + result = subprocess.run( + [sys.executable, "-m", "coverage", "run", mod.__file__, "--help"], + capture_output=True, + encoding="utf-8", + ) + assert "Usage" in result.stdout diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_commands/test_index/test_tutorial005.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_commands/test_index/test_tutorial005.py new file mode 100644 index 0000000000000000000000000000000000000000..4f97c74ad927168de263dd241008cc0f0a29c875 --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_commands/test_index/test_tutorial005.py @@ -0,0 +1,24 @@ +from typer.testing import CliRunner + +from docs_src.commands.index import tutorial005 as mod + +app = mod.app +runner = CliRunner() + + +def test_creates_successfully(): + """Verify the example runs without errors""" + result = runner.invoke(app, ["create"]) + assert result.exit_code == 0 + assert "Creating..." in result.output + + result = runner.invoke(app, ["delete"]) + assert result.exit_code == 0 + assert "Deleting..." in result.output + + +def test_shows_suggestion(): + """Verify command suggestions appear for typos""" + result = runner.invoke(app, ["crate"]) + assert result.exit_code != 0 + assert "Did you mean 'create'?" in result.output diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_commands/test_name/__init__.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_commands/test_name/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_commands/test_name/test_tutorial001.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_commands/test_name/test_tutorial001.py new file mode 100644 index 0000000000000000000000000000000000000000..03ac8f205eb4e7ceaf62b1d524c22b7631583782 --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_commands/test_name/test_tutorial001.py @@ -0,0 +1,39 @@ +import subprocess +import sys + +from typer.testing import CliRunner + +from docs_src.commands.name import tutorial001 as mod + +app = mod.app + +runner = CliRunner() + + +def test_help(): + result = runner.invoke(app, ["--help"]) + assert result.exit_code == 0 + assert "Commands" in result.output + assert "create" in result.output + assert "delete" in result.output + + +def test_create(): + result = runner.invoke(app, ["create", "Camila"]) + assert result.exit_code == 0 + assert "Creating user: Camila" in result.output + + +def test_delete(): + result = runner.invoke(app, ["delete", "Camila"]) + assert result.exit_code == 0 + assert "Deleting user: Camila" in result.output + + +def test_script(): + result = subprocess.run( + [sys.executable, "-m", "coverage", "run", mod.__file__, "--help"], + capture_output=True, + encoding="utf-8", + ) + assert "Usage" in result.stdout diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_commands/test_one_or_multiple/__init__.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_commands/test_one_or_multiple/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_commands/test_one_or_multiple/test_tutorial001.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_commands/test_one_or_multiple/test_tutorial001.py new file mode 100644 index 0000000000000000000000000000000000000000..09decc74a2482cbe0e61cf0e400f6ae2cba01659 --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_commands/test_one_or_multiple/test_tutorial001.py @@ -0,0 +1,32 @@ +import subprocess +import sys + +from typer.testing import CliRunner + +from docs_src.commands.one_or_multiple import tutorial001 as mod + +app = mod.app + +runner = CliRunner() + + +def test_help(): + result = runner.invoke(app, ["--help"]) + assert result.exit_code == 0 + assert "Commands" in result.output + assert "create" in result.output + + +def test_command(): + result = runner.invoke(app, ["create"]) + assert result.exit_code == 0 + assert "Creating user: Hiro Hamada" in result.output + + +def test_script(): + result = subprocess.run( + [sys.executable, "-m", "coverage", "run", mod.__file__, "--help"], + capture_output=True, + encoding="utf-8", + ) + assert "Usage" in result.stdout diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_commands/test_one_or_multiple/test_tutorial002.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_commands/test_one_or_multiple/test_tutorial002.py new file mode 100644 index 0000000000000000000000000000000000000000..36c796bd5cdb4fce8bba76327d48e2ec66c4c1a4 --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_commands/test_one_or_multiple/test_tutorial002.py @@ -0,0 +1,34 @@ +import subprocess +import sys + +from typer.testing import CliRunner + +from docs_src.commands.one_or_multiple import tutorial002 as mod + +app = mod.app + +runner = CliRunner() + + +def test_help(): + result = runner.invoke(app, ["--help"]) + assert result.exit_code == 0 + assert "Creates a single user Hiro Hamada." in result.output + assert "In the next version it will create 5 more users." in result.output + assert "Commands" in result.output + assert "create" in result.output + + +def test_command(): + result = runner.invoke(app, ["create"]) + assert result.exit_code == 0 + assert "Creating user: Hiro Hamada" in result.output + + +def test_script(): + result = subprocess.run( + [sys.executable, "-m", "coverage", "run", mod.__file__, "--help"], + capture_output=True, + encoding="utf-8", + ) + assert "Usage" in result.stdout diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_commands/test_options/__init__.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_commands/test_options/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_commands/test_options/test_tutorial001.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_commands/test_options/test_tutorial001.py new file mode 100644 index 0000000000000000000000000000000000000000..955447f1562c8929c6cd299adc7d2ae58d40b799 --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_commands/test_options/test_tutorial001.py @@ -0,0 +1,76 @@ +import subprocess +import sys + +from typer.testing import CliRunner + +from docs_src.commands.options import tutorial001 as mod + +app = mod.app + +runner = CliRunner() + + +def test_help(): + result = runner.invoke(app, ["--help"]) + assert result.exit_code == 0 + assert "Commands" in result.output + assert "create" in result.output + assert "delete" in result.output + assert "delete-all" in result.output + assert "init" in result.output + + +def test_create(): + result = runner.invoke(app, ["create", "Camila"]) + assert result.exit_code == 0 + assert "Creating user: Camila" in result.output + + +def test_delete(): + result = runner.invoke(app, ["delete", "Camila"], input="y\n") + assert result.exit_code == 0 + assert "Are you sure you want to delete the user? [y/n]:" in result.output + assert "Deleting user: Camila" in result.output + + +def test_no_delete(): + result = runner.invoke(app, ["delete", "Camila"], input="n\n") + assert result.exit_code == 0 + assert "Are you sure you want to delete the user? [y/n]:" in result.output + assert "Operation cancelled" in result.output + + +def test_delete_all(): + result = runner.invoke(app, ["delete-all"], input="y\n") + assert result.exit_code == 0 + assert "Are you sure you want to delete ALL users? [y/n]:" in result.output + assert "Deleting all users" in result.output + + +def test_no_delete_all(): + result = runner.invoke(app, ["delete-all"], input="n\n") + assert result.exit_code == 0 + assert "Are you sure you want to delete ALL users? [y/n]:" in result.output + assert "Operation cancelled" in result.output + + +def test_delete_all_force(): + result = runner.invoke(app, ["delete-all", "--force"]) + assert result.exit_code == 0 + assert "Are you sure you want to delete ALL users? [y/n]:" not in result.output + assert "Deleting all users" in result.output + + +def test_init(): + result = runner.invoke(app, ["init"]) + assert result.exit_code == 0 + assert "Initializing user database" in result.output + + +def test_script(): + result = subprocess.run( + [sys.executable, "-m", "coverage", "run", mod.__file__, "--help"], + capture_output=True, + encoding="utf-8", + ) + assert "Usage" in result.stdout diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_commands/test_options/test_tutorial001_an.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_commands/test_options/test_tutorial001_an.py new file mode 100644 index 0000000000000000000000000000000000000000..51c6edfc034a578406bc5435001dd27987c428d5 --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_commands/test_options/test_tutorial001_an.py @@ -0,0 +1,76 @@ +import subprocess +import sys + +from typer.testing import CliRunner + +from docs_src.commands.options import tutorial001_an as mod + +app = mod.app + +runner = CliRunner() + + +def test_help(): + result = runner.invoke(app, ["--help"]) + assert result.exit_code == 0 + assert "Commands" in result.output + assert "create" in result.output + assert "delete" in result.output + assert "delete-all" in result.output + assert "init" in result.output + + +def test_create(): + result = runner.invoke(app, ["create", "Camila"]) + assert result.exit_code == 0 + assert "Creating user: Camila" in result.output + + +def test_delete(): + result = runner.invoke(app, ["delete", "Camila"], input="y\n") + assert result.exit_code == 0 + assert "Are you sure you want to delete the user? [y/n]:" in result.output + assert "Deleting user: Camila" in result.output + + +def test_no_delete(): + result = runner.invoke(app, ["delete", "Camila"], input="n\n") + assert result.exit_code == 0 + assert "Are you sure you want to delete the user? [y/n]:" in result.output + assert "Operation cancelled" in result.output + + +def test_delete_all(): + result = runner.invoke(app, ["delete-all"], input="y\n") + assert result.exit_code == 0 + assert "Are you sure you want to delete ALL users? [y/n]:" in result.output + assert "Deleting all users" in result.output + + +def test_no_delete_all(): + result = runner.invoke(app, ["delete-all"], input="n\n") + assert result.exit_code == 0 + assert "Are you sure you want to delete ALL users? [y/n]:" in result.output + assert "Operation cancelled" in result.output + + +def test_delete_all_force(): + result = runner.invoke(app, ["delete-all", "--force"]) + assert result.exit_code == 0 + assert "Are you sure you want to delete ALL users? [y/n]:" not in result.output + assert "Deleting all users" in result.output + + +def test_init(): + result = runner.invoke(app, ["init"]) + assert result.exit_code == 0 + assert "Initializing user database" in result.output + + +def test_script(): + result = subprocess.run( + [sys.executable, "-m", "coverage", "run", mod.__file__, "--help"], + capture_output=True, + encoding="utf-8", + ) + assert "Usage" in result.stdout diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_exceptions/__init__.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_exceptions/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_exceptions/test_tutorial001.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_exceptions/test_tutorial001.py new file mode 100644 index 0000000000000000000000000000000000000000..26b6ca943c0142f1834b5a4c2c5f110d53b423f6 --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_exceptions/test_tutorial001.py @@ -0,0 +1,51 @@ +import os +import subprocess +import sys +from pathlib import Path + +from typer.testing import CliRunner + +from docs_src.exceptions import tutorial001 as mod + +runner = CliRunner() + + +def test_traceback_rich(): + file_path = Path(mod.__file__) + result = subprocess.run( + [sys.executable, "-m", "coverage", "run", str(file_path)], + capture_output=True, + encoding="utf-8", + env={**os.environ, "_TYPER_STANDARD_TRACEBACK": ""}, + ) + assert "return get_command(self)(*args, **kwargs)" not in result.stderr + + assert "typer.run(main)" not in result.stderr + assert "print(name + 3)" in result.stderr + assert 'TypeError: can only concatenate str (not "int") to str' in result.stderr + assert "name = 'morty'" in result.stderr + + +def test_standard_traceback_env_var(): + file_path = Path(mod.__file__) + result = subprocess.run( + [sys.executable, "-m", "coverage", "run", str(file_path)], + capture_output=True, + encoding="utf-8", + env={**os.environ, "_TYPER_STANDARD_TRACEBACK": "1"}, + ) + assert "return get_command(self)(*args, **kwargs)" in result.stderr + + assert "typer.run(main)" in result.stderr + assert "print(name + 3)" in result.stderr + assert 'TypeError: can only concatenate str (not "int") to str' in result.stderr + assert "name = 'morty'" not in result.stderr + + +def test_script(): + result = subprocess.run( + [sys.executable, "-m", "coverage", "run", mod.__file__, "--help"], + capture_output=True, + encoding="utf-8", + ) + assert "Usage" in result.stdout diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_exceptions/test_tutorial002.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_exceptions/test_tutorial002.py new file mode 100644 index 0000000000000000000000000000000000000000..0bcf3671f848d55890a11be43859d59d7d5a3b04 --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_exceptions/test_tutorial002.py @@ -0,0 +1,51 @@ +import os +import subprocess +import sys +from pathlib import Path + +from typer.testing import CliRunner + +from docs_src.exceptions import tutorial002 as mod + +runner = CliRunner() + + +def test_traceback_rich(): + file_path = Path(mod.__file__) + result = subprocess.run( + [sys.executable, "-m", "coverage", "run", str(file_path), "secret"], + capture_output=True, + encoding="utf-8", + env={**os.environ, "_TYPER_STANDARD_TRACEBACK": ""}, + ) + assert "return get_command(self)(*args, **kwargs)" not in result.stderr + + assert "app()" not in result.stderr + assert "print(password + 3)" in result.stderr + assert 'TypeError: can only concatenate str (not "int") to str' in result.stderr + assert "name = 'morty'" not in result.stderr + + +def test_standard_traceback_env_var(): + file_path = Path(mod.__file__) + result = subprocess.run( + [sys.executable, "-m", "coverage", "run", str(file_path), "secret"], + capture_output=True, + encoding="utf-8", + env={**os.environ, "_TYPER_STANDARD_TRACEBACK": "1"}, + ) + assert "return get_command(self)(*args, **kwargs)" in result.stderr + + assert "app()" in result.stderr + assert "print(password + 3)" in result.stderr + assert 'TypeError: can only concatenate str (not "int") to str' in result.stderr + assert "name = 'morty'" not in result.stderr + + +def test_script(): + result = subprocess.run( + [sys.executable, "-m", "coverage", "run", mod.__file__, "--help"], + capture_output=True, + encoding="utf-8", + ) + assert "Usage" in result.stdout diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_exceptions/test_tutorial003.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_exceptions/test_tutorial003.py new file mode 100644 index 0000000000000000000000000000000000000000..2c3ed634cd46289a10f8394e322a66c64333c840 --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_exceptions/test_tutorial003.py @@ -0,0 +1,35 @@ +import os +import subprocess +import sys +from pathlib import Path + +from typer.testing import CliRunner + +from docs_src.exceptions import tutorial003 as mod + +runner = CliRunner() + + +def test_traceback_rich_pretty_short_disable(): + file_path = Path(mod.__file__) + result = subprocess.run( + [sys.executable, "-m", "coverage", "run", str(file_path)], + capture_output=True, + encoding="utf-8", + env={**os.environ, "_TYPER_STANDARD_TRACEBACK": ""}, + ) + assert "return get_command(self)(*args, **kwargs)" not in result.stderr + + assert "app()" in result.stderr + assert "print(name + 3)" in result.stderr + assert 'TypeError: can only concatenate str (not "int") to str' in result.stderr + assert "name = 'morty'" in result.stderr + + +def test_script(): + result = subprocess.run( + [sys.executable, "-m", "coverage", "run", mod.__file__, "--help"], + capture_output=True, + encoding="utf-8", + ) + assert "Usage" in result.stdout diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_exceptions/test_tutorial004.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_exceptions/test_tutorial004.py new file mode 100644 index 0000000000000000000000000000000000000000..c48c4bad612fbdf5e212acb8ab68073351d0ab76 --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_exceptions/test_tutorial004.py @@ -0,0 +1,34 @@ +import os +import subprocess +import sys +from pathlib import Path + +from typer.testing import CliRunner + +from docs_src.exceptions import tutorial004 as mod + +runner = CliRunner() + + +def test_rich_pretty_exceptions_disable(): + file_path = Path(mod.__file__) + result = subprocess.run( + [sys.executable, "-m", "coverage", "run", str(file_path)], + capture_output=True, + encoding="utf-8", + env={**os.environ, "_TYPER_STANDARD_TRACEBACK": ""}, + ) + assert "return get_command(self)(*args, **kwargs)" in result.stderr + + assert "app()" in result.stderr + assert "print(name + 3)" in result.stderr + assert 'TypeError: can only concatenate str (not "int") to str' in result.stderr + + +def test_script(): + result = subprocess.run( + [sys.executable, "-m", "coverage", "run", mod.__file__, "--help"], + capture_output=True, + encoding="utf-8", + ) + assert "Usage" in result.stdout diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_first_steps/__init__.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_first_steps/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_first_steps/test_tutorial001.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_first_steps/test_tutorial001.py new file mode 100644 index 0000000000000000000000000000000000000000..9392282297d34519e7bfc9f4b696f8bbd7d52a83 --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_first_steps/test_tutorial001.py @@ -0,0 +1,25 @@ +import subprocess +import sys + +import typer +from typer.testing import CliRunner + +from docs_src.first_steps import tutorial001 as mod + +runner = CliRunner() + + +def test_cli(): + app = typer.Typer() + app.command()(mod.main) + result = runner.invoke(app, []) + assert result.output == "Hello World\n" + + +def test_script(): + result = subprocess.run( + [sys.executable, "-m", "coverage", "run", mod.__file__, "--help"], + capture_output=True, + encoding="utf-8", + ) + assert "Usage" in result.stdout diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_first_steps/test_tutorial002.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_first_steps/test_tutorial002.py new file mode 100644 index 0000000000000000000000000000000000000000..766819b51f3cff414958cacadf374530ad8c10ea --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_first_steps/test_tutorial002.py @@ -0,0 +1,33 @@ +import subprocess +import sys + +import typer +from typer.testing import CliRunner + +from docs_src.first_steps import tutorial002 as mod + +runner = CliRunner() + +app = typer.Typer() +app.command()(mod.main) + + +def test_1(): + result = runner.invoke(app, []) + assert result.exit_code != 0 + assert "Missing argument 'NAME'" in result.output + + +def test_2(): + result = runner.invoke(app, ["Camila"]) + assert result.exit_code == 0 + assert "Hello Camila" in result.output + + +def test_script(): + result = subprocess.run( + [sys.executable, "-m", "coverage", "run", mod.__file__, "--help"], + capture_output=True, + encoding="utf-8", + ) + assert "Usage" in result.stdout diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_first_steps/test_tutorial003.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_first_steps/test_tutorial003.py new file mode 100644 index 0000000000000000000000000000000000000000..d29c798506733a634a22c9fd8e97a218d566b106 --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_first_steps/test_tutorial003.py @@ -0,0 +1,33 @@ +import subprocess +import sys + +import typer +from typer.testing import CliRunner + +from docs_src.first_steps import tutorial003 as mod + +runner = CliRunner() + +app = typer.Typer() +app.command()(mod.main) + + +def test_1(): + result = runner.invoke(app, ["Camila"]) + assert result.exit_code != 0 + assert "Missing argument 'LASTNAME'" in result.output + + +def test_2(): + result = runner.invoke(app, ["Camila", "GutiĆ©rrez"]) + assert result.exit_code == 0 + assert "Hello Camila GutiĆ©rrez" in result.output + + +def test_script(): + result = subprocess.run( + [sys.executable, "-m", "coverage", "run", mod.__file__, "--help"], + capture_output=True, + encoding="utf-8", + ) + assert "Usage" in result.stdout diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_first_steps/test_tutorial004.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_first_steps/test_tutorial004.py new file mode 100644 index 0000000000000000000000000000000000000000..d7f259fbebccade4ffa7f7746521813ccdd02a9a --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_first_steps/test_tutorial004.py @@ -0,0 +1,57 @@ +import subprocess +import sys + +import typer +from typer.testing import CliRunner + +from docs_src.first_steps import tutorial004 as mod + +runner = CliRunner() + +app = typer.Typer() +app.command()(mod.main) + + +def test_help(): + result = runner.invoke(app, ["--help"]) + assert result.exit_code == 0 + assert "Arguments" in result.output + assert "NAME" in result.output + assert "[required]" in result.output + assert "LASTNAME" in result.output + assert "[required]" in result.output + assert "--formal" in result.output + assert "--no-formal" in result.output + + +def test_1(): + result = runner.invoke(app, ["Camila", "GutiĆ©rrez"]) + assert result.exit_code == 0 + assert "Hello Camila GutiĆ©rrez" in result.output + + +def test_formal_1(): + result = runner.invoke(app, ["Camila", "GutiĆ©rrez", "--formal"]) + assert result.exit_code == 0 + assert "Good day Ms. Camila GutiĆ©rrez." in result.output + + +def test_formal_2(): + result = runner.invoke(app, ["Camila", "--formal", "GutiĆ©rrez"]) + assert result.exit_code == 0 + assert "Good day Ms. Camila GutiĆ©rrez." in result.output + + +def test_formal_3(): + result = runner.invoke(app, ["--formal", "Camila", "GutiĆ©rrez"]) + assert result.exit_code == 0 + assert "Good day Ms. Camila GutiĆ©rrez." in result.output + + +def test_script(): + result = subprocess.run( + [sys.executable, "-m", "coverage", "run", mod.__file__, "--help"], + capture_output=True, + encoding="utf-8", + ) + assert "Usage" in result.stdout diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_first_steps/test_tutorial005.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_first_steps/test_tutorial005.py new file mode 100644 index 0000000000000000000000000000000000000000..6098bd00beca7bb355abeda79a53182eb4e34473 --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_first_steps/test_tutorial005.py @@ -0,0 +1,57 @@ +import subprocess +import sys + +import typer +from typer.testing import CliRunner + +from docs_src.first_steps import tutorial005 as mod + +runner = CliRunner() + +app = typer.Typer() +app.command()(mod.main) + + +def test_help(): + result = runner.invoke(app, ["--help"]) + assert result.exit_code == 0 + assert "Arguments" in result.output + assert "NAME" in result.output + assert "[required]" in result.output + assert "--lastname" in result.output + assert "TEXT" in result.output + assert "--formal" in result.output + assert "--no-formal" in result.output + + +def test_1(): + result = runner.invoke(app, ["Camila"]) + assert result.exit_code == 0 + assert "Hello Camila" in result.output + + +def test_option_lastname(): + result = runner.invoke(app, ["Camila", "--lastname", "GutiĆ©rrez"]) + assert result.exit_code == 0 + assert "Hello Camila GutiĆ©rrez" in result.output + + +def test_option_lastname_2(): + result = runner.invoke(app, ["--lastname", "GutiĆ©rrez", "Camila"]) + assert result.exit_code == 0 + assert "Hello Camila GutiĆ©rrez" in result.output + + +def test_formal_1(): + result = runner.invoke(app, ["Camila", "--lastname", "GutiĆ©rrez", "--formal"]) + assert result.exit_code == 0 + assert "Good day Ms. Camila GutiĆ©rrez." in result.output + + +def test_script(): + result = subprocess.run( + [sys.executable, "-m", "coverage", "run", mod.__file__, "--help"], + capture_output=True, + encoding="utf-8", + ) + assert "Usage" in result.stdout diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_first_steps/test_tutorial006.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_first_steps/test_tutorial006.py new file mode 100644 index 0000000000000000000000000000000000000000..2234c47f6340f4d60b4315083f028676bb6dcd70 --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_first_steps/test_tutorial006.py @@ -0,0 +1,52 @@ +import subprocess +import sys + +import typer +from typer.testing import CliRunner + +from docs_src.first_steps import tutorial006 as mod + +runner = CliRunner() + +app = typer.Typer() +app.command()(mod.main) + + +def test_help(): + result = runner.invoke(app, ["--help"]) + assert result.exit_code == 0 + assert "Say hi to NAME, optionally with a --lastname." in result.output + assert "If --formal is used, say hi very formally." in result.output + + +def test_1(): + result = runner.invoke(app, ["Camila"]) + assert result.exit_code == 0 + assert "Hello Camila" in result.output + + +def test_option_lastname(): + result = runner.invoke(app, ["Camila", "--lastname", "GutiĆ©rrez"]) + assert result.exit_code == 0 + assert "Hello Camila GutiĆ©rrez" in result.output + + +def test_option_lastname_2(): + result = runner.invoke(app, ["--lastname", "GutiĆ©rrez", "Camila"]) + assert result.exit_code == 0 + assert "Hello Camila GutiĆ©rrez" in result.output + + +def test_formal_1(): + result = runner.invoke(app, ["Camila", "--lastname", "GutiĆ©rrez", "--formal"]) + assert result.exit_code == 0 + assert "Good day Ms. Camila GutiĆ©rrez." in result.output + + +def test_script(): + result = subprocess.run( + [sys.executable, "-m", "coverage", "run", mod.__file__, "--help"], + capture_output=True, + encoding="utf-8", + ) + assert "Usage" in result.stdout diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_multiple_values/__init__.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_multiple_values/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_multiple_values/test_arguments_with_multiple_values/__init__.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_multiple_values/test_arguments_with_multiple_values/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_multiple_values/test_arguments_with_multiple_values/test_tutorial001.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_multiple_values/test_arguments_with_multiple_values/test_tutorial001.py new file mode 100644 index 0000000000000000000000000000000000000000..4241130c1f65eb9c69bb787a859b81a97de22723 --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_multiple_values/test_arguments_with_multiple_values/test_tutorial001.py @@ -0,0 +1,27 @@ +import subprocess +import sys + +import typer +from typer.testing import CliRunner + +from docs_src.multiple_values.arguments_with_multiple_values import tutorial001 as mod + +runner = CliRunner() +app = typer.Typer() +app.command()(mod.main) + + +def test_main(): + result = runner.invoke(app, ["README.md", "pyproject.toml", "woohoo!"]) + assert result.exit_code == 0 + assert "This file exists: README.md\nwoohoo!" in result.output + assert "This file exists: pyproject.toml\nwoohoo!" in result.output + + +def test_script(): + result = subprocess.run( + [sys.executable, "-m", "coverage", "run", mod.__file__, "--help"], + capture_output=True, + encoding="utf-8", + ) + assert "Usage" in result.stdout diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_multiple_values/test_arguments_with_multiple_values/test_tutorial002.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_multiple_values/test_arguments_with_multiple_values/test_tutorial002.py new file mode 100644 index 0000000000000000000000000000000000000000..05ef53c23dd87ab01fde5e72f0390b1b92263702 --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_multiple_values/test_arguments_with_multiple_values/test_tutorial002.py @@ -0,0 +1,50 @@ +import subprocess +import sys + +import typer +from typer.testing import CliRunner + +from docs_src.multiple_values.arguments_with_multiple_values import tutorial002 as mod + +runner = CliRunner() +app = typer.Typer() +app.command()(mod.main) + + +def test_help(): + result = runner.invoke(app, ["--help"]) + assert result.exit_code == 0 + assert "[OPTIONS] [NAMES]..." in result.output + assert "Arguments" in result.output + assert "[default: Harry, Hermione, Ron]" in result.output + + +def test_defaults(): + result = runner.invoke(app) + assert result.exit_code == 0 + assert "Hello Harry" in result.output + assert "Hello Hermione" in result.output + assert "Hello Ron" in result.output + + +def test_invalid_args(): + result = runner.invoke(app, ["Draco", "Hagrid"]) + assert result.exit_code != 0 + assert "Argument 'names' takes 3 values" in result.output + + +def test_valid_args(): + result = runner.invoke(app, ["Draco", "Hagrid", "Dobby"]) + assert result.exit_code == 0 + assert "Hello Draco" in result.stdout + assert "Hello Hagrid" in result.stdout + assert "Hello Dobby" in result.stdout + + +def test_script(): + result = subprocess.run( + [sys.executable, "-m", "coverage", "run", mod.__file__, "--help"], + capture_output=True, + encoding="utf-8", + ) + assert "Usage" in result.stdout diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_multiple_values/test_arguments_with_multiple_values/test_tutorial002_an.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_multiple_values/test_arguments_with_multiple_values/test_tutorial002_an.py new file mode 100644 index 0000000000000000000000000000000000000000..add4f8991ab754a569700f15debf4ef1a44278e4 --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_multiple_values/test_arguments_with_multiple_values/test_tutorial002_an.py @@ -0,0 +1,52 @@ +import subprocess +import sys + +import typer +from typer.testing import CliRunner + +from docs_src.multiple_values.arguments_with_multiple_values import ( + tutorial002_an as mod, +) + +runner = CliRunner() +app = typer.Typer() +app.command()(mod.main) + + +def test_help(): + result = runner.invoke(app, ["--help"]) + assert result.exit_code == 0 + assert "[OPTIONS] [NAMES]..." in result.output + assert "Arguments" in result.output + assert "[default: Harry, Hermione, Ron]" in result.output + + +def test_defaults(): + result = runner.invoke(app) + assert result.exit_code == 0 + assert "Hello Harry" in result.output + assert "Hello Hermione" in result.output + assert "Hello Ron" in result.output + + +def test_invalid_args(): + result = runner.invoke(app, ["Draco", "Hagrid"]) + assert result.exit_code != 0 + assert "Argument 'names' takes 3 values" in result.output + + +def test_valid_args(): + result = runner.invoke(app, ["Draco", "Hagrid", "Dobby"]) + assert result.exit_code == 0 + assert "Hello Draco" in result.stdout + assert "Hello Hagrid" in result.stdout + assert "Hello Dobby" in result.stdout + + +def test_script(): + result = subprocess.run( + [sys.executable, "-m", "coverage", "run", mod.__file__, "--help"], + capture_output=True, + encoding="utf-8", + ) + assert "Usage" in result.stdout diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_multiple_values/test_multiple_options/__init__.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_multiple_values/test_multiple_options/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_multiple_values/test_multiple_options/test_tutorial001.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_multiple_values/test_multiple_options/test_tutorial001.py new file mode 100644 index 0000000000000000000000000000000000000000..0086df3b80fcbaf576384c87c86ea734bf27e135 --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_multiple_values/test_multiple_options/test_tutorial001.py @@ -0,0 +1,44 @@ +import subprocess +import sys + +import typer +from typer.testing import CliRunner + +from docs_src.multiple_values.multiple_options import tutorial001 as mod + +runner = CliRunner() +app = typer.Typer() +app.command()(mod.main) + + +def test_main(): + result = runner.invoke(app) + assert result.exit_code != 0 + assert "No provided users" in result.output + assert "raw input = None" in result.output + assert "Aborted" in result.output + + +def test_1_user(): + result = runner.invoke(app, ["--user", "Camila"]) + assert result.exit_code == 0 + assert "Processing user: Camila" in result.output + + +def test_3_user(): + result = runner.invoke( + app, ["--user", "Camila", "--user", "Rick", "--user", "Morty"] + ) + assert result.exit_code == 0 + assert "Processing user: Camila" in result.output + assert "Processing user: Rick" in result.output + assert "Processing user: Morty" in result.output + + +def test_script(): + result = subprocess.run( + [sys.executable, "-m", "coverage", "run", mod.__file__, "--help"], + capture_output=True, + encoding="utf-8", + ) + assert "Usage" in result.stdout diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_multiple_values/test_multiple_options/test_tutorial001_an.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_multiple_values/test_multiple_options/test_tutorial001_an.py new file mode 100644 index 0000000000000000000000000000000000000000..fa2ae4497c4f1517df14cad4ac6d05d545c97670 --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_multiple_values/test_multiple_options/test_tutorial001_an.py @@ -0,0 +1,44 @@ +import subprocess +import sys + +import typer +from typer.testing import CliRunner + +from docs_src.multiple_values.multiple_options import tutorial001_an as mod + +runner = CliRunner() +app = typer.Typer() +app.command()(mod.main) + + +def test_main(): + result = runner.invoke(app) + assert result.exit_code != 0 + assert "No provided users" in result.output + assert "raw input = None" in result.output + assert "Aborted" in result.output + + +def test_1_user(): + result = runner.invoke(app, ["--user", "Camila"]) + assert result.exit_code == 0 + assert "Processing user: Camila" in result.output + + +def test_3_user(): + result = runner.invoke( + app, ["--user", "Camila", "--user", "Rick", "--user", "Morty"] + ) + assert result.exit_code == 0 + assert "Processing user: Camila" in result.output + assert "Processing user: Rick" in result.output + assert "Processing user: Morty" in result.output + + +def test_script(): + result = subprocess.run( + [sys.executable, "-m", "coverage", "run", mod.__file__, "--help"], + capture_output=True, + encoding="utf-8", + ) + assert "Usage" in result.stdout diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_multiple_values/test_multiple_options/test_tutorial002.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_multiple_values/test_multiple_options/test_tutorial002.py new file mode 100644 index 0000000000000000000000000000000000000000..79aaaaef81a87af116cdf35cb6f7e00041d1d321 --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_multiple_values/test_multiple_options/test_tutorial002.py @@ -0,0 +1,38 @@ +import subprocess +import sys + +import typer +from typer.testing import CliRunner + +from docs_src.multiple_values.multiple_options import tutorial002 as mod + +runner = CliRunner() +app = typer.Typer() +app.command()(mod.main) + + +def test_main(): + result = runner.invoke(app) + assert result.exit_code == 0 + assert "The sum is 0" in result.output + + +def test_1_number(): + result = runner.invoke(app, ["--number", "2"]) + assert result.exit_code == 0 + assert "The sum is 2.0" in result.output + + +def test_2_number(): + result = runner.invoke(app, ["--number", "2", "--number", "3", "--number", "4.5"]) + assert result.exit_code == 0 + assert "The sum is 9.5" in result.output + + +def test_script(): + result = subprocess.run( + [sys.executable, "-m", "coverage", "run", mod.__file__, "--help"], + capture_output=True, + encoding="utf-8", + ) + assert "Usage" in result.stdout diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_multiple_values/test_multiple_options/test_tutorial002_an.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_multiple_values/test_multiple_options/test_tutorial002_an.py new file mode 100644 index 0000000000000000000000000000000000000000..c52f9352a494f99d974c6691a247ef5e9f318492 --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_multiple_values/test_multiple_options/test_tutorial002_an.py @@ -0,0 +1,38 @@ +import subprocess +import sys + +import typer +from typer.testing import CliRunner + +from docs_src.multiple_values.multiple_options import tutorial002_an as mod + +runner = CliRunner() +app = typer.Typer() +app.command()(mod.main) + + +def test_main(): + result = runner.invoke(app) + assert result.exit_code == 0 + assert "The sum is 0" in result.output + + +def test_1_number(): + result = runner.invoke(app, ["--number", "2"]) + assert result.exit_code == 0 + assert "The sum is 2.0" in result.output + + +def test_2_number(): + result = runner.invoke(app, ["--number", "2", "--number", "3", "--number", "4.5"]) + assert result.exit_code == 0 + assert "The sum is 9.5" in result.output + + +def test_script(): + result = subprocess.run( + [sys.executable, "-m", "coverage", "run", mod.__file__, "--help"], + capture_output=True, + encoding="utf-8", + ) + assert "Usage" in result.stdout diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_multiple_values/test_options_with_multiple_values/__init__.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_multiple_values/test_options_with_multiple_values/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_multiple_values/test_options_with_multiple_values/test_tutorial001.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_multiple_values/test_options_with_multiple_values/test_tutorial001.py new file mode 100644 index 0000000000000000000000000000000000000000..c225665e6b0218da10304ec0b002fb21e7665c6d --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_multiple_values/test_options_with_multiple_values/test_tutorial001.py @@ -0,0 +1,47 @@ +import subprocess +import sys + +import typer +from typer.testing import CliRunner + +from docs_src.multiple_values.options_with_multiple_values import tutorial001 as mod + +runner = CliRunner() +app = typer.Typer() +app.command()(mod.main) + + +def test_main(): + result = runner.invoke(app) + assert result.exit_code != 0 + assert "No user provided" in result.output + assert "Aborted" in result.output + + +def test_user_1(): + result = runner.invoke(app, ["--user", "Camila", "50", "yes"]) + assert result.exit_code == 0 + assert "The username Camila has 50 coins" in result.output + assert "And this user is a wizard!" in result.output + + +def test_user_2(): + result = runner.invoke(app, ["--user", "Morty", "3", "no"]) + assert result.exit_code == 0 + assert "The username Morty has 3 coins" in result.output + assert "And this user is a wizard!" not in result.output + + +def test_invalid_user(): + result = runner.invoke(app, ["--user", "Camila", "50"]) + assert result.exit_code != 0 + assert "Option '--user' requires 3 arguments" in result.output + + +def test_script(): + result = subprocess.run( + [sys.executable, "-m", "coverage", "run", mod.__file__, "--help"], + capture_output=True, + encoding="utf-8", + ) + assert "Usage" in result.stdout diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_multiple_values/test_options_with_multiple_values/test_tutorial001_an.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_multiple_values/test_options_with_multiple_values/test_tutorial001_an.py new file mode 100644 index 0000000000000000000000000000000000000000..44ae98c786f7179f04f831d7a030fe15f6747fe4 --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_multiple_values/test_options_with_multiple_values/test_tutorial001_an.py @@ -0,0 +1,47 @@ +import subprocess +import sys + +import typer +from typer.testing import CliRunner + +from docs_src.multiple_values.options_with_multiple_values import tutorial001_an as mod + +runner = CliRunner() +app = typer.Typer() +app.command()(mod.main) + + +def test_main(): + result = runner.invoke(app) + assert result.exit_code != 0 + assert "No user provided" in result.output + assert "Aborted" in result.output + + +def test_user_1(): + result = runner.invoke(app, ["--user", "Camila", "50", "yes"]) + assert result.exit_code == 0 + assert "The username Camila has 50 coins" in result.output + assert "And this user is a wizard!" in result.output + + +def test_user_2(): + result = runner.invoke(app, ["--user", "Morty", "3", "no"]) + assert result.exit_code == 0 + assert "The username Morty has 3 coins" in result.output + assert "And this user is a wizard!" not in result.output + + +def test_invalid_user(): + result = runner.invoke(app, ["--user", "Camila", "50"]) + assert result.exit_code != 0 + assert "Option '--user' requires 3 arguments" in result.output + + +def test_script(): + result = subprocess.run( + [sys.executable, "-m", "coverage", "run", mod.__file__, "--help"], + capture_output=True, + encoding="utf-8", + ) + assert "Usage" in result.stdout diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_one_file_per_command/__init__.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_one_file_per_command/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_one_file_per_command/test_tutorial.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_one_file_per_command/test_tutorial.py new file mode 100644 index 0000000000000000000000000000000000000000..b37e7d8a72d6a19b2770ceef3461c4547b52230b --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_one_file_per_command/test_tutorial.py @@ -0,0 +1,44 @@ +from typer.testing import CliRunner + +from docs_src.one_file_per_command import main as mod + +runner = CliRunner() + + +def test_help(): + result = runner.invoke(mod.app, ["--help"]) + + assert result.exit_code == 0 + + assert "version" in result.output + assert "users" in result.output + + +def test_version(): + result = runner.invoke(mod.app, ["version"]) + + assert result.exit_code == 0 + assert "My CLI Version 1.0" in result.output + + +def test_users_help(): + result = runner.invoke(mod.app, ["users", "--help"]) + + assert result.exit_code == 0 + + assert "add" in result.output + assert "delete" in result.output + + +def test_add_user(): + result = runner.invoke(mod.app, ["users", "add", "Camila"]) + + assert result.exit_code == 0 + assert "Adding user: Camila" in result.output + + +def test_delete_user(): + result = runner.invoke(mod.app, ["users", "delete", "Camila"]) + + assert result.exit_code == 0 + assert "Deleting user: Camila" in result.output diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_options/__init__.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_options/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_options/test_callback/__init__.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_options/test_callback/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_options/test_callback/test_tutorial001.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_options/test_callback/test_tutorial001.py new file mode 100644 index 0000000000000000000000000000000000000000..0a8b79ba271c6b2dd8118edfe17578cf56fa6a2b --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_options/test_callback/test_tutorial001.py @@ -0,0 +1,34 @@ +import subprocess +import sys + +import typer +from typer.testing import CliRunner + +from docs_src.options.callback import tutorial001 as mod + +runner = CliRunner() + +app = typer.Typer() +app.command()(mod.main) + + +def test_1(): + result = runner.invoke(app, ["--name", "Camila"]) + assert result.exit_code == 0 + assert "Hello Camila" in result.output + + +def test_2(): + result = runner.invoke(app, ["--name", "rick"]) + assert result.exit_code != 0 + assert "Invalid value for '--name'" in result.output + assert "Only Camila is allowed" in result.output + + +def test_script(): + result = subprocess.run( + [sys.executable, "-m", "coverage", "run", mod.__file__, "--help"], + capture_output=True, + encoding="utf-8", + ) + assert "Usage" in result.stdout diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_options/test_callback/test_tutorial001_an.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_options/test_callback/test_tutorial001_an.py new file mode 100644 index 0000000000000000000000000000000000000000..188f7cecf671be6e9372b7e9edae398dd1ddf41f --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_options/test_callback/test_tutorial001_an.py @@ -0,0 +1,34 @@ +import subprocess +import sys + +import typer +from typer.testing import CliRunner + +from docs_src.options.callback import tutorial001_an as mod + +runner = CliRunner() + +app = typer.Typer() +app.command()(mod.main) + + +def test_1(): + result = runner.invoke(app, ["--name", "Camila"]) + assert result.exit_code == 0 + assert "Hello Camila" in result.output + + +def test_2(): + result = runner.invoke(app, ["--name", "rick"]) + assert result.exit_code != 0 + assert "Invalid value for '--name'" in result.output + assert "Only Camila is allowed" in result.output + + +def test_script(): + result = subprocess.run( + [sys.executable, "-m", "coverage", "run", mod.__file__, "--help"], + capture_output=True, + encoding="utf-8", + ) + assert "Usage" in result.stdout diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_options/test_callback/test_tutorial003.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_options/test_callback/test_tutorial003.py new file mode 100644 index 0000000000000000000000000000000000000000..8bc3c967abfece3ca9aea00254172d265ab42711 --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_options/test_callback/test_tutorial003.py @@ -0,0 +1,51 @@ +import os +import subprocess +import sys + +import typer +from typer.testing import CliRunner + +from docs_src.options.callback import tutorial003 as mod + +runner = CliRunner() + +app = typer.Typer() +app.command()(mod.main) + + +def test_1(): + result = runner.invoke(app, ["--name", "Camila"]) + assert result.exit_code == 0 + assert "Validating name" in result.output + assert "Hello Camila" in result.output + + +def test_2(): + result = runner.invoke(app, ["--name", "rick"]) + assert result.exit_code != 0 + assert "Invalid value for '--name'" in result.output + assert "Only Camila is allowed" in result.output + + +def test_script(): + result = subprocess.run( + [sys.executable, "-m", "coverage", "run", mod.__file__, "--help"], + capture_output=True, + encoding="utf-8", + ) + assert "Usage" in result.stdout + + +def test_completion(): + result = subprocess.run( + [sys.executable, "-m", "coverage", "run", mod.__file__, " "], + capture_output=True, + encoding="utf-8", + env={ + **os.environ, + "_TUTORIAL003.PY_COMPLETE": "complete_bash", + "COMP_WORDS": "tutorial003.py --", + "COMP_CWORD": "1", + }, + ) + assert "--name" in result.stdout diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_options/test_callback/test_tutorial003_an.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_options/test_callback/test_tutorial003_an.py new file mode 100644 index 0000000000000000000000000000000000000000..c3ca675231c696d398d2202075f855fe438ec953 --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_options/test_callback/test_tutorial003_an.py @@ -0,0 +1,51 @@ +import os +import subprocess +import sys + +import typer +from typer.testing import CliRunner + +from docs_src.options.callback import tutorial003_an as mod + +runner = CliRunner() + +app = typer.Typer() +app.command()(mod.main) + + +def test_1(): + result = runner.invoke(app, ["--name", "Camila"]) + assert result.exit_code == 0 + assert "Validating name" in result.output + assert "Hello Camila" in result.output + + +def test_2(): + result = runner.invoke(app, ["--name", "rick"]) + assert result.exit_code != 0 + assert "Invalid value for '--name'" in result.output + assert "Only Camila is allowed" in result.output + + +def test_script(): + result = subprocess.run( + [sys.executable, "-m", "coverage", "run", mod.__file__, "--help"], + capture_output=True, + encoding="utf-8", + ) + assert "Usage" in result.stdout + + +def test_completion(): + result = subprocess.run( + [sys.executable, "-m", "coverage", "run", mod.__file__, " "], + capture_output=True, + encoding="utf-8", + env={ + **os.environ, + "_TUTORIAL003_AN.PY_COMPLETE": "complete_bash", + "COMP_WORDS": "tutorial003_an.py --", + "COMP_CWORD": "1", + }, + ) + assert "--name" in result.stdout diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_options/test_callback/test_tutorial004.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_options/test_callback/test_tutorial004.py new file mode 100644 index 0000000000000000000000000000000000000000..494a4f802b9ba91db7de9fea664d0b3a4bab0e90 --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_options/test_callback/test_tutorial004.py @@ -0,0 +1,51 @@ +import os +import subprocess +import sys + +import typer +from typer.testing import CliRunner + +from docs_src.options.callback import tutorial004 as mod + +runner = CliRunner() + +app = typer.Typer() +app.command()(mod.main) + + +def test_1(): + result = runner.invoke(app, ["--name", "Camila"]) + assert result.exit_code == 0 + assert "Validating param: name" in result.output + assert "Hello Camila" in result.output + + +def test_2(): + result = runner.invoke(app, ["--name", "rick"]) + assert result.exit_code != 0 + assert "Invalid value for '--name'" in result.output + assert "Only Camila is allowed" in result.output + + +def test_script(): + result = subprocess.run( + [sys.executable, "-m", "coverage", "run", mod.__file__, "--help"], + capture_output=True, + encoding="utf-8", + ) + assert "Usage" in result.stdout + + +def test_completion(): + result = subprocess.run( + [sys.executable, "-m", "coverage", "run", mod.__file__, " "], + capture_output=True, + encoding="utf-8", + env={ + **os.environ, + "_TUTORIAL004.PY_COMPLETE": "complete_bash", + "COMP_WORDS": "tutorial004.py --", + "COMP_CWORD": "1", + }, + ) + assert "--name" in result.stdout diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_options/test_callback/test_tutorial004_an.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_options/test_callback/test_tutorial004_an.py new file mode 100644 index 0000000000000000000000000000000000000000..1132d88f5ab58aafbfe26b7eefaed17e3bceef41 --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_options/test_callback/test_tutorial004_an.py @@ -0,0 +1,51 @@ +import os +import subprocess +import sys + +import typer +from typer.testing import CliRunner + +from docs_src.options.callback import tutorial004_an as mod + +runner = CliRunner() + +app = typer.Typer() +app.command()(mod.main) + + +def test_1(): + result = runner.invoke(app, ["--name", "Camila"]) + assert result.exit_code == 0 + assert "Validating param: name" in result.output + assert "Hello Camila" in result.output + + +def test_2(): + result = runner.invoke(app, ["--name", "rick"]) + assert result.exit_code != 0 + assert "Invalid value for '--name'" in result.output + assert "Only Camila is allowed" in result.output + + +def test_script(): + result = subprocess.run( + [sys.executable, "-m", "coverage", "run", mod.__file__, "--help"], + capture_output=True, + encoding="utf-8", + ) + assert "Usage" in result.stdout + + +def test_completion(): + result = subprocess.run( + [sys.executable, "-m", "coverage", "run", mod.__file__, " "], + capture_output=True, + encoding="utf-8", + env={ + **os.environ, + "_TUTORIAL004_AN.PY_COMPLETE": "complete_bash", + "COMP_WORDS": "tutorial004_an.py --", + "COMP_CWORD": "1", + }, + ) + assert "--name" in result.stdout diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_options/test_help/__init__.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_options/test_help/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_options/test_help/test_tutorial001.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_options/test_help/test_tutorial001.py new file mode 100644 index 0000000000000000000000000000000000000000..bc4d01fb36e5a79a8509121357e2bd823d8f47ae --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_options/test_help/test_tutorial001.py @@ -0,0 +1,48 @@ +import subprocess +import sys + +import typer +from typer.testing import CliRunner + +from docs_src.options.help import tutorial001 as mod + +runner = CliRunner() + +app = typer.Typer() +app.command()(mod.main) + + +def test_help(): + result = runner.invoke(app, ["--help"]) + assert result.exit_code == 0 + assert "Say hi to NAME, optionally with a --lastname." in result.output + assert "If --formal is used, say hi very formally." in result.output + assert "Last name of person to greet." in result.output + assert "Say hi formally." in result.output + + +def test_1(): + result = runner.invoke(app, ["Camila"]) + assert result.exit_code == 0 + assert "Hello Camila" in result.output + + +def test_option_lastname(): + result = runner.invoke(app, ["Camila", "--lastname", "GutiĆ©rrez"]) + assert result.exit_code == 0 + assert "Hello Camila GutiĆ©rrez" in result.output + + +def test_formal(): + result = runner.invoke(app, ["Camila", "--lastname", "GutiĆ©rrez", "--formal"]) + assert result.exit_code == 0 + assert "Good day Ms. Camila GutiĆ©rrez." in result.output + + +def test_script(): + result = subprocess.run( + [sys.executable, "-m", "coverage", "run", mod.__file__, "--help"], + capture_output=True, + encoding="utf-8", + ) + assert "Usage" in result.stdout diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_options/test_help/test_tutorial001_an.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_options/test_help/test_tutorial001_an.py new file mode 100644 index 0000000000000000000000000000000000000000..a1ea0be4a1ccf2f714884d021c5c8e4fae5044ac --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_options/test_help/test_tutorial001_an.py @@ -0,0 +1,48 @@ +import subprocess +import sys + +import typer +from typer.testing import CliRunner + +from docs_src.options.help import tutorial001_an as mod + +runner = CliRunner() + +app = typer.Typer() +app.command()(mod.main) + + +def test_help(): + result = runner.invoke(app, ["--help"]) + assert result.exit_code == 0 + assert "Say hi to NAME, optionally with a --lastname." in result.output + assert "If --formal is used, say hi very formally." in result.output + assert "Last name of person to greet." in result.output + assert "Say hi formally." in result.output + + +def test_1(): + result = runner.invoke(app, ["Camila"]) + assert result.exit_code == 0 + assert "Hello Camila" in result.output + + +def test_option_lastname(): + result = runner.invoke(app, ["Camila", "--lastname", "GutiĆ©rrez"]) + assert result.exit_code == 0 + assert "Hello Camila GutiĆ©rrez" in result.output + + +def test_formal(): + result = runner.invoke(app, ["Camila", "--lastname", "GutiĆ©rrez", "--formal"]) + assert result.exit_code == 0 + assert "Good day Ms. Camila GutiĆ©rrez." in result.output + + +def test_script(): + result = subprocess.run( + [sys.executable, "-m", "coverage", "run", mod.__file__, "--help"], + capture_output=True, + encoding="utf-8", + ) + assert "Usage" in result.stdout diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_options/test_help/test_tutorial002.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_options/test_help/test_tutorial002.py new file mode 100644 index 0000000000000000000000000000000000000000..37c5b72617ec9493071d8a90e87f52cb1811b40e --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_options/test_help/test_tutorial002.py @@ -0,0 +1,44 @@ +import subprocess +import sys + +import typer +from typer.testing import CliRunner + +from docs_src.options.help import tutorial002 as mod + +runner = CliRunner() + +app = typer.Typer() +app.command()(mod.main) + + +def test_call(): + result = runner.invoke(app, ["World"]) + assert result.exit_code == 0 + assert "Hello World" in result.output + + +def test_formal(): + result = runner.invoke(app, ["World", "--formal"]) + assert result.exit_code == 0 + assert "Good day Ms. World" in result.output + + +def test_help(): + result = runner.invoke(app, ["--help"]) + assert result.exit_code == 0 + assert "--lastname" in result.output + assert "Customization and Utils" in result.output + assert "--formal" in result.output + assert "--no-formal" in result.output + assert "--debug" in result.output + assert "--no-debug" in result.output + + +def test_script(): + result = subprocess.run( + [sys.executable, "-m", "coverage", "run", mod.__file__, "--help"], + capture_output=True, + encoding="utf-8", + ) + assert "Usage" in result.stdout diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_options/test_help/test_tutorial002_an.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_options/test_help/test_tutorial002_an.py new file mode 100644 index 0000000000000000000000000000000000000000..a8364b017a48276366db894893dfb5e065a5a68b --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_options/test_help/test_tutorial002_an.py @@ -0,0 +1,44 @@ +import subprocess +import sys + +import typer +from typer.testing import CliRunner + +from docs_src.options.help import tutorial002_an as mod + +runner = CliRunner() + +app = typer.Typer() +app.command()(mod.main) + + +def test_call(): + result = runner.invoke(app, ["World"]) + assert result.exit_code == 0 + assert "Hello World" in result.output + + +def test_formal(): + result = runner.invoke(app, ["World", "--formal"]) + assert result.exit_code == 0 + assert "Good day Ms. World" in result.output + + +def test_help(): + result = runner.invoke(app, ["--help"]) + assert result.exit_code == 0 + assert "--lastname" in result.output + assert "Customization and Utils" in result.output + assert "--formal" in result.output + assert "--no-formal" in result.output + assert "--debug" in result.output + assert "--no-debug" in result.output + + +def test_script(): + result = subprocess.run( + [sys.executable, "-m", "coverage", "run", mod.__file__, "--help"], + capture_output=True, + encoding="utf-8", + ) + assert "Usage" in result.stdout diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_options/test_help/test_tutorial003.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_options/test_help/test_tutorial003.py new file mode 100644 index 0000000000000000000000000000000000000000..b7b2af2b46506abec79fecd976909f3aa09e449a --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_options/test_help/test_tutorial003.py @@ -0,0 +1,35 @@ +import subprocess +import sys + +import typer +from typer.testing import CliRunner + +from docs_src.options.help import tutorial003 as mod + +runner = CliRunner() + +app = typer.Typer() +app.command()(mod.main) + + +def test_call(): + result = runner.invoke(app) + assert result.exit_code == 0 + assert "Hello Wade Wilson" in result.output + + +def test_help(): + result = runner.invoke(app, ["--help"]) + assert result.exit_code == 0 + assert "--fullname" in result.output + assert "TEXT" in result.output + assert "[default: Wade Wilson]" not in result.output + + +def test_script(): + result = subprocess.run( + [sys.executable, "-m", "coverage", "run", mod.__file__, "--help"], + capture_output=True, + encoding="utf-8", + ) + assert "Usage" in result.stdout diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_options/test_help/test_tutorial003_an.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_options/test_help/test_tutorial003_an.py new file mode 100644 index 0000000000000000000000000000000000000000..948d566308e109b964b192847b43a0359944d0f9 --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_options/test_help/test_tutorial003_an.py @@ -0,0 +1,35 @@ +import subprocess +import sys + +import typer +from typer.testing import CliRunner + +from docs_src.options.help import tutorial003_an as mod + +runner = CliRunner() + +app = typer.Typer() +app.command()(mod.main) + + +def test_call(): + result = runner.invoke(app) + assert result.exit_code == 0 + assert "Hello Wade Wilson" in result.output + + +def test_help(): + result = runner.invoke(app, ["--help"]) + assert result.exit_code == 0 + assert "--fullname" in result.output + assert "TEXT" in result.output + assert "[default: Wade Wilson]" not in result.output + + +def test_script(): + result = subprocess.run( + [sys.executable, "-m", "coverage", "run", mod.__file__, "--help"], + capture_output=True, + encoding="utf-8", + ) + assert "Usage" in result.stdout diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_options/test_name/__init__.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_options/test_name/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_options/test_name/test_tutorial001.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_options/test_name/test_tutorial001.py new file mode 100644 index 0000000000000000000000000000000000000000..21c6729ad0322faf0742c2dbfd20545e0dd72bf1 --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_options/test_name/test_tutorial001.py @@ -0,0 +1,41 @@ +import subprocess +import sys + +import typer +from typer.testing import CliRunner + +from docs_src.options.name import tutorial001 as mod + +runner = CliRunner() + +app = typer.Typer() +app.command()(mod.main) + + +def test_option_help(): + result = runner.invoke(app, ["--help"]) + assert result.exit_code == 0 + assert "--name" in result.output + assert "TEXT" in result.output + assert "--user-name" not in result.output + + +def test_call(): + result = runner.invoke(app, ["--name", "Camila"]) + assert result.exit_code == 0 + assert "Hello Camila" in result.output + + +def test_call_no_args(): + result = runner.invoke(app, ["--name"]) + assert result.exit_code != 0 + assert "Option '--name' requires an argument" in result.output + + +def test_script(): + result = subprocess.run( + [sys.executable, "-m", "coverage", "run", mod.__file__, "--help"], + capture_output=True, + encoding="utf-8", + ) + assert "Usage" in result.stdout diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_options/test_name/test_tutorial001_an.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_options/test_name/test_tutorial001_an.py new file mode 100644 index 0000000000000000000000000000000000000000..6beffcb6452f83af8dca91d92191de660aeb19f1 --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_options/test_name/test_tutorial001_an.py @@ -0,0 +1,41 @@ +import subprocess +import sys + +import typer +from typer.testing import CliRunner + +from docs_src.options.name import tutorial001_an as mod + +runner = CliRunner() + +app = typer.Typer() +app.command()(mod.main) + + +def test_option_help(): + result = runner.invoke(app, ["--help"]) + assert result.exit_code == 0 + assert "--name" in result.output + assert "TEXT" in result.output + assert "--user-name" not in result.output + + +def test_call(): + result = runner.invoke(app, ["--name", "Camila"]) + assert result.exit_code == 0 + assert "Hello Camila" in result.output + + +def test_call_no_args(): + result = runner.invoke(app, ["--name"]) + assert result.exit_code != 0 + assert "Option '--name' requires an argument" in result.output + + +def test_script(): + result = subprocess.run( + [sys.executable, "-m", "coverage", "run", mod.__file__, "--help"], + capture_output=True, + encoding="utf-8", + ) + assert "Usage" in result.stdout diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_options/test_name/test_tutorial002.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_options/test_name/test_tutorial002.py new file mode 100644 index 0000000000000000000000000000000000000000..0b4b8ced41cd678725dac3b3e4b9910dab6e5bce --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_options/test_name/test_tutorial002.py @@ -0,0 +1,42 @@ +import subprocess +import sys + +import typer +from typer.testing import CliRunner + +from docs_src.options.name import tutorial002 as mod + +runner = CliRunner() + +app = typer.Typer() +app.command()(mod.main) + + +def test_option_help(): + result = runner.invoke(app, ["--help"]) + assert result.exit_code == 0 + assert "-n" in result.output + assert "--name" in result.output + assert "TEXT" in result.output + assert "--user-name" not in result.output + + +def test_call(): + result = runner.invoke(app, ["-n", "Camila"]) + assert result.exit_code == 0 + assert "Hello Camila" in result.output + + +def test_call_long(): + result = runner.invoke(app, ["--name", "Camila"]) + assert result.exit_code == 0 + assert "Hello Camila" in result.output + + +def test_script(): + result = subprocess.run( + [sys.executable, "-m", "coverage", "run", mod.__file__, "--help"], + capture_output=True, + encoding="utf-8", + ) + assert "Usage" in result.stdout diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_options/test_name/test_tutorial002_an.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_options/test_name/test_tutorial002_an.py new file mode 100644 index 0000000000000000000000000000000000000000..7a3742bf62687fd133ea7e316c545bb03bf43604 --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_options/test_name/test_tutorial002_an.py @@ -0,0 +1,42 @@ +import subprocess +import sys + +import typer +from typer.testing import CliRunner + +from docs_src.options.name import tutorial002_an as mod + +runner = CliRunner() + +app = typer.Typer() +app.command()(mod.main) + + +def test_option_help(): + result = runner.invoke(app, ["--help"]) + assert result.exit_code == 0 + assert "-n" in result.output + assert "--name" in result.output + assert "TEXT" in result.output + assert "--user-name" not in result.output + + +def test_call(): + result = runner.invoke(app, ["-n", "Camila"]) + assert result.exit_code == 0 + assert "Hello Camila" in result.output + + +def test_call_long(): + result = runner.invoke(app, ["--name", "Camila"]) + assert result.exit_code == 0 + assert "Hello Camila" in result.output + + +def test_script(): + result = subprocess.run( + [sys.executable, "-m", "coverage", "run", mod.__file__, "--help"], + capture_output=True, + encoding="utf-8", + ) + assert "Usage" in result.stdout diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_options/test_name/test_tutorial003.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_options/test_name/test_tutorial003.py new file mode 100644 index 0000000000000000000000000000000000000000..80bd7f2da2ecef8593cf6499afbeea043bcce422 --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_tutorial/test_options/test_name/test_tutorial003.py @@ -0,0 +1,36 @@ +import subprocess +import sys + +import typer +from typer.testing import CliRunner + +from docs_src.options.name import tutorial003 as mod + +runner = CliRunner() + +app = typer.Typer() +app.command()(mod.main) + + +def test_option_help(): + result = runner.invoke(app, ["--help"]) + assert result.exit_code == 0 + assert "-n" in result.output + assert "TEXT" in result.output + assert "--user-name" not in result.output + assert "--name" not in result.output + + +def test_call(): + result = runner.invoke(app, ["-n", "Camila"]) + assert result.exit_code == 0 + assert "Hello Camila" in result.output + + +def test_script(): + result = subprocess.run( + [sys.executable, "-m", "coverage", "run", mod.__file__, "--help"], + capture_output=True, + encoding="utf-8", + ) + assert "Usage" in result.stdout diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_type_conversion.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_type_conversion.py new file mode 100644 index 0000000000000000000000000000000000000000..904a686d2e4df3d07c719be1cff64bb239aae38f --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_type_conversion.py @@ -0,0 +1,171 @@ +from enum import Enum +from pathlib import Path +from typing import Any, List, Optional, Tuple + +import click +import pytest +import typer +from typer.testing import CliRunner + +from .utils import needs_py310 + +runner = CliRunner() + + +def test_optional(): + app = typer.Typer() + + @app.command() + def opt(user: Optional[str] = None): + if user: + print(f"User: {user}") + else: + print("No user") + + result = runner.invoke(app) + assert result.exit_code == 0 + assert "No user" in result.output + + result = runner.invoke(app, ["--user", "Camila"]) + assert result.exit_code == 0 + assert "User: Camila" in result.output + + +@needs_py310 +def test_union_type_optional(): + app = typer.Typer() + + @app.command() + def opt(user: str | None = None): + if user: + print(f"User: {user}") + else: + print("No user") + + result = runner.invoke(app) + assert result.exit_code == 0 + assert "No user" in result.output + + result = runner.invoke(app, ["--user", "Camila"]) + assert result.exit_code == 0 + assert "User: Camila" in result.output + + +def test_optional_tuple(): + app = typer.Typer() + + @app.command() + def opt(number: Optional[Tuple[int, int]] = None): + if number: + print(f"Number: {number}") + else: + print("No number") + + result = runner.invoke(app) + assert result.exit_code == 0 + assert "No number" in result.output + + result = runner.invoke(app, ["--number", "4", "2"]) + assert result.exit_code == 0 + assert "Number: (4, 2)" in result.output + + +def test_no_type(): + app = typer.Typer() + + @app.command() + def no_type(user): + print(f"User: {user}") + + result = runner.invoke(app, ["Camila"]) + assert result.exit_code == 0 + assert "User: Camila" in result.output + + +class SomeEnum(Enum): + ONE = "one" + TWO = "two" + THREE = "three" + + +@pytest.mark.parametrize( + "type_annotation", + [List[Path], List[SomeEnum], List[str]], +) +def test_list_parameters_convert_to_lists(type_annotation): + # Lists containing objects that are converted by Click (i.e. not Path or Enum) + # should not be inadvertently converted to tuples + expected_element_type = type_annotation.__args__[0] + app = typer.Typer() + + @app.command() + def list_conversion(container: type_annotation): + assert isinstance(container, list) + for element in container: + assert isinstance(element, expected_element_type) + + result = runner.invoke(app, ["one", "two", "three"]) + assert result.exit_code == 0 + + +@pytest.mark.parametrize( + "type_annotation", + [ + Tuple[str, str], + Tuple[str, Path], + Tuple[Path, Path], + Tuple[str, SomeEnum], + Tuple[SomeEnum, SomeEnum], + ], +) +def test_tuple_parameter_elements_are_converted_recursively(type_annotation): + # Tuple elements that aren't converted by Click (i.e. Path or Enum) + # should be recursively converted by Typer + expected_element_types = type_annotation.__args__ + app = typer.Typer() + + @app.command() + def tuple_recursive_conversion(container: type_annotation): + assert isinstance(container, tuple) + for element, expected_type in zip(container, expected_element_types): + assert isinstance(element, expected_type) + + result = runner.invoke(app, ["one", "two"]) + assert result.exit_code == 0 + + +def test_custom_parse(): + app = typer.Typer() + + @app.command() + def custom_parser( + hex_value: int = typer.Argument(None, parser=lambda x: int(x, 0)), + ): + assert hex_value == 0x56 + + result = runner.invoke(app, ["0x56"]) + assert result.exit_code == 0 + + +def test_custom_click_type(): + class BaseNumberParamType(click.ParamType): + name = "base_integer" + + def convert( + self, + value: Any, + param: Optional[click.Parameter], + ctx: Optional[click.Context], + ) -> Any: + return int(value, 0) + + app = typer.Typer() + + @app.command() + def custom_click_type( + hex_value: int = typer.Argument(None, click_type=BaseNumberParamType()), + ): + assert hex_value == 0x56 + + result = runner.invoke(app, ["0x56"]) + assert result.exit_code == 0 diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_types.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_types.py new file mode 100644 index 0000000000000000000000000000000000000000..adb100eb82e909623ef16fef49338f42d763ae1d --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/test_types.py @@ -0,0 +1,34 @@ +from enum import Enum + +import typer +from typer.testing import CliRunner + +app = typer.Typer(context_settings={"token_normalize_func": str.lower}) + + +class User(str, Enum): + rick = "Rick" + morty = "Morty" + + +@app.command() +def hello(name: User = User.rick) -> None: + print(f"Hello {name.value}!") + + +runner = CliRunner() + + +def test_enum_choice() -> None: + # This test is only for coverage of the new custom TyperChoice class + result = runner.invoke(app, ["--name", "morty"], catch_exceptions=False) + assert result.exit_code == 0 + assert "Hello Morty!" in result.output + + result = runner.invoke(app, ["--name", "Rick"]) + assert result.exit_code == 0 + assert "Hello Rick!" in result.output + + result = runner.invoke(app, ["--name", "RICK"]) + assert result.exit_code == 0 + assert "Hello Rick!" in result.output diff --git a/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/utils.py b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/utils.py new file mode 100644 index 0000000000000000000000000000000000000000..019b006fa0a0e546ea42874ced8081a2842f55a3 --- /dev/null +++ b/miniconda3/pkgs/typer-0.20.0-py313h06a4308_1/info/test/typer/tests/utils.py @@ -0,0 +1,33 @@ +import sys +from os import getenv + +import pytest + +try: + import shellingham + from shellingham import ShellDetectionFailure + + shell = shellingham.detect_shell()[0] +except ImportError: # pragma: no cover + shellingham = None + shell = None +except ShellDetectionFailure: # pragma: no cover + shell = None + + +needs_py310 = pytest.mark.skipif( + sys.version_info < (3, 10), reason="requires python3.10+" +) + +needs_linux = pytest.mark.skipif( + not sys.platform.startswith("linux"), reason="Test requires Linux" +) + +needs_bash = pytest.mark.skipif( + not shellingham or not shell or "bash" not in shell, reason="Test requires Bash" +) + +requires_completion_permission = pytest.mark.skipif( + not getenv("_TYPER_RUN_INSTALL_COMPLETION_TESTS", False), + reason="Test requires permission to run completion installation tests", +)