Skip to content
This repository has been archived by the owner on Nov 19, 2023. It is now read-only.

Commit

Permalink
Merge pull request #232 from snok/dependency-update
Browse files Browse the repository at this point in the history
updated deps and pre-commit
  • Loading branch information
Goldziher authored May 20, 2021
2 parents 3804e55 + 445c8ca commit 72d7899
Show file tree
Hide file tree
Showing 9 changed files with 277 additions and 277 deletions.
10 changes: 5 additions & 5 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
repos:
- repo: https://github.com/ambv/black
rev: 20.8b1
rev: 21.5b1
hooks:
- id: black
args: ["--quiet"]
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v3.4.0
rev: v4.0.1
hooks:
- id: check-case-conflict
- id: end-of-file-fixer
Expand All @@ -15,7 +15,7 @@ repos:
- id: check-yaml
- id: check-merge-conflict
- repo: https://gitlab.com/pycqa/flake8
rev: 3.8.4
rev: 3.9.2
hooks:
- id: flake8
additional_dependencies: [
Expand All @@ -28,7 +28,7 @@ repos:
'flake8-pytest-style',
]
- repo: https://github.com/asottile/pyupgrade
rev: v2.10.0
rev: v2.17.0
hooks:
- id: pyupgrade
args: ["--py36-plus"]
Expand All @@ -37,7 +37,7 @@ repos:
hooks:
- id: seed-isort-config
- repo: https://github.com/pycqa/isort
rev: 5.7.0
rev: 5.8.0
hooks:
- id: isort
- repo: https://github.com/pre-commit/mirrors-mypy
Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

## v1.3.6 2021-05-20

* Update dependencies

## v1.3.5 2020-02-28

* Rework schema reference logic, to improve handling of nested structures.
Expand Down
2 changes: 1 addition & 1 deletion openapi_tester/case_testers.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@


def _create_tester(casing: str, handler: Callable[[Any], str]) -> Callable[[str], None]:
""" factory function for creating testers """
"""factory function for creating testers"""

def tester(key: str) -> None:
stripped = key.strip()
Expand Down
2 changes: 1 addition & 1 deletion openapi_tester/schema_tester.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@


class SchemaTester:
""" Schema Tester: this is the base class of the library. """
"""Schema Tester: this is the base class of the library."""

loader: Union[StaticSchemaLoader, DrfSpectacularSchemaLoader, DrfYasgSchemaLoader]
validators: List[Callable[[dict, Any], Optional[str]]]
Expand Down
6 changes: 3 additions & 3 deletions openapi_tester/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@


def merge_objects(dictionaries: Sequence[Dict[str, Any]]) -> Dict[str, Any]:
""" helper function to deep merge objects """
"""helper function to deep merge objects"""
output: Dict[str, Any] = {}
for dictionary in dictionaries:
for key, value in dictionary.items():
Expand All @@ -23,7 +23,7 @@ def merge_objects(dictionaries: Sequence[Dict[str, Any]]) -> Dict[str, Any]:


def normalize_schema_section(schema_section: dict) -> dict:
""" helper method to remove allOf and handle edge uses of oneOf"""
"""helper method to remove allOf and handle edge uses of oneOf"""
output: Dict[str, Any] = deepcopy(schema_section)
if output.get("allOf"):
all_of = output.pop("allOf")
Expand All @@ -41,7 +41,7 @@ def normalize_schema_section(schema_section: dict) -> dict:


def lazy_combinations(options_list: Sequence[Dict[str, Any]]) -> Iterator[dict]:
""" helper to lazy evaluate possible permutations of possible combinations """
"""helper to lazy evaluate possible permutations of possible combinations"""
for i in range(2, len(options_list) + 1):
for combination in combinations(options_list, i):
yield merge_objects(combination)
Loading

0 comments on commit 72d7899

Please sign in to comment.