Skip to content

Commit

Permalink
isort and black (#11)
Browse files Browse the repository at this point in the history
`isort` and `black` applied.
  • Loading branch information
joaonc authored Apr 10, 2022
1 parent ee00865 commit 203356f
Show file tree
Hide file tree
Showing 13 changed files with 237 additions and 149 deletions.
21 changes: 21 additions & 0 deletions .github/workflows/linting.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: linting
# Linting tools use `pyproject.toml` and `setup.cfg` for config.

on:
- pull_request

jobs:
linting:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: "3.7"
- name: Install requirements
run: pip install -r requirements-dev.txt
- name: isort
run: isort .
- name: black
run: black .
4 changes: 2 additions & 2 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
- name: Install requirements
run: |
python -m pip install -U pip
python -m pip install -r test-requires.txt
python -m pip install -r requirements-test.txt
- name: Run tests
run: |
pytest test.py
python -m pytest .
11 changes: 7 additions & 4 deletions CHANGELOG.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
0.5.0 (unreleased)
* Update some documentation to point to `pprintpp2` instead.
* Use GitHub Actions instead of Travis.
* Use `pytest` instead of `nose` (thanks @pgajdos).
* Add `sort_dict` option (thanks @gergelyk).
* Update documentation to point to `pprintpp2` instead.
* Remove support for older Python versions (3.7+ from now on).
* Add `sort_dict` option (thanks @gergelyk).
* Use `pytest` instead of `nose` (thanks @pgajdos).
* Use GitHub Actions instead of Travis.
* Linting (isort, black, etc.).
Wrapping at 100 lines from the previous 80.
* Other file and folder restructuring.

0.4.0
* Add IPython plugin (thanks @roee30;
Expand Down
2 changes: 1 addition & 1 deletion pp/pp.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def fmt(self, *args, **kwargs):
return self.pformat(*args, **kwargs)

def __repr__(self):
return "<module '%s' (pp_magic_module with pprint_mod=%r)>" %(
return "<module '%s' (pp_magic_module with pprint_mod=%r)>" % (
self.__name__,
self.pprint_mod.__name__,
)
Expand Down
10 changes: 8 additions & 2 deletions pp/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,9 @@
py_modules=["pp"],
install_requires=[],
license="BSD",
classifiers=[ x.strip() for x in """
classifiers=[
x.strip()
for x in """
Development Status :: 3 - Alpha
Environment :: Console
Intended Audience :: Developers
Expand All @@ -34,5 +36,9 @@
Programming Language :: Python :: 3
Topic :: Software Development
Topic :: Utilities
""".split("\n") if x.strip() ],
""".split(
"\n"
)
if x.strip()
],
)
Loading

0 comments on commit 203356f

Please sign in to comment.