Skip to content

Commit

Permalink
Prep for Python 3.13 / pydantic mypy (#83)
Browse files Browse the repository at this point in the history
* Prep for Python 3.13 / pydantic mypy
* Might as well use 3.12 for the lint tests
  • Loading branch information
pirxthepilot authored Oct 18, 2024
1 parent 22d1511 commit fd56f6c
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ jobs:
- name: Install hatch
run: pip install hatch

- if: matrix.python-version == '3.9' && runner.os == 'Linux'
- if: matrix.python-version == '3.12' && runner.os == 'Linux'
name: Lint
run: hatch run lint:all

Expand Down
9 changes: 8 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ test-all = [

# Hatch test env
[[tool.hatch.envs.test.matrix]]
python = ["38", "39", "310", "311", "312"]
python = ["38", "39", "310", "311", "312", "313"]

# Hatch lint env
[tool.hatch.envs.lint]
Expand Down Expand Up @@ -111,11 +111,18 @@ profile = "black"

# mypy
[tool.mypy]
plugins = ["pydantic.mypy"]

ignore_missing_imports = true
no_implicit_optional = true
warn_unreachable = true
pretty = true

[tool.pydantic-mypy]
init_forbid_extra = true
init_typed = true
warn_required_dynamic_aliases = true

# pytest-cov
[tool.coverage.run]
omit = [
Expand Down
2 changes: 1 addition & 1 deletion wtfis/models/ipwhois.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ class IpWhois(IpGeoAsnBase):
domain: str = Field(validation_alias=AliasPath("connection", "domain"))


class IpWhoisMap(IpGeoAsnMapBase):
class IpWhoisMap(IpGeoAsnMapBase): # type: ignore[override]
root: Dict[str, IpWhois]

@classmethod
Expand Down

0 comments on commit fd56f6c

Please sign in to comment.