parts:
black:
source: .
plugin: python
snapcraft-black # ls prime/lib/python3.6/site-packages/
Click-7.0.dist-info blackd.py setuptools-40.8.0.dist-info
appdirs-1.4.3.dist-info blib2to3 toml
appdirs.py click toml-0.10.0.dist-info
attr easy_install.py toml.py
attrs-18.2.0.dist-info pip wheel
black-18.9b0-py3.6.egg-info pip-19.0.2.dist-info wheel-0.32.3.dist-info
black-18.9b0.dist-info pkg_resources
black.py setuptools
snapcraft-black # snap try prime --classic
black 0+git.250ba7f mounted from /root/prime
snapcraft-black # black --help
Usage: black [OPTIONS] [SRC]...
The uncompromising code formatter.
Options:
-l, --line-length INTEGER How many characters per line to allow. [default: 88]
-t, --target-version [pypy35|cpy27|cpy33|cpy34|cpy35|cpy36|cpy37|cpy38] Python versions that should be supported by Black's output. [default: per-file auto- detection]
--py36 Allow using Python 3.6-only syntax on all input files. This will put trailing commas in function signatures and calls also after *args and **kwargs. [default: per-file auto-detection]
--pyi Format all input files like typing stubs regardless of file extension (useful when piping source on standard input).
-S, --skip-string-normalization Don't normalize string quotes or prefixes.
--check Don't write the files back, just return the status. Return code 0 means nothing would change. Return code 1 means some files would be reformatted. Return code 123 means there was an internal error.
--diff Don't write the files back, just output a diff for each file on stdout.
--fast / --safe If --fast given, skip temporary sanity checks. [default: --safe]
--include TEXT A regular expression that matches files and directories that should be included on recursive searches. An empty value means all files are included regardless of the name. Use forward slashes for directories on all platforms (Windows, too). Exclusions are calculated first, inclusions later. [default: \.pyi?$]
--exclude TEXT A regular expression that matches files and directories that should be excluded on recursive searches. An empty value means no paths are excluded. Use forward slashes for directories on all platforms (Windows, too). Exclusions are calculated first, inclusions later. [default: /(\.eggs|\.git|\.hg|\.mypy _cache|\.nox|\.tox|\.venv|_build|buck- out|build|dist)/]
-q, --quiet Don't emit non-error messages to stderr. Errors are still emitted, silence those with 2>/dev/null.
-v, --verbose Also emit messages to stderr about files that were not changed or were ignored due to --exclude=.
--version Show the version and exit.
--config FILE Read configuration from PATH.
-h, --help Show this message and exit.
snapcraft-black # which black
/snap/bin/black
snapcraft-black # snap run --shell black
snapcraft-black # $SNAP/usr/bin/python3.6
Python 3.6.7 (default, Oct 22 2018, 11:32:17)
[GCC 8.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import click
>>> click.__path__
['/snap/black/x4/lib/python3.6/site-packages/click']
>>>
I cannot seem to reproduce your issue. Mind adding more information or trying again? Here's what I tried out:
snapcraft-black # cat project/ snap/snapcraft. yaml
name: black
base: core18
version: git
summary: boo
description: boo
grade: devel
confinement: classic
apps:
black:
command: bin/black
parts: python3. 6/site- packages/ 40.8.0. dist-info 1.4.3.dist- info blib2to3 toml 10.0.dist- info 2.0.dist- info pip wheel 9b0-py3. 6.egg-info pip-19. 0.2.dist- info wheel-0. 32.3.dist- info 9b0.dist- info pkg_resources
black:
source: .
plugin: python
snapcraft-black # ls prime/lib/
Click-7.0.dist-info blackd.py setuptools-
appdirs-
appdirs.py click toml-0.
attr easy_install.py toml.py
attrs-18.
black-18.
black-18.
black.py setuptools
snapcraft-black # snap try prime --classic
black 0+git.250ba7f mounted from /root/prime
snapcraft-black # black --help
Usage: black [OPTIONS] [SRC]...
The uncompromising code formatter.
Options:
[ default: 88] cpy27|cpy33| cpy34|cpy35| cpy36|cpy37| cpy38]
Python versions that should be supported by
Black' s output. [default: per-file auto-
detection ]
input files. This will put trailing commas
in function signatures and calls also after
* args and **kwargs. [default: per-file
auto- detection]
regardles s of file extension (useful when
piping source on standard input). string- normalization
Don' t normalize string quotes or prefixes.
status. Return code 0 means nothing would
change. Return code 1 means some files
would be reformatted. Return code 123 means
there was an internal error.
diff for each file on stdout.
checks. [default: --safe]
directori es that should be included on
recursive searches. An empty value means
all files are included regardless of the
name. Use forward slashes for directories
on all platforms (Windows, too). Exclusions
are calculated first, inclusions later.
[ default: \.pyi?$]
directori es that should be excluded on
recursive searches. An empty value means no
paths are excluded. Use forward slashes for
directori es on all platforms (Windows, too).
Exclusion s are calculated first, inclusions
later. [default: /(\.eggs| \.git|\ .hg|\.mypy
_ cache|\ .nox|\. tox|\.venv| _build| buck-
out| build|dist) /]
Errors are still emitted, silence those with
2> /dev/null.
that were not changed or were ignored due to
- -exclude= . bin/python3. 6 black/x4/ lib/python3. 6/site- packages/ click']
-l, --line-length INTEGER How many characters per line to allow.
-t, --target-version [pypy35|
--py36 Allow using Python 3.6-only syntax on all
--pyi Format all input files like typing stubs
-S, --skip-
--check Don't write the files back, just return the
--diff Don't write the files back, just output a
--fast / --safe If --fast given, skip temporary sanity
--include TEXT A regular expression that matches files and
--exclude TEXT A regular expression that matches files and
-q, --quiet Don't emit non-error messages to stderr.
-v, --verbose Also emit messages to stderr about files
--version Show the version and exit.
--config FILE Read configuration from PATH.
-h, --help Show this message and exit.
snapcraft-black # which black
/snap/bin/black
snapcraft-black # snap run --shell black
snapcraft-black # $SNAP/usr/
Python 3.6.7 (default, Oct 22 2018, 11:32:17)
[GCC 8.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import click
>>> click.__path__
['/snap/
>>>