diff --git a/docs/source/getting_started/Installing.rst b/docs/source/getting_started/Installing.rst index 60b192df2..3b875f6bf 100644 --- a/docs/source/getting_started/Installing.rst +++ b/docs/source/getting_started/Installing.rst @@ -334,7 +334,7 @@ Example: .. code-block:: powershell - python \path\to\python\file --python-version "3.8.5" --module-name "msticpy[sentinel]" --module-version "2.7.0" --directory \path\to\destination + python [path]\download_python_package.py --python-version "3.8.5" --package-name "msticpy[sentinel]" --package-version "2.7.0" --directory \path\to\destination 3. Copy the directory folder to the isolated environment. diff --git a/msticpy/analysis/observationlist.py b/msticpy/analysis/observationlist.py index 93536c4bf..d7104d4ee 100644 --- a/msticpy/analysis/observationlist.py +++ b/msticpy/analysis/observationlist.py @@ -93,7 +93,7 @@ def all_fields(cls) -> Set[str]: Set of all field names. """ - return {field.name for field in attr.fields(cls)} + return {field.name for field in attr.fields(cls)} # type: ignore[misc] def display(self): """Display the observation.""" diff --git a/msticpy/context/domain_utils.py b/msticpy/context/domain_utils.py index 29fb7d378..e07174f55 100644 --- a/msticpy/context/domain_utils.py +++ b/msticpy/context/domain_utils.py @@ -13,6 +13,7 @@ import json import ssl import time +from dataclasses import asdict from datetime import datetime from enum import Enum from typing import Any, Dict, Optional, Tuple @@ -261,7 +262,10 @@ def dns_components(domain: str) -> dict: Returns subdomain and TLD components from a domain. """ - return tldextract.extract(domain.lower())._asdict() + result = tldextract.extract(domain.lower()) + if isinstance(result, tuple): + return result._asdict() # type: ignore + return asdict(result) def url_components(url: str) -> Dict[str, str]: