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

feat: upgrade package black #1

Merged
merged 1 commit into from
Aug 21, 2023
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: 4 additions & 0 deletions .coveragerc
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,7 @@ omit =
src/blib2to3/*
tests/data/*
*/site-packages/*
.tox/*

[run]
relative_files = True
8 changes: 2 additions & 6 deletions .flake8
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
[flake8]
extend-ignore = E203, E266, E501
ignore = E203, E266, E501, W503
# line length is intentionally set to 80 here because black uses Bugbear
# See https://github.com/psf/black/blob/master/docs/the_black_code_style.md#line-length for more details
# See https://black.readthedocs.io/en/stable/the_black_code_style/current_style.html#line-length for more details
max-line-length = 80
max-complexity = 18
select = B,C,E,F,W,T4,B9
# We need to configure the mypy.ini because the flake8-mypy's default
# options don't properly override it, so if we don't specify it we get
# half of the config from mypy.ini and half from flake8-mypy.
mypy_config = mypy.ini
27 changes: 26 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,26 @@
.pc/
.venv
.coverage
.coverage.*
_build
.DS_Store
.vscode
docs/_static/pypi.svg
.tox
__pycache__

# Packaging artifacts
black.egg-info
black.dist-info
build/
dist/
pip-wheel-metadata/
.eggs

src/_black_version.py
.idea

.dmypy.json
*.swp
.hypothesis/
venv/
.ipynb_checkpoints/
62 changes: 48 additions & 14 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,31 +1,65 @@
# Note: don't use this config for your own repositories. Instead, see
# "Version control integration" in README.md.
# "Version control integration" in docs/integrations/source_version_control.md
exclude: ^(src/blib2to3/|profiling/|tests/data/)
repos:
- repo: local
hooks:
- id: black
name: black
language: system
entry: black
minimum_pre_commit_version: 2.9.2
require_serial: true
types_or: [python, pyi]
- id: check-pre-commit-rev-in-example
name: Check pre-commit rev in example
language: python
entry: python -m scripts.check_pre_commit_rev_in_example
files: '(CHANGES\.md|source_version_control\.md)$'
additional_dependencies:
&version_check_dependencies [
commonmark==0.9.1,
pyyaml==5.4.1,
beautifulsoup4==4.9.3,
]

- repo: https://gitlab.com/pycqa/flake8
rev: 3.9.0
- id: check-version-in-the-basics-example
name: Check black version in the basics example
language: python
entry: python -m scripts.check_version_in_basics_example
files: '(CHANGES\.md|the_basics\.md)$'
additional_dependencies: *version_check_dependencies

- repo: https://github.com/pycqa/isort
rev: 5.10.1
hooks:
- id: isort

- repo: https://github.com/pycqa/flake8
rev: 4.0.1
hooks:
- id: flake8
additional_dependencies: [flake8-bugbear]
additional_dependencies:
- flake8-bugbear
- flake8-comprehensions
- flake8-simplify

- repo: https://github.com/pre-commit/mirrors-mypy
rev: v0.812
rev: v0.971
hooks:
- id: mypy
exclude: ^docs/conf.py
additional_dependencies:
- types-dataclasses >= 0.1.3
- types-PyYAML
- tomli >= 0.2.6, < 2.0.0
- types-typed-ast >= 1.4.1
- click >= 8.1.0
- platformdirs >= 2.1.0
- pytest
- hypothesis

- repo: https://github.com/pre-commit/mirrors-prettier
rev: v2.2.1
rev: v2.7.1
hooks:
- id: prettier
args: [--prose-wrap=always, --print-width=88]
exclude: \.github/workflows/diff_shades\.yml

- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.3.0
hooks:
- id: end-of-file-fixer
- id: trailing-whitespace
11 changes: 10 additions & 1 deletion .pre-commit-hooks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,16 @@
description: "Black: The uncompromising Python code formatter"
entry: black
language: python
language_version: python3
minimum_pre_commit_version: 2.9.2
require_serial: true
types_or: [python, pyi]
- id: black-jupyter
name: black-jupyter
description:
"Black: The uncompromising Python code formatter (with Jupyter Notebook support)"
entry: black
language: python
minimum_pre_commit_version: 2.9.2
require_serial: true
types_or: [python, pyi, jupyter]
additional_dependencies: [".[jupyter]"]
3 changes: 3 additions & 0 deletions .prettierrc.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
proseWrap: always
printWidth: 88
endOfLine: auto
18 changes: 18 additions & 0 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
version: 2

formats:
- htmlzip

build:
os: ubuntu-22.04
tools:
python: "3.8"

python:
install:
- requirements: docs/requirements.txt

- method: pip
path: .
extra_requirements:
- d
31 changes: 0 additions & 31 deletions .travis.yml

This file was deleted.

194 changes: 194 additions & 0 deletions AUTHORS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,194 @@
# Authors

Glued together by [Łukasz Langa](mailto:[email protected]).

Maintained with:

- [Carol Willing](mailto:[email protected])
- [Carl Meyer](mailto:[email protected])
- [Jelle Zijlstra](mailto:[email protected])
- [Mika Naylor](mailto:[email protected])
- [Zsolt Dollenstein](mailto:[email protected])
- [Cooper Lees](mailto:[email protected])
- Richard Si
- [Felix Hildén](mailto:[email protected])
- [Batuhan Taskaya](mailto:[email protected])

Multiple contributions by:

- [Abdur-Rahmaan Janhangeer](mailto:[email protected])
- [Adam Johnson](mailto:[email protected])
- [Adam Williamson](mailto:[email protected])
- [Alexander Huynh](mailto:[email protected])
- [Alexandr Artemyev](mailto:[email protected])
- [Alex Vandiver](mailto:[email protected])
- [Allan Simon](mailto:[email protected])
- Anders-Petter Ljungquist
- [Andrew Thorp](mailto:[email protected])
- [Andrew Zhou](mailto:[email protected])
- [Andrey](mailto:[email protected])
- [Andy Freeland](mailto:[email protected])
- [Anthony Sottile](mailto:[email protected])
- [Antonio Ossa Guerra](mailto:[email protected])
- [Arjaan Buijk](mailto:[email protected])
- [Arnav Borbornah](mailto:[email protected])
- [Artem Malyshev](mailto:[email protected])
- [Asger Hautop Drewsen](mailto:[email protected])
- [Augie Fackler](mailto:[email protected])
- [Aviskar KC](mailto:[email protected])
- Batuhan Taşkaya
- [Benjamin Wohlwend](mailto:[email protected])
- [Benjamin Woodruff](mailto:[email protected])
- [Bharat Raghunathan](mailto:[email protected])
- [Brandt Bucher](mailto:[email protected])
- [Brett Cannon](mailto:[email protected])
- [Bryan Bugyi](mailto:[email protected])
- [Bryan Forbes](mailto:[email protected])
- [Calum Lind](mailto:[email protected])
- [Charles](mailto:[email protected])
- Charles Reid
- [Christian Clauss](mailto:[email protected])
- [Christian Heimes](mailto:[email protected])
- [Chuck Wooters](mailto:[email protected])
- [Chris Rose](mailto:[email protected])
- Codey Oxley
- [Cong](mailto:[email protected])
- [Cooper Ry Lees](mailto:[email protected])
- [Dan Davison](mailto:[email protected])
- [Daniel Hahler](mailto:[email protected])
- [Daniel M. Capella](mailto:[email protected])
- Daniele Esposti
- [David Hotham](mailto:[email protected])
- [David Lukes](mailto:[email protected])
- [David Szotten](mailto:[email protected])
- [Denis Laxalde](mailto:[email protected])
- [Douglas Thor](mailto:[email protected])
- dylanjblack
- [Eli Treuherz](mailto:[email protected])
- [Emil Hessman](mailto:[email protected])
- [Felix Kohlgrüber](mailto:[email protected])
- [Florent Thiery](mailto:[email protected])
- Francisco
- [Giacomo Tagliabue](mailto:[email protected])
- [Greg Gandenberger](mailto:[email protected])
- [Gregory P. Smith](mailto:[email protected])
- Gustavo Camargo
- hauntsaninja
- [Hadi Alqattan](mailto:[email protected])
- [Hassan Abouelela](mailto:[email protected])
- [Heaford](mailto:[email protected])
- [Hugo Barrera](mailto::[email protected])
- Hugo van Kemenade
- [Hynek Schlawack](mailto:[email protected])
- [Ionite](mailto:[email protected])
- [Ivan Katanić](mailto:[email protected])
- [Jakub Kadlubiec](mailto:[email protected])
- [Jakub Warczarek](mailto:[email protected])
- [Jan Hnátek](mailto:[email protected])
- [Jason Fried](mailto:[email protected])
- [Jason Friedland](mailto:[email protected])
- [jgirardet](mailto:[email protected])
- Jim Brännlund
- [Jimmy Jia](mailto:[email protected])
- [Joe Antonakakis](mailto:[email protected])
- [Jon Dufresne](mailto:[email protected])
- [Jonas Obrist](mailto:[email protected])
- [Jonty Wareing](mailto:[email protected])
- [Jose Nazario](mailto:[email protected])
- [Joseph Larson](mailto:[email protected])
- [Josh Bode](mailto:[email protected])
- [Josh Holland](mailto:[email protected])
- [Joshua Cannon](mailto:[email protected])
- [José Padilla](mailto:[email protected])
- [Juan Luis Cano Rodríguez](mailto:[email protected])
- [kaiix](mailto:[email protected])
- [Katie McLaughlin](mailto:[email protected])
- Katrin Leinweber
- [Keith Smiley](mailto:[email protected])
- [Kenyon Ralph](mailto:[email protected])
- [Kevin Kirsche](mailto:[email protected])
- [Kyle Hausmann](mailto:[email protected])
- [Kyle Sunden](mailto:[email protected])
- Lawrence Chan
- [Linus Groh](mailto:[email protected])
- [Loren Carvalho](mailto:[email protected])
- [Luka Sterbic](mailto:[email protected])
- [LukasDrude](mailto:[email protected])
- Mahmoud Hossam
- Mariatta
- [Matt VanEseltine](mailto:[email protected])
- [Matthew Clapp](mailto:[email protected])
- [Matthew Walster](mailto:[email protected])
- Max Smolens
- [Michael Aquilina](mailto:[email protected])
- [Michael Flaxman](mailto:[email protected])
- [Michael J. Sullivan](mailto:[email protected])
- [Michael McClimon](mailto:[email protected])
- [Miguel Gaiowski](mailto:[email protected])
- [Mike](mailto:[email protected])
- [mikehoyio](mailto:[email protected])
- [Min ho Kim](mailto:[email protected])
- [Miroslav Shubernetskiy](mailto:[email protected])
- MomIsBestFriend
- [Nathan Goldbaum](mailto:[email protected])
- [Nathan Hunt](mailto:[email protected])
- [Neraste](mailto:[email protected])
- [Nikolaus Waxweiler](mailto:[email protected])
- [Ofek Lev](mailto:[email protected])
- [Osaetin Daniel](mailto:[email protected])
- [otstrel](mailto:[email protected])
- [Pablo Galindo](mailto:[email protected])
- [Paul Ganssle](mailto:[email protected])
- [Paul Meinhardt](mailto:[email protected])
- [Peter Bengtsson](mailto:[email protected])
- [Peter Grayson](mailto:[email protected])
- [Peter Stensmyr](mailto:[email protected])
- pmacosta
- [Quentin Pradet](mailto:[email protected])
- [Ralf Schmitt](mailto:[email protected])
- [Ramón Valles](mailto:[email protected])
- [Richard Fearn](mailto:[email protected])
- [Rishikesh Jha](mailto:[email protected])
- [Rupert Bedford](mailto:[email protected])
- Russell Davis
- [Sagi Shadur](mailto:[email protected])
- [Rémi Verschelde](mailto:[email protected])
- [Sami Salonen](mailto:[email protected])
- [Samuel Cormier-Iijima](mailto:[email protected])
- [Sanket Dasgupta](mailto:[email protected])
- Sergi
- [Scott Stevenson](mailto:[email protected])
- Shantanu
- [shaoran](mailto:[email protected])
- [Shinya Fujino](mailto:[email protected])
- springstan
- [Stavros Korokithakis](mailto:[email protected])
- [Stephen Rosen](mailto:[email protected])
- [Steven M. Vascellaro](mailto:[email protected])
- [Sunil Kapil](mailto:[email protected])
- [Sébastien Eustace](mailto:[email protected])
- [Tal Amuyal](mailto:[email protected])
- [Terrance](mailto:[email protected])
- [Thom Lu](mailto:[email protected])
- [Thomas Grainger](mailto:[email protected])
- [Tim Gates](mailto:[email protected])
- [Tim Swast](mailto:[email protected])
- [Timo](mailto:[email protected])
- Toby Fleming
- [Tom Christie](mailto:[email protected])
- [Tony Narlock](mailto:[email protected])
- [Tsuyoshi Hombashi](mailto:[email protected])
- [Tushar Chandra](mailto:[email protected])
- [Tzu-ping Chung](mailto:[email protected])
- [Utsav Shah](mailto:[email protected])
- utsav-dbx
- vezeli
- [Ville Skyttä](mailto:[email protected])
- [Vishwas B Sharma](mailto:[email protected])
- [Vlad Emelianov](mailto:[email protected])
- [williamfzc](mailto:[email protected])
- [wouter bolsterlee](mailto:[email protected])
- Yazdan
- [Yngve Høiseth](mailto:[email protected])
- [Yurii Karabas](mailto:[email protected])
- [Zac Hatfield-Dodds](mailto:[email protected])
Loading