Skip to content

Commit 660aeaf

Browse files
committed
run auto formatters
1 parent 394f696 commit 660aeaf

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+2745
-2334
lines changed

.github/workflows/downstream.yml

+33-35
Original file line numberDiff line numberDiff line change
@@ -2,49 +2,47 @@ name: Test downstream projects
22

33
on:
44
push:
5-
branches: '*'
65
pull_request:
7-
branches: '*'
86

97
jobs:
108
tests:
119
runs-on: ubuntu-latest
1210

1311
steps:
14-
- name: Checkout
15-
uses: actions/checkout@v2
12+
- name: Checkout
13+
uses: actions/checkout@v2
1614

17-
- name: Set up Python 3.8
18-
uses: actions/setup-python@v2
19-
with:
20-
python-version: 3.8
15+
- name: Set up Python 3.8
16+
uses: actions/setup-python@v2
17+
with:
18+
python-version: 3.8
2119

22-
- name: Install dependencies
23-
run: |
24-
pip install --upgrade pip
25-
pip install build
26-
python -m build .
27-
pip install dist/traitlets*.whl
28-
pip install --pre --upgrade traitlets[test] pytest pytest-cov
29-
pip install ipython[test] git+https://github.com/jupyter/nbconvert.git#egg=nbconvert[test] \
30-
notebook[test] ipywidgets[test]
31-
pip freeze
20+
- name: Install dependencies
21+
run: |
22+
pip install --upgrade pip
23+
pip install build
24+
python -m build .
25+
pip install dist/traitlets*.whl
26+
pip install --pre --upgrade traitlets[test] pytest pytest-cov
27+
pip install ipython[test] git+https://github.com/jupyter/nbconvert.git#egg=nbconvert[test] \
28+
notebook[test] ipywidgets[test]
29+
pip freeze
3230
33-
- name: Run tests IPython
34-
run: |
35-
iptest
36-
- name: Run tests nbconvert
37-
run: |
38-
pytest --cov traitlets --cov-report=xml:coverage-from-nbconvert.xml \
39-
--pyargs nbconvert -p no:unraisableexception -k 'not network'
40-
- name: Run tests notebook
41-
run: |
42-
pytest --cov traitlets --cov-report=xml:coverage-from-notebook.xml \
43-
--pyargs notebook -k 'not selenium and not integration_tests'
44-
- name: Run tests ipywidgets
45-
run: |
46-
pytest --cov traitlets --cov-report=xml:coverage-from-ipywidgets.xml \
47-
--pyargs ipywidgets
31+
- name: Run tests IPython
32+
run: |
33+
iptest
34+
- name: Run tests nbconvert
35+
run: |
36+
pytest --cov traitlets --cov-report=xml:coverage-from-nbconvert.xml \
37+
--pyargs nbconvert -p no:unraisableexception -k 'not network'
38+
- name: Run tests notebook
39+
run: |
40+
pytest --cov traitlets --cov-report=xml:coverage-from-notebook.xml \
41+
--pyargs notebook -k 'not selenium and not integration_tests'
42+
- name: Run tests ipywidgets
43+
run: |
44+
pytest --cov traitlets --cov-report=xml:coverage-from-ipywidgets.xml \
45+
--pyargs ipywidgets
4846
49-
- name: Upload coverage to Codecov
50-
uses: codecov/codecov-action@v2
47+
- name: Upload coverage to Codecov
48+
uses: codecov/codecov-action@v2

.github/workflows/tests.yml

+23-26
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,10 @@ name: Tests
22

33
on:
44
push:
5-
branches: '*'
65
pull_request:
7-
branches: '*'
86

97
jobs:
108
tests:
11-
129
runs-on: ${{ matrix.os }}
1310
strategy:
1411
matrix:
@@ -23,26 +20,26 @@ jobs:
2320
- windows-latest
2421

