Skip to content

Commit

Permalink
Update usage of typing dict and list
Browse files Browse the repository at this point in the history
  • Loading branch information
glatterf42 committed Oct 28, 2024
1 parent 36e9c33 commit b11ba3c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions ixmp/backend/jdbc.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
from functools import lru_cache
from pathlib import Path, PurePosixPath
from types import SimpleNamespace
from typing import Generator, List, Mapping, Optional
from typing import Generator, Mapping, Optional
from weakref import WeakKeyDictionary

import jpype
Expand Down Expand Up @@ -1290,7 +1290,7 @@ def start_jvm(jvmargs=None):
# Conversion methods


def to_pylist(jlist) -> List:
def to_pylist(jlist) -> list:
"""Convert Java list types to :class:`list`."""
try:
return list(jlist[:])
Expand Down
4 changes: 2 additions & 2 deletions ixmp/model/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import os
import re
from abc import ABC, abstractmethod
from typing import TYPE_CHECKING, Dict, Mapping
from typing import TYPE_CHECKING, Mapping

from ixmp.util import maybe_check_out, maybe_commit

Expand Down Expand Up @@ -85,7 +85,7 @@ def initialize(cls, scenario):
log.debug(f"No initialization for {repr(scenario.scheme)}-scheme Scenario")

@classmethod
def initialize_items(cls, scenario: "Scenario", items: Mapping[str, Dict]) -> None:
def initialize_items(cls, scenario: "Scenario", items: Mapping[str, dict]) -> None:
"""Helper for :meth:`initialize`.
All of the `items` are added to `scenario`. Existing items are not modified.
Expand Down

0 comments on commit b11ba3c

Please sign in to comment.