Commit Graph

22 Commits

Author SHA1 Message Date
jack1142
77021f0fb2
Add coverage files to gitignore (#2323) 2021-06-09 13:33:59 -07:00
Łukasz Langa
ea9fefb359
Re-add .venv to .gitignore 2021-04-25 19:42:02 +02:00
Łukasz Langa
773e4a22d5
Revert "Use lowercase hex numbers fixes #1692 (#1775)"
This reverts commit 7d032fa848.
2021-04-25 19:13:23 +02:00
Casper Weiss Bang
7d032fa848
Use lowercase hex numbers fixes #1692 (#1775)
* Made hex lower case

* Refactored numeric formatting section

* Redid some refactoring and removed bloat

* Removed additions from test_requirements.txt

* Primer now expects expected changes

* Undid some refactoring

* added to changelog

* Update src/black/__init__.py

Co-authored-by: Zsolt Dollenstein <zsol.zsol@gmail.com>

Co-authored-by: Zsolt Dollenstein <zsol.zsol@gmail.com>
Co-authored-by: Cooper Lees <me@cooperlees.com>
2020-11-13 07:25:17 -08:00
Sagi Shadur
407052724f
Switch to pytest and tox (#1763)
* Add venv to .gitignore

* Use tox to run tests

* Make fuzz run in tox

* Split tests files

* Fix import error
2020-10-19 10:35:26 -07:00
Zac-HD
cd3a93a146 Property-based fuzz test 2020-08-21 16:47:49 +02:00
Cooper Lees
2082a325fd
Refactor black into packages in src/ dir (#1376)
- Move black.py to src/black/__init__.py
- Have setuptools_scm make src/_black_version.py and exclude from git
- Move blackd.py to src/blackd/__init__.py
- Move blib2to3/ to src/
- Update `setup.py`
- Update unittests to pass
  - Mostly path fixing + resolving
- Update CI
  - pre-commit config
  - appveyor + travis

Tested on my mac with python 3.7.5 via:
```
python3 -m venv /tmp/tb3
/tmp/tb3/bin/pip install --upgrade setuptools pip coverage pre-commit
/tmp/tb2/bin/pip install ~/repos/black/
cd ~/repos/black/
/tmp/tb2/bin/coverage run tests/test_black.py
/tmp/tb3/bin/pre-commit run -a
/tmp/tb3/bin/black --help
/tmp/tb3/bin/black ~/repos/ptr/ptr.py
```
2020-05-08 08:50:50 -07:00
shaoran
0721f11731
Adding documentation to the README for import errors in vim (#1317)
* Adding documentation to the README for import errors in vim

I had the same issue as psf/black#1148 and have been searching for a
solution to this. I realized that you cannot fix it by change anything
in the code, but by re-compiling the C extensions of regex and
typed-ast. Installing this packages from the tarballs solves the
problem.

* Fixing a bad copy&paste

Co-Authored-By: Hugo van Kemenade <hugovk@users.noreply.github.com>

* chore: changed made by pre-commit

* chore: better way of dealing with non-binary installs

* chore: adding vim cache files to the ignore list

Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2020-05-08 08:42:19 -07:00
Michael J. Sullivan
3e60f6d454 Support compilation with mypyc (#1009)
* Make most of blib2to3 directly typed and mypyc-compatible

This used a combination of retype and pytype's merge-pyi to do the
initial merges of the stubs, which then required manual tweaking to
make actually typecheck and work with mypyc.

Co-authored-by: Sanjit Kalapatapu <sanjitkal@gmail.com>
Co-authored-by: Michael J. Sullivan <sully@msully.net>

* Make black able to compile and run with mypyc

The changes made fall into a couple categories:
 * Fixing actual type mistakes that slip through the cracks
 * Working around a couple mypy bugs (the most annoying of which being
   that we need to add type annotations in a number of places where
   variables are initialized to None)

Co-authored-by: Sanjit Kalapatapu <sanjitkal@gmail.com>
Co-authored-by: Michael J. Sullivan <sully@msully.net>
2019-10-30 07:29:29 -07:00
Łukasz Langa
a701659da2
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.
2019-10-21 15:03:01 +02:00
Michael J. Sullivan
34aeee6879 Add .eggs to .gitignore (#1063)
I don't know what .eggs is but it keeps showing up when I work on black
so...
2019-10-14 12:30:37 -07:00
vezeli
5938106ac4 Switch from versioneer to setuptools-scm (#1008) 2019-09-18 13:34:20 +01:00
Rishikesh Jha
ae5588cf07 Print a separate message when there are no inputs given (#999)
Fixes #886.
2019-09-04 12:51:32 +01:00
Łukasz Langa
1f2138f872
Add pip-wheel-metadata/ to ignores 2019-03-14 13:16:36 +01:00
Łukasz Langa
cb67a32242
Improve Poetry support 2018-09-18 16:50:20 -07:00
Sébastien Eustace
2f0a1852a9 Update Poetry section in pyproject.toml (#490) 2018-09-18 15:27:41 -07:00
Jon Dufresne
8e90e46204 Add build & dist directories to .gitignore (#487)
Generated when running the command "python3 setup.py bdist_wheel".
2018-08-28 12:59:00 +01:00
Christian Heimes
8325f893b4 Add more files/directories to .gitignore (#191)
Ignore .tox, black.egg-info and __pycache__ directories.

Signed-off-by: Christian Heimes <christian@python.org>
2018-05-07 10:11:21 -07:00
Łukasz Langa
6243540ae7 .gititnore += .vscode 2018-04-28 13:47:59 -07:00
Łukasz Langa
4b8823e563 Self-host PyPI-related badges 2018-03-26 02:15:13 -07:00
Carol Willing
c98a6f134f add sphinx docs skeleton (#71) 2018-03-23 14:27:04 -07:00
Łukasz Langa
e74117f172 Initial commit 2018-03-14 12:55:32 -07:00