diff --git a/docs/requirements.txt b/docs/requirements.txt index 58ad506be2..dd6554c2f2 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -1,8 +1,8 @@ ansi2html==1.5.2 -mkdocs==1.1.0 -markdown==3.2.1 +mkdocs==1.1.2 +markdown==3.2.2 mkdocs-exclude==1.0.2 -mkdocs-material==5.1.3 +mkdocs-material==5.1.7 markdown-include==0.5.1 pygments==2.6.1 sqlalchemy # pyup: ignore diff --git a/pydantic/color.py b/pydantic/color.py index fe10e1f5e1..97fc76bf50 100644 --- a/pydantic/color.py +++ b/pydantic/color.py @@ -312,11 +312,11 @@ def parse_float_alpha(value: Union[None, str, float, int]) -> Optional[float]: raise ColorError(reason='alpha values must be in the range 0 to 1') -def parse_hsl(h: str, h_units: str, s: str, l: str, alpha: Optional[float] = None) -> RGBA: +def parse_hsl(h: str, h_units: str, sat: str, light: str, alpha: Optional[float] = None) -> RGBA: """ Parse raw hue, saturation, lightness and alpha values and convert to RGBA. """ - s_value, l_value = parse_color_value(s, 100), parse_color_value(l, 100) + s_value, l_value = parse_color_value(sat, 100), parse_color_value(light, 100) h_value = float(h) if h_units in {None, 'deg'}: diff --git a/pydantic/error_wrappers.py b/pydantic/error_wrappers.py index acbeb430dc..92d957f8d9 100644 --- a/pydantic/error_wrappers.py +++ b/pydantic/error_wrappers.py @@ -73,7 +73,7 @@ def display_errors(errors: List[Dict[str, Any]]) -> str: def _display_error_loc(error: Dict[str, Any]) -> str: - return ' -> '.join(str(l) for l in error['loc']) + return ' -> '.join(str(e) for e in error['loc']) def _display_error_type_and_ctx(error: Dict[str, Any]) -> str: diff --git a/tests/requirements.txt b/tests/requirements.txt index 7212639624..4a7a3ac94b 100644 --- a/tests/requirements.txt +++ b/tests/requirements.txt @@ -1,13 +1,13 @@ black==19.10b0 coverage==5.1 Cython==0.29.17;sys_platform!='win32' -flake8==3.7.9 -flake8-quotes==3 +flake8==3.8.1 +flake8-quotes==3.2.0 isort==4.3.21 mypy==0.770 -pycodestyle==2.5.0 -pyflakes==2.1.1 -pytest==5.4.1 +pycodestyle==2.6.0 +pyflakes==2.2.0 +pytest==5.4.2 pytest-cov==2.8.1 pytest-mock==3.1.0 pytest-sugar==0.9.3 diff --git a/tests/test_main.py b/tests/test_main.py index fdbc9ea3f1..76e05b70ad 100644 --- a/tests/test_main.py +++ b/tests/test_main.py @@ -1049,7 +1049,7 @@ class NewModel(DerivedModel, something=2): def test_update_forward_refs_does_not_modify_module_dict(): class MyModel(BaseModel): - field: Optional['MyModel'] + field: Optional['MyModel'] # noqa: F821 MyModel.update_forward_refs() diff --git a/tests/test_networks.py b/tests/test_networks.py index 16245a9dd5..b078d7729c 100644 --- a/tests/test_networks.py +++ b/tests/test_networks.py @@ -332,7 +332,7 @@ class Model(BaseModel): def test_custom_schemes(): class Model(BaseModel): - v: stricturl(strip_whitespace=False, allowed_schemes={'ws', 'wss'}) + v: stricturl(strip_whitespace=False, allowed_schemes={'ws', 'wss'}) # noqa: F821 assert Model(v='ws://example.org').v == 'ws://example.org' diff --git a/tests/test_types.py b/tests/test_types.py index 892a17ab95..1b720d528f 100644 --- a/tests/test_types.py +++ b/tests/test_types.py @@ -519,7 +519,7 @@ def test_string_success(): class MoreStringsModel(BaseModel): str_strip_enabled: constr(strip_whitespace=True) str_strip_disabled: constr(strip_whitespace=False) - str_regex: constr(regex=r'^xxx\d{3}$') = ... + str_regex: constr(regex=r'^xxx\d{3}$') = ... # noqa: F722 str_min_length: constr(min_length=5) = ... str_curtailed: constr(curtail_length=5) = ... str_email: EmailStr = ... @@ -548,7 +548,7 @@ class MoreStringsModel(BaseModel): @pytest.mark.skipif(not email_validator, reason='email_validator not installed') def test_string_fails(): class MoreStringsModel(BaseModel): - str_regex: constr(regex=r'^xxx\d{3}$') = ... + str_regex: constr(regex=r'^xxx\d{3}$') = ... # noqa: F722 str_min_length: constr(min_length=5) = ... str_curtailed: constr(curtail_length=5) = ... str_email: EmailStr = ...