Skip to content

Commit 973e48d

Browse files
authored
Fix dataclass issue (#833)
* Apply typing * s/__attrs_post_init__/__post_init__
1 parent c14a2da commit 973e48d

File tree

5 files changed

+6
-6
lines changed

5 files changed

+6
-6
lines changed

docs/diagrams/TIProvider.pyns

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
# PynSource Version 1.2
22
{'type':'meta', 'info1':'Lorem ipsum dolor sit amet, consectetur adipiscing elit is latin. Comments are saved.'}
33
{'type':'umlshape', 'id':'TILookup', 'x':90, 'y':10, 'width':170, 'height':314, 'attrs': 'available_providers|_providers|provider_status|loaded_providers|_providers_to_load|_secondary_providers|configured_providers|_all_providers', 'meths': 'provider_usage|reload_providers|lookup_iocs|_select_providers|lookup_ioc|_load_providers|add_provider|__init__'}
4-
{'type':'umlshape', 'id':'_OTXParams', 'x':917, 'y':1086, 'width':162, 'height':90, 'attrs': 'headers', 'meths': '__attrs_post_init__'}
4+
{'type':'umlshape', 'id':'_OTXParams', 'x':917, 'y':1086, 'width':162, 'height':90, 'attrs': 'headers', 'meths': '__post_init__'}
55
{'type':'umlshape', 'id':'OTX', 'x':912, 'y':833, 'width':170, 'height':154, 'attrs': '_IOC_QUERIES|_BASE_URL|require_url_encoding|_REQUIRED_PARAMS', 'meths': 'parse_results|__init__'}
66
{'type':'umlshape', 'id':'HttpProvider', 'x':555, 'y':499, 'width':146, 'height':138, 'attrs': '_httpx_client|_request_params|_BASE_URL', 'meths': '_substitute_parms|__init__'}
77
{'type':'umlshape', 'id':'IoCLookupParams', 'x':752, 'y':1005, 'width':160, 'height':28, 'attrs': '', 'meths': ''}
88
{'type':'umlshape', 'id':'AzSTI', 'x':199, 'y':816, 'width':114, 'height':90, 'attrs': '_IOC_QUERIES', 'meths': 'parse_results'}
99
{'type':'umlshape', 'id':'KqlTIProvider', 'x':247, 'y':498, 'width':186, 'height':154, 'attrs': '_query_provider|_CONNECT_STR', 'meths': '__init__|_create_query_provider|_get_query_and_params|lookup_iocs'}
1010
{'type':'umlshape', 'id':'TIProvider', 'x':549, 'y':187, 'width':170, 'height':170, 'attrs': 'supported_types|require_url_encoding|_supported_types', 'meths': 'is_supported_type|lookup_iocs|_check_ioc_type|__init__'}
11-
{'type':'umlshape', 'id':'_XForceParams', 'x':614, 'y':1084, 'width':162, 'height':106, 'attrs': 'auth_str|auth_type', 'meths': '__attrs_post_init__'}
11+
{'type':'umlshape', 'id':'_XForceParams', 'x':614, 'y':1084, 'width':162, 'height':106, 'attrs': 'auth_str|auth_type', 'meths': '__post_init__'}
1212
{'type':'umlshape', 'id':'XForce', 'x':627, 'y':834, 'width':138, 'height':122, 'attrs': '_IOC_QUERIES|_BASE_URL|_REQUIRED_PARAMS', 'meths': 'parse_results'}
1313
{'type':'umlshape', 'id':'OPR', 'x':1207, 'y':833, 'width':170, 'height':218, 'attrs': '_IOC_QUERIES|_BASE_URL|_REQUIRED_PARAMS|_provider_name', 'meths': 'lookup_iocs|_lookup_batch|_parse_multi_results|parse_results|_lookup_bulk_request|__init__'}
1414
{'type':'umlshape', 'id':'TISeverity', 'x':1384, 'y':256, 'width':110, 'height':154, 'attrs': 'information|high|warning|unknown', 'meths': '__eq__|__gt__'}

msticpy/context/contextproviders/servicenow.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
@dataclass
4242
class _ServiceNowParams(APILookupParams):
4343
# override LookupParams to set common defaults
44-
def __attrs_post_init__(self: Self) -> None:
44+
def __post_init__(self: Self) -> None:
4545
self.auth_str = ["{ApiID}", "{AuthKey}"]
4646
self.auth_type = "HTTPBasic"
4747

msticpy/context/tiproviders/alienvault_otx.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
@dataclass
3434
class _OTXParams(APILookupParams):
3535
# override APILookupParams to set common defaults
36-
def __attrs_post_init__(self: Self) -> None:
36+
def __post_init__(self: Self) -> None:
3737
self.headers = {"X-OTX-API-KEY": "{AuthKey}"}
3838

3939

msticpy/context/tiproviders/ibm_xforce.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
@dataclass
3434
class _XForceParams(APILookupParams):
3535
# override APILookupParams to set common defaults
36-
def __attrs_post_init__(self: Self) -> None:
36+
def __post_init__(self: Self) -> None:
3737
self.auth_str = ["{ApiID}", "{AuthKey}"]
3838
self.auth_type = "HTTPBasic"
3939

msticpy/context/tiproviders/intsights.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
@dataclass
4040
class _IntSightsParams(APILookupParams):
4141
# override APILookupParams to set common defaults
42-
def __attrs_post_init__(self: Self) -> None:
42+
def __post_init__(self: Self) -> None:
4343
self.auth_str = ["{ApiID}", "{AuthKey}"]
4444
self.auth_type = "HTTPBasic"
4545

0 commit comments

Comments
 (0)