2522
steps:
26-
- name: Checkout
27-
uses: actions/checkout@v2
28-
29-
- name: Set up Python ${{ matrix.python-version }}
30-
uses: actions/setup-python@v2
31-
with:
32-
python-version: ${{ matrix.python-version }}
33-
34-
- name: Install dependencies
35-
run: |
36-
pip install --upgrade pip
37-
pip install build
38-
python -m build .
39-
pip install dist/traitlets*.whl
40-
pip install --pre --upgrade traitlets[test] pytest pytest-cov
41-
pip freeze
42-
43-
- name: Test with pytest
44-
run: |
45-
pytest --cov traitlets --cov-report=xml -v traitlets
46-
47-
- name: Upload coverage to Codecov
48-
uses: codecov/codecov-action@v2
23+
- name: Checkout
24+
uses: actions/checkout@v2
25+
26+
- name: Set up Python ${{ matrix.python-version }}
27+
uses: actions/setup-python@v2
28+
with:
29+
python-version: ${{ matrix.python-version }}
30+
31+
- name: Install dependencies
32+
run: |
33+
pip install --upgrade pip
34+
pip install build
35+
python -m build .
36+
pip install dist/traitlets*.whl
37+
pip install --pre --upgrade traitlets[test] pytest pytest-cov
38+
pip freeze
39+
40+
- name: Test with pytest
41+
run: |
42+
pytest --cov traitlets --cov-report=xml -v traitlets
43+
44+
- name: Upload coverage to Codecov
45+
uses: codecov/codecov-action@v2

.mailmap

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ David Hirschfeld <[email protected]> dhirschfeld <david.hirschfeld
2626
David P. Sanders <[email protected]> David P. Sanders <[email protected]>
2727
David Warde-Farley <[email protected]> David Warde-Farley <>
2828
Doug Blank <[email protected]> Doug Blank <[email protected]>
29-
Eugene Van den Bulke <[email protected]> Eugene Van den Bulke <[email protected]>
29+
Eugene Van den Bulke <[email protected]> Eugene Van den Bulke <[email protected]>
3030
3131
3232

.pre-commit-config.yaml

+40-40
Original file line numberDiff line numberDiff line change
@@ -6,52 +6,52 @@ repos:
66
rev: v4.1.0
77
hooks:
88
- id: debug-statements
9-
# - id: end-of-file-fixer
10-
# - id: check-case-conflict
11-
# - id: check-executables-have-shebangs
12-
# - id: requirements-txt-fixer
13-
# - id: check-added-large-files
14-
# - id: check-case-conflict
15-
# - id: check-toml
16-
# - id: check-yaml
17-
# - id: forbid-new-submodules
18-
# - id: check-builtin-literals
19-
# - id: trailing-whitespace
9+
- id: end-of-file-fixer
10+
- id: check-case-conflict
11+
- id: check-executables-have-shebangs
12+
- id: requirements-txt-fixer
13+
- id: check-added-large-files
14+
- id: check-case-conflict
15+
- id: check-toml
16+
- id: check-yaml
17+
- id: forbid-new-submodules
18+
- id: check-builtin-literals
19+
- id: trailing-whitespace
2020

21-
# - repo: https://github.com/psf/black
22-
# rev: 22.3.0
23-
# hooks:
24-
# - id: black
25-
# args: ["--line-length", "100"]
21+
- repo: https://github.com/psf/black
22+
rev: 22.3.0
23+
hooks:
24+
- id: black
25+
args: ["--line-length", "100"]
2626

27-
# - repo: https://github.com/PyCQA/isort
28-
# rev: 5.10.1
29-
# hooks:
30-
# - id: isort
31-
# files: \.py$
32-
# args: [--profile=black]
27+
- repo: https://github.com/PyCQA/isort
28+
rev: 5.10.1
29+
hooks:
30+
- id: isort
31+
files: \.py$
32+
args: [--profile=black]
3333

3434
# - repo: https://github.com/pre-commit/mirrors-mypy
3535
# rev: v0.942
3636
# hooks:
3737
# - id: mypy
3838

39-
# - repo: https://github.com/pre-commit/mirrors-prettier
40-
# rev: v2.6.2
41-
# hooks:
42-
# - id: prettier
39+
- repo: https://github.com/pre-commit/mirrors-prettier
40+
rev: v2.6.2
41+
hooks:
42+
- id: prettier
4343

44-
# - repo: https://github.com/asottile/pyupgrade
45-
# rev: v2.31.1
46-
# hooks:
47-
# - id: pyupgrade
48-
# args: [--py37-plus]
44+
- repo: https://github.com/asottile/pyupgrade
45+
rev: v2.31.1
46+
hooks:
47+
- id: pyupgrade
48+
args: [--py37-plus]
4949

