From 82fff7a634d67da063ae9a432d061c7d2e216e23 Mon Sep 17 00:00:00 2001 From: Samuel Colvin Date: Mon, 26 Apr 2021 12:51:25 +0100 Subject: [PATCH] fix linting, skip macos tests --- .github/workflows/ci.yml | 2 +- Makefile | 4 ++-- arq/typing.py | 6 +++--- setup.cfg | 2 +- tests/requirements-linting.txt | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ee3a0645..2a0930ec 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -48,7 +48,7 @@ jobs: strategy: fail-fast: false matrix: - os: [ubuntu, macos] + os: [ubuntu] python-version: ['3.6', '3.7', '3.8', '3.9'] env: diff --git a/Makefile b/Makefile index 99fde473..35fd24c5 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,5 @@ .DEFAULT_GOAL := all -isort = isort -rc arq tests +isort = isort arq tests black = black -S -l 120 --target-version py37 arq tests .PHONY: install @@ -16,7 +16,7 @@ format: .PHONY: lint lint: flake8 arq/ tests/ - $(isort) --check-only -df + $(isort) --check-only --df $(black) --check .PHONY: test diff --git a/arq/typing.py b/arq/typing.py index cd7d3336..bde59053 100644 --- a/arq/typing.py +++ b/arq/typing.py @@ -3,9 +3,9 @@ from typing import TYPE_CHECKING, Any, Dict, Optional, Sequence, Set, Type, Union if sys.version_info >= (3, 8): - from typing import Protocol, Literal + from typing import Literal, Protocol else: - from typing_extensions import Protocol, Literal + from typing_extensions import Literal, Protocol __all__ = ( 'OptionType', @@ -19,8 +19,8 @@ if TYPE_CHECKING: - from .worker import Function # noqa F401 from .cron import CronJob # noqa F401 + from .worker import Function # noqa F401 OptionType = Union[None, Set[int], int] WEEKDAYS = 'mon', 'tues', 'wed', 'thurs', 'fri', 'sat', 'sun' diff --git a/setup.cfg b/setup.cfg index 15fc6271..12a7f168 100644 --- a/setup.cfg +++ b/setup.cfg @@ -25,7 +25,7 @@ exclude_lines = [isort] line_length=120 -known_standard_library=dataclasses +known_third_party=pytest multi_line_output=3 include_trailing_comma=True force_grid_wrap=0 diff --git a/tests/requirements-linting.txt b/tests/requirements-linting.txt index 134fb757..92e22d95 100644 --- a/tests/requirements-linting.txt +++ b/tests/requirements-linting.txt @@ -1,7 +1,7 @@ black==19.10b0 flake8==3.7.9 flake8-quotes==3 -isort==4.3.21 +isort==5.8.0 mypy==0.812 pycodestyle==2.5.0 pyflakes==2.1.1