Skip to content

Commit

Permalink
Fixed flake8 issues
Browse files Browse the repository at this point in the history
  • Loading branch information
syrusakbary committed Jun 22, 2018
1 parent d311062 commit 9812ec7
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 25 deletions.
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,5 +34,5 @@ matrix:
script: flake8
- python: '3.5'
script: |
pip install mypy
mypy promise/ --check-untyped-defs --ignore-missing-imports
pip install pyre-check
pyre --source-directory promise check
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ With `mypy`

```sh
pip install mypy
mypy promise
mypy promise --ignore-missing-imports
```

with `pyre`:
Expand Down
2 changes: 1 addition & 1 deletion promise/async_.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Based on https://github.com/petkaantonov/bluebird/blob/master/src/promise.js
import collections
from .schedulers.immediate import ImmediateScheduler
from .schedulers.immediate import ImmediateScheduler # flake8: noqa
from typing import Callable
from collections import deque
from typing import Optional
Expand Down
11 changes: 1 addition & 10 deletions promise/promise.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,23 +6,14 @@

from six import reraise # type: ignore
from typing import (List, Any, Callable, Dict, Iterator, Optional, # flake8: noqa
Union)
Tuple, Union, TypeVar, Generic, Hashable)

from .async_ import Async
from .compat import (Future, ensure_future, iscoroutine, # type: ignore
iterate_promise) # type: ignore
from .utils import deprecated, integer_types, string_types, text_type, binary_type, warn
from .promise_list import PromiseList
from .schedulers.immediate import ImmediateScheduler
from typing import Any
from typing import Callable
from typing import Optional
from typing import Dict
from typing import List
from typing import Union
from typing import Iterator
from typing import Tuple
from typing import TypeVar, Generic, Hashable
# from .schedulers.gevent import GeventScheduler
# from .schedulers.asyncio import AsyncioScheduler
# from .schedulers.thread import ThreadScheduler
Expand Down
9 changes: 2 additions & 7 deletions promise/promise_list.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,7 @@
from functools import partial
from collections import Iterable
from typing import Any
from typing import Optional
from typing import Tuple
from typing import Union
from typing import List
from typing import Type
from typing import Collection
from typing import (Any, Optional, Tuple, Union, List,
Type, Collection) # flake8: noqa
if False:
from .promise import Promise

Expand Down
2 changes: 1 addition & 1 deletion promise/pyutils/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,6 @@ def get_git_changeset():
)
timestamp = git_log.communicate()[0]
timestamp = datetime.datetime.utcfromtimestamp(int(timestamp))
except:
except Exception:
return None
return timestamp.strftime('%Y%m%d%H%M%S')
4 changes: 1 addition & 3 deletions promise/schedulers/immediate.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
from threading import Event
from typing import Callable
from typing import Any
from typing import Optional
from typing import Callable, Any, Optional # flake8: noqa
if False:
from ..promise import Promise

Expand Down

0 comments on commit 9812ec7

Please sign in to comment.