Skip to content

Commit

Permalink
Reduce maximum McCabe complexity from 11 to 10 (#309)
Browse files Browse the repository at this point in the history
  • Loading branch information
brainix committed Dec 31, 2020
1 parent 6a155e7 commit 38d7035
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,5 +46,5 @@ jobs:
mypy --no-incremental
- name: Lint with Flake8 and isort
run: |
flake8 *\.py pottery/*\.py tests/*\.py --count --max-complexity=11 --statistics
flake8 *\.py pottery/*\.py tests/*\.py --count --max-complexity=10 --statistics
isort *\.py pottery/*\.py tests/*\.py --check-only --diff
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ ifeq ($(tests),)
echo Running static type checks && \
mypy --no-incremental && \
echo Running Flake8 on $($@_SOURCE_FILES) && \
flake8 $($@_SOURCE_FILES) --count --max-complexity=11 --statistics && \
flake8 $($@_SOURCE_FILES) --count --max-complexity=10 --statistics && \
echo Running isort on $($@_SOURCE_FILES) && \
isort $($@_SOURCE_FILES) --check-only --diff
else
Expand Down
2 changes: 1 addition & 1 deletion pottery/cache.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ def _arg_hash(*args: Hashable, **kwargs: Hashable) -> int:
F = TypeVar('F', bound=Callable[..., JSONTypes])


def redis_cache(*,
def redis_cache(*, # NoQA: C901
redis: Optional[Redis] = None,
key: Optional[str] = None,
timeout: Optional[int] = _DEFAULT_TIMEOUT,
Expand Down

0 comments on commit 38d7035

Please sign in to comment.