Skip to content

Commit 4ec1933

Browse files
authored
Merge pull request #15 from RazerM/fix-yapf
Fix yapf on CI
2 parents e48d80f + 97e8ba3 commit 4ec1933

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

CHEATSHEET.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@ To run yapf
1414
-----------
1515

1616
* Show what changes yapf wants to make: ``yapf -rpd setup.py
17-
outcome``
17+
src tests``
1818

1919
* Apply all changes directly to the source tree: ``yapf -rpi setup.py
20-
outcome``
20+
src tests``
2121

2222

2323
To make a release

ci/travis.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,15 +55,15 @@ pip install -U pip setuptools wheel
5555

5656
if [ "$CHECK_FORMATTING" = "1" ]; then
5757
pip install yapf==${YAPF_VERSION}
58-
if ! yapf -rpd setup.py outcome; then
58+
if ! yapf -rpd setup.py src tests; then
5959
cat <<EOF
6060
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
6161
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
6262
6363
Formatting problems were found (listed above). To fix them, run
6464
6565
pip install yapf==${YAPF_VERSION}
66-
yapf -rpi setup.py outcome
66+
yapf -rpi setup.py src tests
6767
6868
in your local checkout.
6969

src/outcome/__init__.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,13 @@
88

99
if sys.version_info >= (3, 5):
1010
from ._async import Error, Outcome, Value, acapture, capture
11-
__all__ = ('Error', 'Outcome', 'Value', 'acapture', 'capture', 'AlreadyUsedError')
11+
__all__ = (
12+
'Error', 'Outcome', 'Value', 'acapture', 'capture', 'AlreadyUsedError'
13+
)
1214
else:
1315
from ._sync import Error, Outcome, Value, capture
1416
__all__ = ('Error', 'Outcome', 'Value', 'capture', 'AlreadyUsedError')
1517

16-
1718
from ._util import fixup_module_metadata, AlreadyUsedError
1819
fixup_module_metadata(__name__, globals())
1920
del fixup_module_metadata

src/outcome/_sync.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ def capture(sync_fn, *args, **kwargs):
2121
except BaseException as exc:
2222
return Error(exc)
2323

24+
2425
@attr.s(repr=False, init=False, slots=True)
2526
class Outcome(ABC):
2627
"""An abstract class representing the result of a Python computation.
@@ -44,7 +45,6 @@ def _set_unwrapped(self):
4445
raise AlreadyUsedError
4546
object.__setattr__(self, '_unwrapped', True)
4647

47-
4848
@abc.abstractmethod
4949
def unwrap(self):
5050
"""Return or raise the contained value or exception.
@@ -108,4 +108,3 @@ def unwrap(self):
108108
def send(self, it):
109109
self._set_unwrapped()
110110
return it.throw(self.error)
111-

0 commit comments

Comments
 (0)