Skip to content

Commit 094c544

Browse files
Tim O'FarrellTim O'Farrell
Tim O'Farrell
authored and
Tim O'Farrell
committed
Pylint fixes
1 parent ff17255 commit 094c544

File tree

6 files changed

+10
-4
lines changed

6 files changed

+10
-4
lines changed

.github/workflows/quality.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727
- name: Install pytest code coverage
2828
run: python -m pip install ".[dev]"
2929
- name: testcoverage
30-
run: python -m pytest -n auto --cov-report=term-missing --cov=tests --cov=schemey --cov=marshy_config_schemey --cov=schemey_config_default --cov-fail-under=100
30+
run: python -m pytest -n auto --cov-report=term-missing --cov=tests --cov=schemey --cov=injecty_config_schemey --cov-fail-under=100
3131

3232
pylint:
3333
runs-on: ubuntu-latest
@@ -40,4 +40,4 @@ jobs:
4040
- name: Install pylint
4141
run: python -m pip install ".[dev]"
4242
- name: lint
43-
run: pylint marshy_config_schemey schemey schemey_config_default
43+
run: pylint injecty_config_schemey schemey

schemey/factory/impl_schema_factory.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ def from_json(
5757
name = item.get("name")
5858
if not name or not item.get("anyOf"):
5959
return
60-
for base, impls in context.marshy_context.injecty_context.impls.items():
60+
for base, _ in context.marshy_context.injecty_context.impls.items():
6161
if base.__name__ == name:
6262
schema = self.from_type(base, context, path, ref_schemas)
6363
return schema

schemey/factory/schema_factory_abc.py

-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
from abc import abstractmethod, ABC
2-
from functools import total_ordering
32
from typing import Type, Optional, Dict
43

54
from marshy.types import ExternalItemType

schemey/json_schema/ranges_validator.py

+3
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
1+
from dataclasses import dataclass
2+
13
from jsonschema.exceptions import ValidationError
24

35
from schemey.json_schema.schema_validator_abc import SchemaValidatorABC
46

57

8+
@dataclass(frozen=True)
69
class RangesValidator(SchemaValidatorABC):
710
"""
811
Add a custom validation rule for ranges to json object schema.

schemey/json_schema/schema_validator_abc.py

+2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
from abc import ABC
2+
from dataclasses import dataclass
23

34

5+
@dataclass(frozen=True)
46
class SchemaValidatorABC(ABC):
57
property_name: str
68

schemey/json_schema/timestamp_validator.py

+2
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
1+
from dataclasses import dataclass
12
from datetime import datetime, timezone
23

34
from jsonschema.exceptions import ValidationError
45

56
from schemey.json_schema.schema_validator_abc import SchemaValidatorABC
67

78

9+
@dataclass(frozen=True)
810
class TimestampValidator(SchemaValidatorABC):
911
"""
1012
Add a custom date validation rule to json object schema.

0 commit comments

Comments
 (0)