Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hint for python typing that pastel_factor is a float #30

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/pythonapp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ jobs:

- name: Code quality checks
run: |
isort --check-only .
black --check .
isort --check-only --diff .
black --check --diff .
flake8

build_and_test:
Expand Down
2 changes: 1 addition & 1 deletion distinctipy/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

name = "distinctipy"

__version__ = "1.2.2"
__version__ = "1.2.3"

# Expose these module names and their internals in the top-level API
__external__ = ["distinctipy"]
Expand Down
1 change: 0 additions & 1 deletion distinctipy/colorblind.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ def rgb2xyz(rgb):


def xyz2rgb(xyz):

x = xyz[0]
y = xyz[1]
z = xyz[2]
Expand Down
6 changes: 3 additions & 3 deletions distinctipy/distinctipy.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ def _ensure_rng(rng):
return rng


def get_random_color(pastel_factor=0, rng=None):
def get_random_color(pastel_factor=0.0, rng=None):
"""
Generate a random rgb colour.

Expand Down Expand Up @@ -126,7 +126,7 @@ def color_distance(c1, c2):


def distinct_color(
exclude_colors, pastel_factor=0, n_attempts=1000, colorblind_type=None, rng=None
exclude_colors, pastel_factor=0.0, n_attempts=1000, colorblind_type=None, rng=None
):
"""
Generate a colour as distinct as possible from the colours defined in exclude_colors
Expand Down Expand Up @@ -239,7 +239,7 @@ def get_colors(
n_colors,
exclude_colors=None,
return_excluded=False,
pastel_factor=0,
pastel_factor=0.0,
n_attempts=1000,
colorblind_type=None,
rng=None,
Expand Down
Loading