Skip to content

Commit

Permalink
chore: bump versions of python packages for dev
Browse files Browse the repository at this point in the history
  • Loading branch information
taro-kayo committed May 26, 2023
1 parent 44b5d90 commit 2010ba0
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 18 deletions.
8 changes: 4 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
repos:
- repo: https://github.com/pycqa/isort
rev: 5.10.1
rev: 5.12.0
hooks:
- id: isort
args: [--profile, black]
- repo: https://github.com/psf/black
rev: 22.1.0
rev: 23.3.0
hooks:
- id: black
- repo: https://github.com/PyCQA/flake8
rev: 4.0.1
rev: 6.0.0
hooks:
- id: flake8
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v0.931
rev: v1.3.0
hooks:
- id: mypy
additional_dependencies:
Expand Down
14 changes: 7 additions & 7 deletions requirements/dev.txt
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
-r ./test.txt

pre-commit==2.17.0
black==22.1.0
flake8==4.0.1
isort==5.10.1
mypy==0.931
pre-commit==3.3.2
black==23.3.0
flake8==6.0.0
isort==5.12.0
mypy==1.3.0

types-python-dateutil==2.8.9
types-PyYAML==6.0.4
types-python-dateutil==2.8.19.13
types-PyYAML==6.0.12.10
4 changes: 2 additions & 2 deletions requirements/test.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
-r ./main.txt

pytest==7.0.1
pytest-cov==3.0.0
pytest==7.3.1
pytest-cov==4.1.0
6 changes: 4 additions & 2 deletions statelint/config.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from typing import Set
from typing import Optional, Set

from .problem import ProblemType

Expand All @@ -12,7 +12,9 @@ def input_type(self) -> str:
return "YAML" if self.is_yaml else "JSON"

def __init__(
self, ignored_problem_types: Set[ProblemType] = None, yaml: bool = False
self,
ignored_problem_types: Optional[Set[ProblemType]] = None,
yaml: bool = False,
):
self.ignored_problem_types = ignored_problem_types or set()
self.is_yaml = yaml
6 changes: 5 additions & 1 deletion statelint/fields/num_field.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,11 @@ class BaseNumericField(NonNullMixin, Field, ABC):
_ceiling: Optional[int]

def __init__(
self, name: str, floor: int = None, ceiling: int = None, inclusive: bool = True
self,
name: str,
floor: Optional[int] = None,
ceiling: Optional[int] = None,
inclusive: bool = True,
) -> None:
super().__init__(name)
self._floor = floor
Expand Down
5 changes: 3 additions & 2 deletions statelint/linter.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import json
import os.path
from typing import Any, Callable, Dict, List, Union
from typing import Any, Callable, Dict, List, Optional, Union

from .config import Config
from .nodes.factory.factory import StateFactory
Expand All @@ -16,7 +16,8 @@ def __init__(self, root_cause: Exception) -> None:
class Linter:
@staticmethod
def validate(
json_str_or_dict_or_file_path: Union[str, Dict[str, Any]], config: Config = None
json_str_or_dict_or_file_path: Union[str, Dict[str, Any]],
config: Optional[Config] = None,
) -> List[str]:
if not config:
config = Config()
Expand Down

0 comments on commit 2010ba0

Please sign in to comment.