Skip to content

Commit

Permalink
fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
Alessandro De Maria committed Feb 5, 2024
1 parent 76a0394 commit 14dc7b7
Show file tree
Hide file tree
Showing 5 changed files with 35 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/python-lint-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.7, 3.8, 3.9]
python-version: ['3.10', '3.11']

steps:
- uses: actions/checkout@v2
Expand Down
23 changes: 23 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
---
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
hooks:
- id: trailing-whitespace
- id: check-docstring-first
- id: debug-statements
- id: end-of-file-fixer
- id: requirements-txt-fixer
- id: check-merge-conflict
- repo: https://github.com/psf/black
rev: 23.3.0
hooks:
- id: black
- repo: https://github.com/PyCQA/isort
rev: 5.12.0
hooks:
- id: isort
args: [--profile, black]
- repo: meta
hooks:
- id: check-useless-excludes
11 changes: 9 additions & 2 deletions kadet/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@

import yaml
from box import Box, BoxList
from pydantic import ConfigDict, BaseModel as PydanticBaseModel
from pydantic import BaseModel as PydanticBaseModel
from pydantic import ConfigDict
from typeguard import check_type

ABORT_EXCEPTION_TYPE = ValueError
Expand Down Expand Up @@ -252,6 +253,12 @@ def _dump(self, obj):
def dump(self):
"""Return object dict/list."""
return self._dump(self)

# TODO[pydantic]: The following keys were removed: `copy_on_model_validation`, `underscore_attrs_are_private`.
# Check https://docs.pydantic.dev/dev-v2/migration/#changes-to-config for more information.
model_config = ConfigDict(arbitrary_types_allowed=True, copy_on_model_validation=False, underscore_attrs_are_private=True, extra="allow")
model_config = ConfigDict(
arbitrary_types_allowed=True,
copy_on_model_validation=False,
underscore_attrs_are_private=True,
extra="allow",
)
1 change: 1 addition & 0 deletions tests/test_multidoc.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
"multidoc tests"

import unittest

from kadet import BaseObj


Expand Down
1 change: 1 addition & 0 deletions tests/test_sha256.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
"sha256 tests"

import unittest

from kadet import BaseObj


Expand Down

0 comments on commit 14dc7b7

Please sign in to comment.