Skip to content

Commit

Permalink
Fix ES type annotations, remove #TODO
Browse files Browse the repository at this point in the history
  • Loading branch information
nhairs committed Oct 11, 2024
1 parent 1257f01 commit 9f84032
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 11 deletions.
6 changes: 2 additions & 4 deletions docs/migrating.md
Original file line number Diff line number Diff line change
Expand Up @@ -112,8 +112,6 @@ This section documents each item in the `parsedmarc` config and how to move it t

All heading are config options are defined using their original `parsedmarc` name as they were in version `8.15.0`.

!!! warning "TODO"
list all config items within each section, don't just say "use this".

### `general`

Expand All @@ -125,9 +123,9 @@ All heading are config options are defined using their original `parsedmarc` nam
`strip_attachment_payloads`: moved to `parser.strip_attachment_payloads`

`output`: not supported - [GitHub Issue #24](https://github.com/nhairs/parsedmarc-fork/issues/24).
`aggregate_json_filename`: not supported - see `output` above.
`aggregate_json_filename`: not supported - [GitHub Issue #24](https://github.com/nhairs/parsedmarc-fork/issues/24).

`forensic_json_filename`: not supported - see `output` above.
`forensic_json_filename`: not supported - [GitHub Issue #24](https://github.com/nhairs/parsedmarc-fork/issues/24).

`ip_db_path`: moved to `parser.ip_db_path`

Expand Down
14 changes: 7 additions & 7 deletions src/parsedmarc/sink/elasticsearch.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from __future__ import annotations

# Standard Library
from typing import List, Literal
from typing import List, Literal, Union

# Installed
from pydantic import BaseModel
Expand Down Expand Up @@ -76,14 +76,14 @@ class ElasticsearchConfig(BaseConfig):


class ElasticsearchClientConfig(BaseModel):
hosts: str | List[str]
hosts: Union[str, List[str]]
use_ssl: bool = False
ssl_cert_path: str | None = None
username: str | None = None
password: str | None = None
api_key: str | None = None
ssl_cert_path: Union[str, None] = None
username: Union[str, None] = None
password: Union[str, None] = None
api_key: Union[str, None] = None
timeout: float = 60.0
index_suffix: str | None = None
index_suffix: Union[str, None] = None
monthly_index: bool = True
number_of_shards: int = 1
number_of_replicas: int = 0

0 comments on commit 9f84032

Please sign in to comment.