Skip to content

Commit

Permalink
Update and rename autopep8.yml to autopep8-black.yml (#894)
Browse files Browse the repository at this point in the history
* Update and rename autopep8.yml to autopep8-black.yml

* Update .travis.yml

* autopep8 fix

Co-authored-by: AutoPEP8 <>
  • Loading branch information
vfdev-5 authored Apr 7, 2020
1 parent a7c4780 commit 4b311cc
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,14 +1,18 @@
name: Format python code
on: push
jobs:
autopep8:
autopep8-black:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: autopep8
uses: peter-evans/autopep8@v1.0.0
with:
args: --recursive --in-place --aggressive --aggressive .
- name: autoblack
uses: lgeiger/black-action@v1.0.1
with:
args: "."
- name: Commit and push changes
uses: stefanzweifel/git-auto-commit-action@v2.0.0
with:
Expand Down
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ jobs:
install: pip install flake8 black
script:
- flake8 .
- black .
- black --check .
after_success: # Nothing to do

# GitHub Pages Deployment: https://docs.travis-ci.com/user/deployment/pages/
Expand Down
2 changes: 2 additions & 0 deletions ignite/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,7 @@ def some_handler(_):
def some_handler(_):
...
"""

def _one_rank_only(func):
@wraps(func)
def wrapper(*args, **kwargs):
Expand All @@ -158,6 +159,7 @@ def wrapper(*args, **kwargs):
if barrier:
dist.barrier()
return ret

return wrapper

return _one_rank_only
2 changes: 0 additions & 2 deletions tests/ignite/test_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,6 @@ def _(_):


def _test_distrib_one_rank_only(device):

def _test(barrier):
# last rank
rank = dist.get_world_size() - 1
Expand Down Expand Up @@ -146,7 +145,6 @@ def initialize():


def _test_distrib_one_rank_only_with_engine(device):

def _test(barrier):
engine = Engine(lambda e, b: b)

Expand Down

0 comments on commit 4b311cc

Please sign in to comment.