]> git.madduck.net Git - etc/vim.git/commitdiff

madduck's git repository

Every one of the projects in this repository is available at the canonical URL git://git.madduck.net/madduck/pub/<projectpath> — see each project's metadata for the exact URL.

All patches and comments are welcome. Please squash your changes to logical commits before using git-format-patch and git-send-email to patches@git.madduck.net. If you'd read over the Git project's submission guidelines and adhered to them, I'd be especially grateful.

SSH access, as well as push access can be individually arranged.

If you use my repositories frequently, consider adding the following snippet to ~/.gitconfig and using the third clone URL listed for each project:

[url "git://git.madduck.net/madduck/"]
  insteadOf = madduck:

s/_version.py/_black_version.py/ (#1082)
authorŁukasz Langa <lukasz@langa.pl>
Mon, 21 Oct 2019 13:03:01 +0000 (15:03 +0200)
committerGitHub <noreply@github.com>
Mon, 21 Oct 2019 13:03:01 +0000 (15:03 +0200)
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.

.gitignore
black.py
blackd.py
setup.py

index caefeaa6e3013242d31f3fc4225acce427c866c5..330e2bab734de50fa639f1a98b3328dd63a2f43a 100644 (file)
@@ -9,6 +9,6 @@ black.egg-info
 build/
 dist/
 pip-wheel-metadata/
-_version.py
+_black_version.py
 .idea
 .eggs
index bf75bc0f6a44da156adc3d75ebcdde6afe34fab5..24ab6607f7bf61b22b8e325ed6e94a2e71bcaf48 100644 (file)
--- 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
index 055f268ccaac63f0f41fe1a209b6e38fca04baf7..a6c6e8db9c04d920854a17dbc8a6962eb97abead 100644 (file)
--- 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()
index 37fe820da7bb62ea064f8a3a129201d14316f717..cc4929203fbd1e78e883f0e5a9487377bded2e83 100644 (file)
--- 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.",