Closed devxpy closed 4 years ago
You're very welcome!
Good point! I'll have a look at those!
Apparently, this is physically impossible.
The package has a total of 4283792079344
possible permutations of methods available. Even if we wrote a script that automatically generate type stubs, this would be too large for anyone to parse xD
Fun stuff: Here is the script I used to arrive at that number -
from colorful.ansi import MODIFIERS
from colorful.rgb import parse_rgb_txt_file
num_colors = len(parse_rgb_txt_file("./colorful/data/rgb.txt"))
num_modifers = len(MODIFIERS)
modifier_permuations = 0
for i in range(1, num_modifers + 1):
m = 1
for j in range(num_modifers, num_modifers - i, -1):
m *= j
modifier_permuations += m
total = (
modifier_permuations
+ num_colors * 2
+ modifier_permuations * num_colors * 2
+ num_colors * num_colors * 2
+ modifier_permuations * num_colors * num_colors
)
print(total)
Wait, maybe we can have at least a subset of the API that's commonly used.
Yes, that's right - big number 😄
Wait, maybe we can have at least a subset of the API that's commonly used.
Which API did you have in mind? "common" like the "common" colors people might use?
Yes common colors and modifiers..
A simple templated file would be useful. I use a dozen or so color combos, and I would be happy to add type definitions manually to make PyCharm happy if I knew the proper location and format to use. Thanks for the useful library!
This Issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days
This Issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days
This Issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days
Hello, thanks for this wonderful module!
Can we please have type stubs (
.pyi
files), to enable code-completion in IDEs?