Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reduce maximum McCabe complexity from 11 to 10 #309

Merged
merged 1 commit into from
Dec 31, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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