50-
# - repo: https://github.com/PyCQA/doc8
51-
# rev: 0.11.1
52-
# hooks:
53-
# - id: doc8
54-
# args: [--max-line-length=200]
50+
- repo: https://github.com/PyCQA/doc8
51+
rev: 0.11.1
52+
hooks:
53+
- id: doc8
54+
args: [--max-line-length=200]
5555

5656
# - repo: https://github.com/pycqa/flake8
5757
# rev: 4.0.1
@@ -64,10 +64,10 @@ repos:
6464
# "flake8-implicit-str-concat==0.2.0",
6565
# ]
6666

67-
# - repo: https://github.com/pre-commit/mirrors-eslint
68-
# rev: v8.12.0
69-
# hooks:
70-
# - id: eslint
67+
- repo: https://github.com/pre-commit/mirrors-eslint
68+
rev: v8.12.0
69+
hooks:
70+
- id: eslint
7171

7272
- repo: https://github.com/sirosen/check-jsonschema
7373
rev: 0.14.2

COPYING.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ software without specific prior written permission.
2727
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
2828
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
2929
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
30-
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
30+
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
3131
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
3232
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
3333
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
@@ -49,8 +49,8 @@ IPython uses a shared copyright model. Each contributor maintains copyright
4949
over their contributions to IPython. But, it is important to note that these
5050
contributions are typically only changes to the repositories. Thus, the IPython
5151
source code, in its entirety is not the copyright of any single person or
52-
institution. Instead, it is the collective copyright of the entire IPython
53-
Development Team. If individual contributors want to maintain a record of what
52+
institution. Instead, it is the collective copyright of the entire IPython
53+
Development Team. If individual contributors want to maintain a record of what
5454
changes/contributions they have specific copyright on, they should indicate
5555
their copyright in the commit message of the change, when they commit the
5656
change to one of the IPython repositories.

README.md

+9-9
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,17 @@
44
[![Test downstream projects](https://github.com/ipython/traitlets/actions/workflows/downstream.yml/badge.svg)](https://github.com/ipython/traitlets/actions/workflows/downstream.yml)
55
[![Documentation Status](https://readthedocs.org/projects/traitlets/badge/?version=latest)](https://traitlets.readthedocs.io/en/latest/?badge=latest)
66

7-
| | |
8-
|---------------|----------------------------------------|
9-
| **home** | https://github.com/ipython/traitlets |
10-
| **pypi-repo** | https://pypi.org/project/traitlets/ |
11-
| **docs** | https://traitlets.readthedocs.io/ |
12-
| **license** | Modified BSD License |
7+
| | |
8+
| ------------- | ------------------------------------ |
9+
| **home** | https://github.com/ipython/traitlets |
10+
| **pypi-repo** | https://pypi.org/project/traitlets/ |
11+
| **docs** | https://traitlets.readthedocs.io/ |
12+
| **license** | Modified BSD License |
1313

1414
Traitlets is a pure Python library enabling:
1515

1616
- the enforcement of strong typing for attributes of Python objects
17-
(typed attributes are called *"traits"*);
17+
(typed attributes are called _"traits"_);
1818
- dynamically calculated default values;
1919
- automatic validation and coercion of trait attributes when attempting a
2020
change;
@@ -25,7 +25,7 @@ Traitlets is a pure Python library enabling:
2525

2626
Its implementation relies on the [descriptor](https://docs.python.org/howto/descriptor.html)
2727
pattern, and it is a lightweight pure-python alternative of the
28-
[*traits* library](https://docs.enthought.com/traits/).
28+
[_traits_ library](https://docs.enthought.com/traits/).
2929

3030
Traitlets powers the configuration system of IPython and Jupyter
3131
and the declarative API of IPython interactive widgets.
@@ -91,7 +91,7 @@ To do something when a trait attribute is changed, decorate a method with
9191
The method will be called with a single argument, a dictionary which contains
9292
an owner, new value, old value, name of the changed trait, and the event type.
9393

94-
In this example, the `_num_changed` method is decorated with ``@observe(`num`)``:
94+
In this example, the `_num_changed` method is decorated with `` @observe(`num`) ``:
9595

9696
```Python
9797
from traitlets import HasTraits, Integer, observe

0 commit comments

Comments
 (0)