Skip to content

Commit

Permalink
Merge branch 'develop' into refactor-geometry
Browse files Browse the repository at this point in the history
  • Loading branch information
cleder committed Apr 4, 2023
2 parents 16408cf + f1bdf23 commit 33d821a
Show file tree
Hide file tree
Showing 5 changed files with 48 additions and 82 deletions.
18 changes: 11 additions & 7 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,15 @@ repos:
- id: requirements-txt-fixer
- id: trailing-whitespace
- repo: https://github.com/ikamensh/flynt/
rev: "0.77"
rev: "0.78"
hooks:
- id: flynt
- repo: https://github.com/MarcoGorelli/absolufy-imports
rev: v0.3.1
hooks:
- id: absolufy-imports
- repo: https://github.com/hakancelikdev/unimport
rev: 33ead41ee30f1d323a9c2fcfd0114297efbbc4d5
rev: 0.15.0
hooks:
- id: unimport
args: [--remove, --include-star-import, --ignore-init, --gitignore]
Expand All @@ -38,14 +38,18 @@ repos:
hooks:
- id: pyupgrade
args: ["--py3-plus", "--py37-plus"]
- repo: https://github.com/pycqa/isort
rev: 5.11.4
hooks:
- id: isort
- repo: https://github.com/psf/black
rev: 22.12.0
rev: 23.3.0
hooks:
- id: black
- repo: https://github.com/PyCQA/flake8
rev: 6.0.0
hooks:
- id: flake8
- repo: https://github.com/pycqa/isort
rev: 5.12.0
hooks:
- id: isort
- repo: https://github.com/charliermarsh/ruff-pre-commit
rev: 'v0.0.259'
hooks:
Expand Down
10 changes: 4 additions & 6 deletions fastkml/data.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
# along with this library; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
"""Add Custom Data"""
import logging
from typing import Dict
from typing import List
from typing import Optional
Expand All @@ -29,6 +30,8 @@
from fastkml.enums import Verbosity
from fastkml.types import Element

logger = logging.getLogger(__name__)


class SimpleField(TypedDict):
name: str
Expand Down Expand Up @@ -56,11 +59,6 @@ class Schema(_BaseObject):

__name__ = "Schema"

# The declaration of the custom fields, each of which must specify both the
# type and the name of this field. If either the type or the name is
# omitted, the field is ignored.
name = None

def __init__(
self,
ns: Optional[str] = None,
Expand Down Expand Up @@ -151,7 +149,7 @@ def append(self, type: str, name: str, display_name: Optional[str] = None) -> No
"bool",
]
if type not in allowed_types:
raise TypeError(
logger.warning(
f"{name} has the type {type} which is invalid. "
"The type must be one of "
"'string', 'int', 'uint', 'short', "
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ def run_tests(self) -> None:

setup(
name="fastkml",
version="1.0.alpha.4",
version="1.0.alpha.5",
description="Fast KML processing in python",
long_description=(
open("README.rst").read()
Expand Down
99 changes: 32 additions & 67 deletions tests/oldunit_test.py

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion tests/styles_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,6 @@ def test_icon_style_read(self) -> None:
assert icons.heading == 20.0

def test_line_style(self) -> None:

lines = styles.LineStyle(
id="id-0",
target_id="target-0",
Expand Down

0 comments on commit 33d821a

Please sign in to comment.