From: Ɓukasz Langa Date: Mon, 21 Oct 2019 13:03:01 +0000 (+0200) Subject: s/_version.py/_black_version.py/ (#1082) X-Git-Url: https://git.madduck.net/etc/vim.git/commitdiff_plain/a701659da2e2b8cc5abca2c6c7c97832551627c0?ds=inline s/_version.py/_black_version.py/ (#1082) Some users are installing Black as a dependency in their project. Having a _version.py in site-packages is asking for a conflict sooner or later. Ideally we shouldn't require a separate version file at all, that's an additional import we need to make. But I'll leave that bikeshedding for a different time. --- diff --git a/.gitignore b/.gitignore index caefeaa..330e2ba 100644 --- a/.gitignore +++ b/.gitignore @@ -9,6 +9,6 @@ black.egg-info build/ dist/ pip-wheel-metadata/ -_version.py +_black_version.py .idea .eggs diff --git a/black.py b/black.py index bf75bc0..24ab660 100644 --- a/black.py +++ b/black.py @@ -52,7 +52,7 @@ from blib2to3.pgen2 import driver, token from blib2to3.pgen2.grammar import Grammar from blib2to3.pgen2.parse import ParseError -from _version import version as __version__ +from _black_version import version as __version__ DEFAULT_LINE_LENGTH = 88 DEFAULT_EXCLUDES = r"/(\.eggs|\.git|\.hg|\.mypy_cache|\.nox|\.tox|\.venv|\.svn|_build|buck-out|build|dist)/" # noqa: B950 diff --git a/blackd.py b/blackd.py index 055f268..a6c6e8d 100644 --- a/blackd.py +++ b/blackd.py @@ -10,7 +10,7 @@ import aiohttp_cors import black import click -from _version import version as __version__ +from _black_version import version as __version__ # This is used internally by tests to shut down the server prematurely _stop_signal = asyncio.Event() diff --git a/setup.py b/setup.py index 37fe820..cc49292 100644 --- a/setup.py +++ b/setup.py @@ -17,7 +17,7 @@ def get_long_description() -> str: setup( name="black", use_scm_version={ - "write_to": "_version.py", + "write_to": "_black_version.py", "write_to_template": 'version = "{version}"\n', }, description="The uncompromising code formatter.",