Skip to content

Commit

Permalink
Merge branch 'Input-Configuration-Updates' of https://github.com/airb…
Browse files Browse the repository at this point in the history
…ytehq/airbyte into Input-Configuration-Updates
  • Loading branch information
octavia-squidington-iii committed May 5, 2022
2 parents b8d75b5 + 84f8138 commit 20f303b
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
- name: Amazon Ads
sourceDefinitionId: c6b0a29e-1da9-4512-9002-7bfd0cba2246
dockerRepository: airbyte/source-amazon-ads
dockerImageTag: 0.1.7
dockerImageTag: 0.1.8
documentationUrl: https://docs.airbyte.io/integrations/sources/amazon-ads
icon: amazonads.svg
sourceType: api
Expand Down
18 changes: 11 additions & 7 deletions airbyte-config/init/src/main/resources/seed/source_specs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@
supportsNormalization: false
supportsDBT: false
supported_destination_sync_modes: []
- dockerImage: "airbyte/source-amazon-ads:0.1.7"
- dockerImage: "airbyte/source-amazon-ads:0.1.8"
spec:
documentationUrl: "https://docs.airbyte.com/integrations/sources/amazon-ads"
connectionSpecification:
Expand All @@ -101,18 +101,22 @@
type: "string"
client_id:
title: "Client ID"
description: "The Client ID of your Amazon Ads developer application."
description: "The client ID of your Amazon Ads developer application. See\
\ the <a href=\"https://advertising.amazon.com/API/docs/en-us/get-started/generate-api-tokens#retrieve-your-client-id-and-client-secret\"\
>docs</a> for more information."
order: 1
type: "string"
client_secret:
title: "Client Secret"
description: "The Client Secret of your Amazon Ads developer application."
description: "The client secret of your Amazon Ads developer application.\
\ See the <a href=\"https://advertising.amazon.com/API/docs/en-us/get-started/generate-api-tokens#retrieve-your-client-id-and-client-secret\"\
>docs</a> for more information."
airbyte_secret: true
order: 2
type: "string"
refresh_token:
title: "Refresh Token"
description: "Amazon Ads Refresh Token. See the <a href=\"https://docs.airbyte.com/integrations/sources/amazon-ads\"\
description: "Amazon Ads refresh token. See the <a href=\"https://advertising.amazon.com/API/docs/en-us/get-started/generate-api-tokens\"\
>docs</a> for more information on how to obtain this token."
airbyte_secret: true
order: 3
Expand All @@ -132,7 +136,7 @@
order: 4
report_wait_timeout:
title: "Report Wait Timeout *"
description: "Timeout duration in minutes for Reports. Eg. 30"
description: "Timeout duration in minutes for Reports. Default is 30 minutes."
default: 30
examples:
- 30
Expand All @@ -141,8 +145,8 @@
type: "integer"
report_generation_max_retries:
title: "Report Generation Maximum Retries *"
description: "Maximum retries Airbyte will attempt for fetching Report Data.\
\ Eg. 5"
description: "Maximum retries Airbyte will attempt for fetching report data.\
\ Default is 5."
default: 5
examples:
- 5
Expand Down

7 comments on commit 20f303b

@github-actions
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SonarQube Report

SonarQube report for Airbyte Connectors Source Google Search Console(#12482)

Measures

Name Value Name Value Name Value
Lines to Cover 198 Bugs 0 Quality Gate Status OK
Duplicated Lines (%) 0.0 Vulnerabilities 0 Lines of Code 321
Reliability Rating A Code Smells 2 Duplicated Blocks 0
Security Rating A Coverage 58.6 Blocker Issues 0
Critical Issues 0 Major Issues 2 Minor Issues 0

Detected Issues

Rule File Description Message
python:S1066 (MAJOR) source_google_search_console/streams.py:200 Collapsible "if" statements should be merged Merge this if statement with the enclosing one.
python:S112 (MAJOR) source_google_search_console/source.py:90 "Exception" and "BaseException" should not be raised Replace this generic exception class with a more specific one.

Coverage (58.6%)

File Coverage File Coverage
credentials/get_authentication_url.py 0.0 credentials/get_refresh_token.py 0.0
credentials/setup.py 0.0 source_google_search_console/init.py 100.0
source_google_search_console/service_account_authenticator.py 57.1 source_google_search_console/source.py 40.5
source_google_search_console/streams.py 77.1

@github-actions
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SonarQube Report

SonarQube report for Airbyte Connectors Source Github(#12482)

Measures

Name Value Name Value Name Value
Vulnerabilities 0 Coverage 79.3 Lines to Cover 705
Duplicated Lines (%) 6.0 Quality Gate Status OK Duplicated Blocks 7
Code Smells 4 Bugs 0 Lines of Code 936
Security Rating A Reliability Rating A Blocker Issues 0
Critical Issues 2 Major Issues 2 Minor Issues 0

Detected Issues

Rule File Description Message
python:S3776 (CRITICAL) source_github/streams.py:90 Cognitive Complexity of functions should not be too high Refactor this function to reduce its Cognitive Complexity from 18 to the 15 allowed.
python:S5886 (MAJOR) source_github/streams.py:83 Function return types should be consistent with their type hint Return a value of type "Union[int, float]" instead of "NoneType" or update function "backoff_time" type hint.
python:S5797 (CRITICAL) fixtures/github.py:79 Constants should not be used as conditions Replace this expression; used as a condition it will always be constant.
python:S112 (MAJOR) source_github/source.py:77 "Exception" and "BaseException" should not be raised Replace this generic exception class with a more specific one.

Coverage (79.3%)

File Coverage File Coverage
fixtures/github.py 0.0 fixtures/main.py 0.0
source_github/init.py 100.0 source_github/source.py 71.4
source_github/streams.py 94.4

@github-actions
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SonarQube Report

SonarQube report for Airbyte Connectors Source Intercom(#12482)

Measures

Name Value Name Value Name Value
Code Smells 25 Reliability Rating A Vulnerabilities 0
Lines to Cover 244 Security Rating A Lines of Code 274
Bugs 0 Quality Gate Status OK Coverage 92.2
Duplicated Lines (%) 0.0 Duplicated Blocks 0 Blocker Issues 0
Critical Issues 0 Major Issues 2 Minor Issues 23

Detected Issues

Rule File Description Message
python:mypy_attr_defined (MINOR) source_intercom/source.py:352 Check that attribute exists "Mapping[Any, Any]" has no attribute "setdefault" . Code line: conversation_part.setdefault("conversation_id", conversati...
python:mypy_import (MINOR) source_intercom/source.py:18 Require that imported module can be found or has stubs Library stubs not installed for "requests.auth" (or incompatible with Python 3.9) . Code line: from requests.auth import AuthBase
python:mypy_index (MINOR) source_intercom/source.py:107 Check indexing operations Value of type "Optional[Mapping[str, Any]]" is not indexable . Code line: if not stream_state or record[self.cursor_field] > stream_stat...
python:mypy_misc (MINOR) source_intercom/source.py:138 Miscellaneous other checks "None" not callable . Code line: parent_stream = self.parent_stream_class(authenticator=self.au...
python:mypy_misc (MINOR) source_intercom/source.py:140 Miscellaneous other checks "None" not callable . Code line: for item in self.parent_stream_class(
python:mypy_no_any_return (MINOR) source_intercom/source.py:212 Reject returning value with "Any" type if return type is not "Any" Returning Any from function declared to return "str" . Code line: return self._endpoint_type.value
python:mypy_valid_type (MINOR) source_intercom/source.py:232 Check that type (annotation) is valid Function "builtins.any" is not valid as a type . Code line: ...s(self, sync_mode, **kwargs) -> Iterable[Optional[Mapping[str, any]]]:
python:mypy_no_any_return (MINOR) source_intercom/source.py:249 Reject returning value with "Any" type if return type is not "Any" Returning Any from function declared to return "bool" . Code line: return super().should_retry(response)
python:S5799 (MAJOR) source_intercom/source.py:257 Implicit string and byte concatenations should not be confusing Merge these implicitly concatenated strings; or did you forget a comma?
python:mypy_no_any_return (MINOR) source_intercom/source.py:260 Reject returning value with "Any" type if return type is not "Any" Returning Any from function declared to return "Optional[float]" . Code line: return super().backoff_time(response)
python:mypy_no_any_return (MINOR) source_intercom/source.py:456 Reject returning value with "Any" type if return type is not "Any" Returning Any from function declared to return "Mapping[str, Any]" . Code line: return headers
python:mypy_index (MINOR) source_intercom/source.py:476 Check indexing operations Unsupported target for indexed assignment ("Mapping[str, Any]") . Code line: config["start_date"] = datetime.strptime(config["start_date"],...
python:mypy_return (MINOR) source_intercom/source.py:374 Check that function always returns a value Missing return statement . Code line: def next_page_token(self, response: requests.Response) -> Optional...
python:mypy_import (MINOR) source_intercom/source.py:11 Require that imported module can be found or has stubs Library stubs not installed for "requests" (or incompatible with Python 3.9) . Code line: import requests
python:mypy_return (MINOR) source_intercom/source.py:47 Check that function always returns a value Missing return statement . Code line: def next_page_token(self, response: requests.Response) -> Optional...
python:mypy_var_annotated (MINOR) source_intercom/source.py:59 Require variable annotation if type can't be inferred Need type annotation for "params" (hint: "params: Dict[, ] = ...") . Code line: params = {}
python:S5799 (MAJOR) source_intercom/source.py:73 Implicit string and byte concatenations should not be confusing Merge these implicitly concatenated strings; or did you forget a comma?
python:mypy_valid_type (MINOR) source_intercom/source.py:118 Check that type (annotation) is valid Function "builtins.any" is not valid as a type . Code line: ...ing[str, Any], latest_record: Mapping[str, Any]) -> Mapping[str, any]:
python:mypy_valid_type (MINOR) source_intercom/source.py:137 Check that type (annotation) is valid Function "builtins.any" is not valid as a type . Code line: ...s(self, sync_mode, **kwargs) -> Iterable[Optional[Mapping[str, any]]]:
python:mypy_assignment (MINOR) source_intercom/source.py:276 Check that assigned value is compatible with target Incompatible types in assignment (expression has type "Type[Companies]", base class "ChildStreamMixin" defined the type as "Optional[IntercomStream]") . Code line: parent_stream_class = Companies
python:mypy_index (MINOR) source_intercom/source.py:279 Check indexing operations Value of type "Optional[Mapping[str, Any]]" is not indexable . Code line: return f"/companies/{stream_slice['id']}/segments"
python:mypy_index (MINOR) source_intercom/source.py:320 Check indexing operations Value of type "Optional[Mapping[str, Any]]" is not indexable . Code line: return f"/conversations/{stream_slice['id']}"
python:mypy_override (MINOR) source_intercom/source.py:405 Check that method override is compatible with base class Signature of "request_params" incompatible with supertype "IntercomStream" . Code line: def request_params(self, **kwargs) -> MutableMapping[str, Any]:
python:mypy_override (MINOR) source_intercom/source.py:415 Check that method override is compatible with base class Signature of "request_params" incompatible with supertype "IntercomStream" . Code line: def request_params(self, **kwargs) -> MutableMapping[str, Any]:
python:mypy_valid_type (MINOR) source_intercom/source.py:464 Check that type (annotation) is valid Function "builtins.any" is not valid as a type . Code line: def check_connection(self, logger, config) -> Tuple[bool, any]:

Coverage (92.2%)

File Coverage File Coverage
source_intercom/init.py 100.0 source_intercom/source.py 92.1

@github-actions
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SonarQube Report

SonarQube report for Airbyte Connectors Source Mixpanel(#12482)

Measures

Name Value Name Value Name Value
Quality Gate Status ERROR Duplicated Lines (%) 0.0 Security Rating A
Coverage 73.8 Code Smells 9 Reliability Rating A
Lines to Cover 42 Vulnerabilities 0 Bugs 0
Duplicated Blocks 0 Lines of Code 427 Blocker Issues 0
Critical Issues 0 Major Issues 7 Minor Issues 49

Detected Issues

Rule File Description Message
python:mypy_override (MINOR) source_mixpanel/source.py:151 Check that method override is compatible with base class Signature of "parse_response" incompatible with supertype "MixpanelStream" . Code line: def parse_response(self, response: requests.Response, stream_state...
python:mypy_override (MINOR) source_mixpanel/source.py:475 Check that method override is compatible with base class Signature of "process_response" incompatible with supertype "MixpanelStream" . Code line: def process_response(self, response: requests.Response, stream_sta...
python:mypy_arg_type (MINOR) source_mixpanel/source.py:521 Check argument types in calls Argument 1 to "get" of "Mapping" has incompatible type "Optional[Any]"; expected "str" . Code line: item_cursor = item.get(cursor_field, "")
python:mypy_arg_type (MINOR) source_mixpanel/source.py:522 Check argument types in calls Argument 1 to "get" of "Mapping" has incompatible type "Optional[Any]"; expected "str" . Code line: state_cursor = stream_state.get(cursor_field, "")
python:mypy_index (MINOR) source_mixpanel/source.py:576 Check indexing operations Value of type "Optional[List[str]]" is not indexable . Code line: cursor_name = cursor_field[-1]
python:mypy_index (MINOR) source_mixpanel/source.py:578 Check indexing operations Unsupported target for indexed assignment ("Mapping[str, Any]") . Code line: stream_state[self.usr_cursor_key()] = cursor_name
python:mypy_no_any_return (MINOR) source_mixpanel/source.py:581 Reject returning value with "Any" type if return type is not "Any" Returning Any from function declared to return "Iterable[Mapping[str, Any]]" . Code line: return super().read_records(sync_mode, cursor_field, stream_sl...
python:mypy_arg_type (MINOR) source_mixpanel/source.py:585 Check argument types in calls Argument 1 to "get" of "Mapping" has incompatible type "Optional[Any]"; expected "str" . Code line: ... state_cursor = (current_stream_state or {}).get(cursor_field, "")
python:mypy_arg_type (MINOR) source_mixpanel/source.py:587 Check argument types in calls Argument 1 to "get" of "Mapping" has incompatible type "Optional[Any]"; expected "str" . Code line: record_cursor = latest_record.get(cursor_field, self.start_dat...
python:mypy_override (MINOR) source_mixpanel/source.py:616 Check that method override is compatible with base class Signature of "process_response" incompatible with supertype "Engage" . Code line: def process_response(self, response: requests.Response, stream_sli...
python:mypy_index (MINOR) source_mixpanel/source.py:619 Check indexing operations Unsupported target for indexed assignment ("Mapping[Any, Any]") . Code line: record["cohort_id"] = stream_slice["id"]
python:mypy_index (MINOR) source_mixpanel/source.py:619 Check indexing operations Value of type "Optional[Mapping[str, Any]]" is not indexable . Code line: record["cohort_id"] = stream_slice["id"]
python:S5890 (MAJOR) source_mixpanel/source.py:143 Values assigned to variables should match their type annotations Assign to "data_field" a value of type "str" instead of "NoneType" or update its type hint.
python:mypy_assignment (MINOR) source_mixpanel/source.py:143 Check that assigned value is compatible with target Incompatible types in assignment (expression has type "None", variable has type "str") . Code line: data_field: str = None
python:S5890 (MAJOR) source_mixpanel/source.py:174 Values assigned to variables should match their type annotations Assign to "data_field" a value of type "str" instead of "NoneType" or update its type hint.
python:mypy_assignment (MINOR) source_mixpanel/source.py:174 Check that assigned value is compatible with target Incompatible types in assignment (expression has type "None", variable has type "str") . Code line: data_field: str = None
python:mypy_no_redef (MINOR) source_mixpanel/source.py:273 Check that each name is defined once Name "stream_state" already defined on line 245 . Code line: stream_state: Dict = stream_state or {}
python:mypy_assignment (MINOR) source_mixpanel/source.py:381 Check that assigned value is compatible with target Incompatible types in assignment (expression has type "None", variable has type "str") . Code line: primary_key: str = None
python:S5890 (MAJOR) source_mixpanel/source.py:381 Values assigned to variables should match their type annotations Assign to "primary_key" a value of type "str" instead of "NoneType" or update its type hint.
python:S5890 (MAJOR) source_mixpanel/source.py:705 Values assigned to variables should match their type annotations Assign to "primary_key" a value of type "str" instead of "NoneType" or update its type hint.
python:mypy_assignment (MINOR) source_mixpanel/source.py:705 Check that assigned value is compatible with target Incompatible types in assignment (expression has type "None", variable has type "str") . Code line: primary_key: str = None
python:S5890 (MAJOR) source_mixpanel/source.py:706 Values assigned to variables should match their type annotations Assign to "data_field" a value of type "str" instead of "NoneType" or update its type hint.
python:mypy_assignment (MINOR) source_mixpanel/source.py:706 Check that assigned value is compatible with target Incompatible types in assignment (expression has type "None", variable has type "str") . Code line: data_field: str = None
python:S5890 (MAJOR) source_mixpanel/source.py:757 Values assigned to variables should match their type annotations Assign to "primary_key" a value of type "str" instead of "NoneType" or update its type hint.
python:mypy_assignment (MINOR) source_mixpanel/source.py:757 Check that assigned value is compatible with target Incompatible types in assignment (expression has type "None", variable has type "str") . Code line: primary_key: str = None
python:S5890 (MAJOR) source_mixpanel/source.py:759 Values assigned to variables should match their type annotations Assign to "reqs_per_hour_limit" a value of type "str" instead of "int" or update its type hint.
python:mypy_assignment (MINOR) source_mixpanel/source.py:759 Check that assigned value is compatible with target Incompatible types in assignment (expression has type "str", base class "MixpanelStream" defined the type as "int") . Code line: reqs_per_hour_limit: str = 60 # 1 query per minute
python:mypy_index (MINOR) source_mixpanel/source.py:891 Check indexing operations Unsupported target for indexed assignment ("Mapping[str, Any]") . Code line: config["start_date"] = start_date or now - timedelta(days=365)
python:mypy_override (MINOR) source_mixpanel/source.py:712 Check that method override is compatible with base class Return type "Iterable[str]" of "process_response" incompatible with return type "Iterable[Mapping[Any, Any]]" in supertype "MixpanelStream" . Code line: def process_response(self, response: requests.Response, **kwargs) ...
python:mypy_valid_type (MINOR) source_mixpanel/source.py:849 Check that type (annotation) is valid Function "builtins.any" is not valid as a type . Code line: ...logger: AirbyteLogger, config: Mapping[str, Any]) -> Tuple[bool, any]:
python:mypy_import (MINOR) source_mixpanel/source.py:14 Require that imported module can be found or has stubs Library stubs not installed for "requests" (or incompatible with Python 3.9) . Code line: import requests
python:mypy_valid_type (MINOR) source_mixpanel/source.py:109 Check that type (annotation) is valid Function "builtins.any" is not valid as a type . Code line: ...ing[str, Any], latest_record: Mapping[str, Any]) -> Mapping[str, any]:
python:mypy_no_redef (MINOR) source_mixpanel/source.py:111 Check that each name is defined once Name "current_stream_state" already defined on line 109 . Code line: current_stream_state: str = current_stream_state.get("date", s...
python:mypy_call_overload (MINOR) source_mixpanel/source.py:113 Check that an overload variant matches arguments No overload variant of "max" matches argument types "MutableMapping[str, Any]", "str" . Code line: return {"date": max(current_stream_state, latest_record_date)}
python:mypy_attr_defined (MINOR) source_mixpanel/source.py:187 Check that attribute exists "DateSlicesMixin" has no attribute "start_date" . Code line: start_date = self.start_date
python:mypy_attr_defined (MINOR) source_mixpanel/source.py:195 Check that attribute exists "DateSlicesMixin" has no attribute "end_date" . Code line: start_date = min(start_date, self.end_date)
python:mypy_attr_defined (MINOR) source_mixpanel/source.py:198 Check that attribute exists "DateSlicesMixin" has no attribute "attribution_window" . Code line: start_date = start_date - timedelta(days=self.attribution_wind...
python:mypy_attr_defined (MINOR) source_mixpanel/source.py:200 Check that attribute exists "DateSlicesMixin" has no attribute "end_date" . Code line: while start_date <= self.end_date:
python:mypy_attr_defined (MINOR) source_mixpanel/source.py:201 Check that attribute exists "DateSlicesMixin" has no attribute "date_window_size" . Code line: ... end_date = start_date + timedelta(days=self.date_window_size...
python:mypy_attr_defined (MINOR) source_mixpanel/source.py:205 Check that attribute exists "DateSlicesMixin" has no attribute "end_date" . Code line: "end_date": str(min(end_date, self.end_date)),
python:mypy_valid_type (MINOR) source_mixpanel/source.py:214 Check that type (annotation) is valid Function "builtins.any" is not valid as a type . Code line: ...e: Mapping[str, Any], stream_slice: Mapping[str, any] = None, next_pag...
python:mypy_index (MINOR) source_mixpanel/source.py:217 Check indexing operations Value of type "Optional[Mapping[str, any?]]" is not indexable . Code line: "from_date": stream_slice["start_date"],
python:mypy_index (MINOR) source_mixpanel/source.py:218 Check indexing operations Value of type "Optional[Mapping[str, any?]]" is not indexable . Code line: "to_date": stream_slice["end_date"],
python:mypy_no_any_return (MINOR) source_mixpanel/source.py:243 Reject returning value with "Any" type if return type is not "Any" Returning Any from function declared to return "List[Dict[Any, Any]]" . Code line: return funnel_slices
python:mypy_union_attr (MINOR) source_mixpanel/source.py:281 Check that attribute exists in each item of a union Item "None" of "Optional[Mapping[str, Any]]" has no attribute "get" . Code line: funnel_state = stream_state.get(funnel_id)
python:mypy_arg_type (MINOR) source_mixpanel/source.py:284 Check argument types in calls Argument 1 to "update" of "dict" has incompatible type "Optional[Mapping[str, Any]]"; expected "Mapping[Any, Any]" . Code line: stream_slices.append({**funnel_slice, **date_slice})
python:mypy_valid_type (MINOR) source_mixpanel/source.py:289 Check that type (annotation) is valid Function "builtins.any" is not valid as a type . Code line: ...e: Mapping[str, Any], stream_slice: Mapping[str, any] = None, next_pag...
python:mypy_index (MINOR) source_mixpanel/source.py:294 Check indexing operations Value of type "Optional[Mapping[str, any?]]" is not indexable . Code line: funnel_id = str(stream_slice["funnel_id"])
python:mypy_arg_type (MINOR) source_mixpanel/source.py:297 Check argument types in calls Argument 1 to "request_params" of "DateSlicesMixin" has incompatible type "Optional[Any]"; expected "Mapping[str, Any]" . Code line: params = super().request_params(funnel_state, stream_slice, ne...
python:mypy_index (MINOR) source_mixpanel/source.py:298 Check indexing operations Value of type "Optional[Mapping[str, any?]]" is not indexable . Code line: params["funnel_id"] = stream_slice["funnel_id"]
python:mypy_valid_type (MINOR) source_mixpanel/source.py:452 Check that type (annotation) is valid Function "builtins.any" is not valid as a type . Code line: ...e: Mapping[str, Any], stream_slice: Mapping[str, any] = None, next_pag...
python:mypy_no_any_return (MINOR) source_mixpanel/source.py:563 Reject returning value with "Any" type if return type is not "Any" Returning Any from function declared to return "Mapping[str, Any]" . Code line: return schema
python:mypy_no_any_return (MINOR) source_mixpanel/source.py:845 Reject returning value with "Any" type if return type is not "Any" Returning Any from function declared to return "Mapping[str, Any]" . Code line: return schema
python:mypy_attr_defined (MINOR) source_mixpanel/source.py:890 Check that attribute exists Module has no attribute "parse" . Code line: start_date = pendulum.parse(config["start_date"]).date()
python:mypy_attr_defined (MINOR) source_mixpanel/source.py:895 Check that attribute exists Module has no attribute "parse" . Code line: end_date = pendulum.parse(end_date).date()
python:mypy_index (MINOR) source_mixpanel/source.py:896 Check indexing operations Unsupported target for indexed assignment ("Mapping[str, Any]") . Code line: config["end_date"] = end_date or now # set to now by default

Coverage (73.8%)

File Coverage File Coverage
source_mixpanel/init.py 100.0 source_mixpanel/source.py 83.2

@github-actions
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SonarQube Report

SonarQube report for Airbyte Connectors Source Amazon Ads(#12482)

Measures

Name Value Name Value Name Value
Quality Gate Status OK Code Smells 65 Bugs 0
Lines to Cover 663 Duplicated Blocks 0 Lines of Code 1514
Duplicated Lines (%) 0.0 Coverage 98.8 Vulnerabilities 0
Reliability Rating A Security Rating A Blocker Issues 0
Critical Issues 0 Major Issues 13 Minor Issues 52

Detected Issues

Rule File Description Message
python:S112 (MAJOR) streams/common.py:153 "Exception" and "BaseException" should not be raised Replace this generic exception class with a more specific one.
python:mypy_assignment (MINOR) report_streams/products_report.py:251 Check that assigned value is compatible with target Incompatible types in assignment (expression has type "List[str]", base class "ReportStream" defined the type as "None") . Code line: primary_key = ["profileId", "recordType", "reportDate"]
python:mypy_attr_defined (MINOR) report_streams/report_streams.py:22 Check that attribute exists Module "pendulum" does not explicitly export attribute "DateTime"; implicit reexport disabled . Code line: from pendulum import DateTime
python:mypy_assignment (MINOR) report_streams/report_streams.py:380 Check that assigned value is compatible with target Incompatible types in assignment (expression has type "DateTime", variable has type "str") . Code line: report_date = pendulum.from_format(report_date, ReportStream.R...
python:mypy_no_any_return (MINOR) report_streams/report_streams.py:383 Reject returning value with "Any" type if return type is not "Any" Returning Any from function declared to return "str" . Code line: return profile_time.format(ReportStream.REPORT_DATE_FORMAT)
python:mypy_arg_type (MINOR) report_streams/report_streams.py:169 Check argument types in calls Argument 1 to "backoff_max_tries" has incompatible type "Callable[[ReportStream, Any], Any]"; expected "ReportStream" . Code line: @backoff_max_tries
python:mypy_arg_type (MINOR) report_streams/report_streams.py:176 Check argument types in calls Argument 1 to "backoff_max_time" has incompatible type "Callable[[ReportStream, Any], Any]"; expected "ReportStream" . Code line: @backoff_max_time
python:mypy_arg_type (MINOR) source_amazon_ads/source.py:72 Check argument types in calls Argument 1 to "_choose_profiles" of "SourceAmazonAds" has incompatible type "Mapping[str, Any]"; expected "AmazonAdsConfig" . Code line: ... stream_args["profiles"] = self._choose_profiles(config, profiles_list...
python:S1066 (MAJOR) schemas/common.py:32 Collapsible "if" statements should be merged Merge this if statement with the enclosing one.
python:mypy_call_overload (MINOR) schemas/common.py:45 Check that an overload variant matches arguments No overload variant of "create_model" matches argument types "str", "Dict[str, Tuple[Type[str], None]]", "Type[CatalogModel]" . Code line: metrics_obj_model = create_model("MetricObjModel", **{f: (str,...
python:mypy_return_value (MINOR) schemas/common.py:46 Check that return value is compatible with signature Incompatible return value type (got "Type[MetricsReport]", expected "CatalogModel") . Code line: return create_model("MetricsModel", metric=(metrics_obj_model,...
python:S5890 (MAJOR) schemas/profile.py:14 Values assigned to variables should match their type annotations Assign to "name" a value of type "str" instead of "NoneType" or update its type hint.
python:mypy_assignment (MINOR) schemas/profile.py:14 Check that assigned value is compatible with target Incompatible types in assignment (expression has type "None", variable has type "str") . Code line: name: str = None
python:S5890 (MAJOR) schemas/profile.py:15 Values assigned to variables should match their type annotations Assign to "subType" a value of type "str" instead of "NoneType" or update its type hint.
python:mypy_assignment (MINOR) schemas/profile.py:15 Check that assigned value is compatible with target Incompatible types in assignment (expression has type "None", variable has type "str") . Code line: subType: str = None
python:S5890 (MAJOR) schemas/profile.py:16 Values assigned to variables should match their type annotations Assign to "validPaymentMethod" a value of type "bool" instead of "NoneType" or update its type hint.
python:mypy_assignment (MINOR) schemas/profile.py:16 Check that assigned value is compatible with target Incompatible types in assignment (expression has type "None", variable has type "bool") . Code line: validPaymentMethod: bool = None
python:S5890 (MAJOR) schemas/profile.py:21 Values assigned to variables should match their type annotations Assign to "countryCode" a value of type "str" instead of "NoneType" or update its type hint.
python:mypy_assignment (MINOR) schemas/profile.py:21 Check that assigned value is compatible with target Incompatible types in assignment (expression has type "None", variable has type "str") . Code line: countryCode: str = None
python:S5890 (MAJOR) schemas/profile.py:22 Values assigned to variables should match their type annotations Assign to "currencyCode" a value of type "str" instead of "NoneType" or update its type hint.
python:mypy_assignment (MINOR) schemas/profile.py:22 Check that assigned value is compatible with target Incompatible types in assignment (expression has type "None", variable has type "str") . Code line: currencyCode: str = None
python:S5890 (MAJOR) schemas/profile.py:23 Values assigned to variables should match their type annotations Assign to "dailyBudget" a value of type "Decimal" instead of "NoneType" or update its type hint.
python:mypy_assignment (MINOR) schemas/profile.py:23 Check that assigned value is compatible with target Incompatible types in assignment (expression has type "None", variable has type "Decimal") . Code line: dailyBudget: Decimal = None
python:S5890 (MAJOR) schemas/sponsored_brands.py:23 Values assigned to variables should match their type annotations Assign to "bidOptimization" a value of type "bool" instead of "NoneType" or update its type hint.
python:mypy_assignment (MINOR) schemas/sponsored_brands.py:23 Check that assigned value is compatible with target Incompatible types in assignment (expression has type "None", variable has type "bool") . Code line: bidOptimization: bool = None
python:S5890 (MAJOR) schemas/sponsored_brands.py:24 Values assigned to variables should match their type annotations Assign to "bidMultiplier" a value of type "Decimal" instead of "NoneType" or update its type hint.
python:mypy_assignment (MINOR) schemas/sponsored_brands.py:24 Check that assigned value is compatible with target Incompatible types in assignment (expression has type "None", variable has type "Decimal") . Code line: bidMultiplier: Decimal = None
python:S5890 (MAJOR) schemas/sponsored_display.py:16 Values assigned to variables should match their type annotations Assign to "endDate" a value of type "str" instead of "NoneType" or update its type hint.
python:mypy_assignment (MINOR) schemas/sponsored_display.py:16 Check that assigned value is compatible with target Incompatible types in assignment (expression has type "None", variable has type "str") . Code line: endDate: str = None
python:mypy_assignment (MINOR) schemas/sponsored_display.py:19 Check that assigned value is compatible with target Incompatible types in assignment (expression has type "None", variable has type "str") . Code line: portfolioId: str = None
python:S5890 (MAJOR) schemas/sponsored_display.py:19 Values assigned to variables should match their type annotations Assign to "portfolioId" a value of type "str" instead of "NoneType" or update its type hint.
python:S5890 (MAJOR) schemas/sponsored_products.py:31 Values assigned to variables should match their type annotations Assign to "endDate" a value of type "str" instead of "NoneType" or update its type hint.
python:mypy_assignment (MINOR) schemas/sponsored_products.py:31 Check that assigned value is compatible with target Incompatible types in assignment (expression has type "None", variable has type "str") . Code line: endDate: str = None
python:mypy_valid_type (MINOR) source_amazon_ads/source.py:42 Check that type (annotation) is valid Function "builtins.any" is not valid as a type . Code line: ...logger: AirbyteLogger, config: Mapping[str, Any]) -> Tuple[bool, any]:
python:mypy_assignment (MINOR) source_amazon_ads/source.py:48 Check that assigned value is compatible with target Incompatible types in assignment (expression has type "AmazonAdsConfig", variable has type "Mapping[str, Any]") . Code line: config = AmazonAdsConfig(**config)
python:mypy_arg_type (MINOR) source_amazon_ads/source.py:54 Check argument types in calls Argument 1 to "Profiles" has incompatible type "Mapping[str, Any]"; expected "AmazonAdsConfig" . Code line: Profiles(config, authenticator=self._make_authenticator(config...
python:mypy_arg_type (MINOR) source_amazon_ads/source.py:54 Check argument types in calls Argument 1 to "_make_authenticator" of "SourceAmazonAds" has incompatible type "Mapping[str, Any]"; expected "AmazonAdsConfig" . Code line: ...s(config, authenticator=self._make_authenticator(config)).get_all_prof...
python:mypy_assignment (MINOR) source_amazon_ads/source.py:62 Check that assigned value is compatible with target Incompatible types in assignment (expression has type "AmazonAdsConfig", variable has type "Mapping[str, Any]") . Code line: config = AmazonAdsConfig(**config)
python:mypy_arg_type (MINOR) source_amazon_ads/source.py:63 Check argument types in calls Argument 1 to "_make_authenticator" of "SourceAmazonAds" has incompatible type "Mapping[str, Any]"; expected "AmazonAdsConfig" . Code line: auth = self._make_authenticator(config)
python:mypy_import (MINOR) streams/common.py:9 Require that imported module can be found or has stubs Library stubs not installed for "requests" (or incompatible with Python 3.9) . Code line: import requests
python:mypy_override (MINOR) streams/common.py:172 Check that method override is compatible with base class Return type "Optional[int]" of "next_page_token" incompatible with return type "Optional[Mapping[str, Any]]" in supertype "AmazonAdsStream" . Code line: def next_page_token(self, response: requests.Response) -> Optional...
python:mypy_no_any_return (MINOR) streams/common.py:183 Reject returning value with "Any" type if return type is not "Any" Returning Any from function declared to return "Optional[int]" . Code line: return next_offset
python:mypy_import (MINOR) streams/profiles.py:7 Require that imported module can be found or has stubs Library stubs not installed for "requests" (or incompatible with Python 3.9) . Code line: import requests
python:mypy_assignment (MINOR) streams/profiles.py:20 Check that assigned value is compatible with target Incompatible types in assignment (expression has type "Type[Profile]", base class "BasicAmazonAdsStream" defined the type as "CatalogModel") . Code line: model = Profile
python:mypy_has_type (MINOR) streams/profiles.py:27 Check that type of reference can be determined Cannot determine type of "model" . Code line: profile_id_obj = self.model.parse_obj(record)
python:mypy_has_type (MINOR) streams/profiles.py:48 Check that type of reference can be determined Cannot determine type of "model" . Code line: return [self.model.parse_obj(profile) for profile in self.read...
python:mypy_import (MINOR) report_streams/report_streams.py:17 Require that imported module can be found or has stubs Library stubs not installed for "pytz" (or incompatible with Python 3.9) . Code line: import pytz
python:mypy_import (MINOR) report_streams/report_streams.py:18 Require that imported module can be found or has stubs Library stubs not installed for "requests" (or incompatible with Python 3.9) . Code line: import requests
python:mypy_attr_defined (MINOR) report_streams/report_streams.py:111 Check that attribute exists Module has no attribute "parse" . Code line: self._start_date = pendulum.parse(config.start_date).set(tz="U...
python:mypy_no_any_return (MINOR) report_streams/report_streams.py:116 Reject returning value with "Any" type if return type is not "Any" Returning Any from function declared to return "CatalogModel" . Code line: return self._model
python:mypy_attr_defined (MINOR) report_streams/report_streams.py:382 Check that attribute exists "str" has no attribute "astimezone" . Code line: profile_time = report_date.astimezone(profile_tz)
python:mypy_no_any_return (MINOR) report_streams/report_streams.py:397 Reject returning value with "Any" type if return type is not "Any" Returning Any from function declared to return "List[Dict[Any, Any]]" . Code line: return json.loads(raw_string)
python:mypy_assignment (MINOR) streams/sponsored_brands.py:16 Check that assigned value is compatible with target Incompatible types in assignment (expression has type "Type[BrandsCampaign]", base class "BasicAmazonAdsStream" defined the type as "CatalogModel") . Code line: model = BrandsCampaign
python:mypy_assignment (MINOR) streams/sponsored_brands.py:29 Check that assigned value is compatible with target Incompatible types in assignment (expression has type "Type[BrandsAdGroup]", base class "BasicAmazonAdsStream" defined the type as "CatalogModel") . Code line: model = BrandsAdGroup
python:mypy_assignment (MINOR) streams/sponsored_brands.py:42 Check that assigned value is compatible with target Incompatible types in assignment (expression has type "Type[BrandsAdGroup]", base class "BasicAmazonAdsStream" defined the type as "CatalogModel") . Code line: model = BrandsAdGroup
python:mypy_assignment (MINOR) streams/sponsored_display.py:16 Check that assigned value is compatible with target Incompatible types in assignment (expression has type "Type[DisplayCampaign]", base class "BasicAmazonAdsStream" defined the type as "CatalogModel") . Code line: model = DisplayCampaign
python:mypy_assignment (MINOR) streams/sponsored_display.py:29 Check that assigned value is compatible with target Incompatible types in assignment (expression has type "Type[DisplayAdGroup]", base class "BasicAmazonAdsStream" defined the type as "CatalogModel") . Code line: model = DisplayAdGroup
python:mypy_assignment (MINOR) streams/sponsored_display.py:42 Check that assigned value is compatible with target Incompatible types in assignment (expression has type "Type[DisplayProductAds]", base class "BasicAmazonAdsStream" defined the type as "CatalogModel") . Code line: model = DisplayProductAds
python:mypy_assignment (MINOR) streams/sponsored_display.py:55 Check that assigned value is compatible with target Incompatible types in assignment (expression has type "Type[DisplayTargeting]", base class "BasicAmazonAdsStream" defined the type as "CatalogModel") . Code line: model = DisplayTargeting
python:mypy_assignment (MINOR) streams/sponsored_products.py:16 Check that assigned value is compatible with target Incompatible types in assignment (expression has type "Type[ProductCampaign]", base class "BasicAmazonAdsStream" defined the type as "CatalogModel") . Code line: model = ProductCampaign
python:mypy_assignment (MINOR) streams/sponsored_products.py:29 Check that assigned value is compatible with target Incompatible types in assignment (expression has type "Type[ProductAdGroups]", base class "BasicAmazonAdsStream" defined the type as "CatalogModel") . Code line: model = ProductAdGroups
python:mypy_assignment (MINOR) streams/sponsored_products.py:42 Check that assigned value is compatible with target Incompatible types in assignment (expression has type "Type[Keywords]", base class "BasicAmazonAdsStream" defined the type as "CatalogModel") . Code line: model = Keywords
python:mypy_assignment (MINOR) streams/sponsored_products.py:55 Check that assigned value is compatible with target Incompatible types in assignment (expression has type "Type[NegativeKeywords]", base class "BasicAmazonAdsStream" defined the type as "CatalogModel") . Code line: model = NegativeKeywords
python:mypy_assignment (MINOR) streams/sponsored_products.py:68 Check that assigned value is compatible with target Incompatible types in assignment (expression has type "Type[ProductAd]", base class "BasicAmazonAdsStream" defined the type as "CatalogModel") . Code line: model = ProductAd
python:mypy_assignment (MINOR) streams/sponsored_products.py:81 Check that assigned value is compatible with target Incompatible types in assignment (expression has type "Type[ProductTargeting]", base class "BasicAmazonAdsStream" defined the type as "CatalogModel") . Code line: model = ProductTargeting

Coverage (98.8%)

File Coverage File Coverage
source_amazon_ads/init.py 100.0 source_amazon_ads/constants.py 100.0
source_amazon_ads/schemas/init.py 100.0 source_amazon_ads/schemas/common.py 100.0
source_amazon_ads/schemas/profile.py 100.0 source_amazon_ads/schemas/sponsored_brands.py 100.0
source_amazon_ads/schemas/sponsored_display.py 100.0 source_amazon_ads/schemas/sponsored_products.py 100.0
source_amazon_ads/source.py 97.1 source_amazon_ads/spec.py 100.0
source_amazon_ads/streams/init.py 100.0 source_amazon_ads/streams/common.py 98.7
source_amazon_ads/streams/profiles.py 100.0 source_amazon_ads/streams/report_streams/init.py 100.0
source_amazon_ads/streams/report_streams/brands_report.py 100.0 source_amazon_ads/streams/report_streams/brands_video_report.py 100.0
source_amazon_ads/streams/report_streams/display_report.py 100.0 source_amazon_ads/streams/report_streams/products_report.py 100.0
source_amazon_ads/streams/report_streams/report_streams.py 97.0 source_amazon_ads/streams/sponsored_brands.py 100.0
source_amazon_ads/streams/sponsored_display.py 100.0 source_amazon_ads/streams/sponsored_products.py 100.0

@github-actions
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SonarQube Report

SonarQube report for Airbyte Connectors Source Linkedin Ads(#12482)

Measures

Name Value Name Value Name Value
Duplicated Lines (%) 0.0 Lines of Code 427 Code Smells 63
Coverage 72.1 Reliability Rating A Duplicated Blocks 0
Lines to Cover 298 Quality Gate Status OK Bugs 0
Security Rating A Vulnerabilities 0 Blocker Issues 0
Critical Issues 1 Major Issues 2 Minor Issues 60

Detected Issues

Rule File Description Message
python:mypy_no_any_return (MINOR) source_linkedin_ads/source.py:80 Reject returning value with "Any" type if return type is not "Any" Returning Any from function declared to return "bool" . Code line: return super().should_retry(response)
python:S112 (MAJOR) source_linkedin_ads/source.py:340 "Exception" and "BaseException" should not be raised Replace this generic exception class with a more specific one.
python:mypy_index (MINOR) source_linkedin_ads/source.py:349 Check indexing operations Unsupported target for indexed assignment ("Mapping[str, Any]") . Code line: config["authenticator"] = self.get_authenticator(config)
python:mypy_arg_type (MINOR) source_linkedin_ads/source.py:350 Check argument types in calls Argument 1 to "Accounts" has incompatible type "Mapping[str, Any]"; expected "Dict[Any, Any]" . Code line: stream = Accounts(config)
python:mypy_index (MINOR) source_linkedin_ads/source.py:364 Check indexing operations Unsupported target for indexed assignment ("Mapping[str, Any]") . Code line: config["authenticator"] = self.get_authenticator(config)
python:S3776 (CRITICAL) source_linkedin_ads/utils.py:125 Cognitive Complexity of functions should not be too high Refactor this function to reduce its Cognitive Complexity from 31 to the 15 allowed.
python:mypy_var_annotated (MINOR) source_linkedin_ads/utils.py:241 Require variable annotation if type can't be inferred Need type annotation for "updated_include" . Code line: updated_include = {"and": []}
python:mypy_attr_defined (MINOR) source_linkedin_ads/analytics.py:116 Check that attribute exists Module has no attribute "parse" . Code line: start = pdm.parse(start_date)
python:mypy_attr_defined (MINOR) source_linkedin_ads/analytics.py:117 Check that attribute exists Module has no attribute "parse" . Code line: end = pdm.parse(end_date) if end_date else pdm.now()
python:mypy_misc (MINOR) source_linkedin_ads/analytics.py:131 Miscellaneous other checks Incompatible types in "yield from" (actual type "Dict[str, Dict[str, Any]]", expected type "List[Any]") . Code line: yield from date_slices
python:mypy_arg_type (MINOR) source_linkedin_ads/analytics.py:142 Check argument types in calls Argument 2 to "get_parent_stream_values" has incompatible type "Mapping[str, Any]"; expected "Dict[Any, Any]" . Code line: base_slice = get_parent_stream_values(record, key_value_map)
python:mypy_arg_type (MINOR) source_linkedin_ads/analytics.py:142 Check argument types in calls Argument 1 to "get_parent_stream_values" has incompatible type "Mapping[str, Any]"; expected "Dict[Any, Any]" . Code line: base_slice = get_parent_stream_values(record, key_value_map)
python:mypy_arg_type (MINOR) source_linkedin_ads/analytics.py:148 Check argument types in calls Argument after ** must be a mapping, not "List[Any]" . Code line: base_slice.update(**date_slice)
python:mypy_var_annotated (MINOR) source_linkedin_ads/analytics.py:177 Require variable annotation if type can't be inferred Need type annotation for "merged" . Code line: merged = defaultdict(dict)
python:mypy_index (MINOR) source_linkedin_ads/analytics.py:180 Check indexing operations Invalid index type "str" for "str"; expected type "Union[int, slice]" . Code line: merged[item[merge_by_key]].update(item)
python:mypy_arg_type (MINOR) source_linkedin_ads/analytics.py:180 Check argument types in calls Argument 1 to "update" of "dict" has incompatible type "str"; expected "Iterable[Tuple[Any, Any]]" . Code line: merged[item[merge_by_key]].update(item)
python:mypy_misc (MINOR) source_linkedin_ads/analytics.py:185 Miscellaneous other checks Incompatible types in "yield from" (actual type "Optional[Dict[Any, Any]]", expected type "Mapping[str, Any]") . Code line: yield from result
python:mypy_import (MINOR) source_linkedin_ads/source.py:10 Require that imported module can be found or has stubs Library stubs not installed for "requests" (or incompatible with Python 3.9) . Code line: import requests
python:mypy_no_any_return (MINOR) source_linkedin_ads/source.py:42 Reject returning value with "Any" type if return type is not "Any" Returning Any from function declared to return "str" . Code line: return self.endpoint
python:mypy_override (MINOR) source_linkedin_ads/source.py:98 Check that method override is compatible with base class Signature of "request_params" incompatible with supertype "LinkedinAdsStream" . Code line: def request_params(self, stream_state: Mapping[str, Any], **kwargs...
python:S5886 (MAJOR) source_linkedin_ads/source.py:108 Function return types should be consistent with their type hint Return a value of type "MutableMapping" instead of "str" or update function "request_params" type hint.
python:mypy_return_value (MINOR) source_linkedin_ads/source.py:108 Check that return value is compatible with signature Incompatible return value type (got "str", expected "MutableMapping[str, Any]") . Code line: return urlencode(params, safe=":(),")
python:mypy_no_any_return (MINOR) source_linkedin_ads/source.py:124 Reject returning value with "Any" type if return type is not "Any" Returning Any from function declared to return "str" . Code line: return list(self.parent_values_map.keys())[0]
python:mypy_type_var (MINOR) source_linkedin_ads/source.py:137 Check that type variable values are valid Value of type variable "SupportsRichComparisonT" of "max" cannot be "Optional[Any]" . Code line: return {self.cursor_field: max(latest_record.get(self.cursor_f...
python:mypy_override (MINOR) source_linkedin_ads/source.py:156 Check that method override is compatible with base class Signature of "request_params" incompatible with supertype "LinkedinAdsStream" . Code line: def request_params(self, stream_state: Mapping[str, Any], stream_s...
python:mypy_union_attr (MINOR) source_linkedin_ads/source.py:158 Check that attribute exists in each item of a union Item "None" of "Optional[Mapping[str, Any]]" has no attribute "get" . Code line: ...self.search_param] = f"{self.search_param_value}{stream_slice.get(self...
python:mypy_union_attr (MINOR) source_linkedin_ads/source.py:164 Check that attribute exists in each item of a union Item "None" of "Optional[Mapping[str, Any]]" has no attribute "iter" (not iterable) . Code line: for record in records_slice:
python:mypy_operator (MINOR) source_linkedin_ads/source.py:165 Check that operator is valid for operands Unsupported operand types for >= ("str" and "None") . Code line: if record[self.cursor_field] >= stream_state.get(self....
python:mypy_index (MINOR) source_linkedin_ads/source.py:165 Check indexing operations Invalid index type "str" for "Union[str, Any]"; expected type "Union[int, slice]" . Code line: if record[self.cursor_field] >= stream_state.get(self....
python:mypy_misc (MINOR) source_linkedin_ads/source.py:168 Miscellaneous other checks "yield from" can't be applied to "Optional[Mapping[str, Any]]" . Code line: yield from records_slice
python:mypy_override (MINOR) source_linkedin_ads/source.py:191 Check that method override is compatible with base class Signature of "request_params" incompatible with supertype "LinkedInAdsStreamSlicing" . Code line: def request_params(self, stream_state: Mapping[str, Any], **kwargs...
python:mypy_override (MINOR) source_linkedin_ads/source.py:191 Check that method override is compatible with base class Signature of "request_params" incompatible with supertype "LinkedinAdsStream" . Code line: def request_params(self, stream_state: Mapping[str, Any], **kwargs...
python:mypy_override (MINOR) source_linkedin_ads/source.py:244 Check that method override is compatible with base class Signature of "request_params" incompatible with supertype "LinkedinAdsStream" . Code line: def request_params(self, stream_state: Mapping[str, Any], stream_s...
python:mypy_union_attr (MINOR) source_linkedin_ads/source.py:246 Check that attribute exists in each item of a union Item "None" of "Optional[Mapping[str, Any]]" has no attribute "get" . Code line: params["owner"] = stream_slice.get("reference_id")
python:mypy_assignment (MINOR) source_linkedin_ads/source.py:259 Check that assigned value is compatible with target Incompatible types in assignment (expression has type "List[str]", base class "LinkedinAdsStream" defined the type as "str") . Code line: primary_key = ["pivotValue", "end_date"]
python:mypy_override (MINOR) source_linkedin_ads/source.py:267 Check that method override is compatible with base class Signature of "request_params" incompatible with supertype "LinkedinAdsStream" . Code line: def request_params(self, stream_state: Mapping[str, Any], stream_s...
python:mypy_union_attr (MINOR) source_linkedin_ads/source.py:269 Check that attribute exists in each item of a union Item "None" of "Optional[Mapping[str, Any]]" has no attribute "get" . Code line: ...self.search_param] = f"{self.search_param_value}{stream_slice.get(self...
python:mypy_arg_type (MINOR) source_linkedin_ads/source.py:270 Check argument types in calls Argument 1 to "update_analytics_params" has incompatible type "Optional[Mapping[str, Any]]"; expected "Mapping[str, Any]" . Code line: params.update(**update_analytics_params(stream_slice))
python:mypy_operator (MINOR) source_linkedin_ads/source.py:277 Check that operator is valid for operands "object" not callable . Code line: parent_stream = self.parent_stream(config=self.config)
python:mypy_arg_type (MINOR) source_linkedin_ads/source.py:280 Check argument types in calls Argument 3 to "make_analytics_slices" has incompatible type "Optional[Any]"; expected "str" . Code line: ...analytics_slices(record, self.parent_values_map, stream_state.get(self...
python:mypy_valid_type (MINOR) source_linkedin_ads/source.py:342 Check that type (annotation) is valid Function "builtins.any" is not valid as a type . Code line: ...logger: AirbyteLogger, config: Mapping[str, Any]) -> Tuple[bool, any]:
python:mypy_arg_type (MINOR) source_linkedin_ads/source.py:366 Check argument types in calls Argument 1 to "Accounts" has incompatible type "Mapping[str, Any]"; expected "Dict[Any, Any]" . Code line: Accounts(config),
python:mypy_arg_type (MINOR) source_linkedin_ads/source.py:367 Check argument types in calls Argument 1 to "AccountUsers" has incompatible type "Mapping[str, Any]"; expected "Dict[Any, Any]" . Code line: AccountUsers(config),
python:mypy_arg_type (MINOR) source_linkedin_ads/source.py:368 Check argument types in calls Argument 1 to "AdCampaignAnalytics" has incompatible type "Mapping[str, Any]"; expected "Dict[Any, Any]" . Code line: AdCampaignAnalytics(config),
python:mypy_arg_type (MINOR) source_linkedin_ads/source.py:369 Check argument types in calls Argument 1 to "AdCreativeAnalytics" has incompatible type "Mapping[str, Any]"; expected "Dict[Any, Any]" . Code line: AdCreativeAnalytics(config),
python:mypy_arg_type (MINOR) source_linkedin_ads/source.py:370 Check argument types in calls Argument 1 to "AdDirectSponsoredContents" has incompatible type "Mapping[str, Any]"; expected "Dict[Any, Any]" . Code line: AdDirectSponsoredContents(config),
python:mypy_arg_type (MINOR) source_linkedin_ads/source.py:371 Check argument types in calls Argument 1 to "CampaignGroups" has incompatible type "Mapping[str, Any]"; expected "Dict[Any, Any]" . Code line: CampaignGroups(config),
python:mypy_arg_type (MINOR) source_linkedin_ads/source.py:372 Check argument types in calls Argument 1 to "Campaigns" has incompatible type "Mapping[str, Any]"; expected "Dict[Any, Any]" . Code line: Campaigns(config),
python:mypy_arg_type (MINOR) source_linkedin_ads/source.py:373 Check argument types in calls Argument 1 to "Creatives" has incompatible type "Mapping[str, Any]"; expected "Dict[Any, Any]" . Code line: Creatives(config),
python:mypy_assignment (MINOR) source_linkedin_ads/utils.py:52 Check that assigned value is compatible with target Incompatible types in assignment (expression has type "Optional[Any]", variable has type "Dict[Any, Any]") . Code line: target_dict: Dict = record.get(dict_key)
python:mypy_union_attr (MINOR) source_linkedin_ads/utils.py:56 Check that attribute exists in each item of a union Item "None" of "Optional[Any]" has no attribute "get" . Code line: record[prop] = pdm.from_timestamp(target_dict.get(prop).ge...
python:mypy_arg_type (MINOR) source_linkedin_ads/utils.py:84 Check argument types in calls Argument 1 to "date" has incompatible type "Optional[Any]"; expected "int" . Code line: return pdm.date(year, month, day).to_date_string()
python:mypy_no_any_return (MINOR) source_linkedin_ads/utils.py:84 Reject returning value with "Any" type if return type is not "Any" Returning Any from function declared to return "str" . Code line: return pdm.date(year, month, day).to_date_string()
python:mypy_arg_type (MINOR) source_linkedin_ads/utils.py:84 Check argument types in calls Argument 2 to "date" has incompatible type "Optional[Any]"; expected "int" . Code line: return pdm.date(year, month, day).to_date_string()
python:mypy_arg_type (MINOR) source_linkedin_ads/utils.py:84 Check argument types in calls Argument 3 to "date" has incompatible type "Optional[Any]"; expected "int" . Code line: return pdm.date(year, month, day).to_date_string()
python:mypy_assignment (MINOR) source_linkedin_ads/utils.py:111 Check that assigned value is compatible with target Incompatible types in assignment (expression has type "Optional[Any]", variable has type "Dict[Any, Any]") . Code line: target_dict: Dict = record.get(dict_key)
python:mypy_union_attr (MINOR) source_linkedin_ads/utils.py:115 Check that attribute exists in each item of a union Item "None" of "Optional[Any]" has no attribute "get" . Code line: record.update(**{f"{prop}.{field}": target_dict.get(prop)....
python:mypy_operator (MINOR) source_linkedin_ads/utils.py:239 Check that operator is valid for operands Unsupported right operand type for in ("Optional[Any]") . Code line: if "include" in targeting_criteria:
python:mypy_union_attr (MINOR) source_linkedin_ads/utils.py:240 Check that attribute exists in each item of a union Item "None" of "Optional[Any]" has no attribute "get" . Code line: and_list = targeting_criteria.get("include").get("and")
python:mypy_operator (MINOR) source_linkedin_ads/utils.py:250 Check that operator is valid for operands Unsupported right operand type for in ("Optional[Any]") . Code line: if "exclude" in targeting_criteria:
python:mypy_union_attr (MINOR) source_linkedin_ads/utils.py:251 Check that attribute exists in each item of a union Item "None" of "Optional[Any]" has no attribute "get" . Code line: or_dict = targeting_criteria.get("exclude").get("or")
python:mypy_var_annotated (MINOR) source_linkedin_ads/utils.py:252 Require variable annotation if type can't be inferred Need type annotation for "updated_exclude" . Code line: updated_exclude = {"or": []}
python:mypy_union_attr (MINOR) source_linkedin_ads/utils.py:293 Check that attribute exists in each item of a union Item "None" of "Optional[Any]" has no attribute "get" . Code line: variables = record.get(dict_key).get("data")

Coverage (72.1%)

File Coverage File Coverage
source_linkedin_ads/init.py 100.0 source_linkedin_ads/analytics.py 97.8
source_linkedin_ads/source.py 54.2 source_linkedin_ads/utils.py 94.0

@github-actions
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SonarQube Report

SonarQube report for Airbyte Connectors Source Hubspot(#12482)

Measures

Name Value Name Value Name Value
Code Smells 85 Duplicated Lines (%) 0.0 Security Rating A
Quality Gate Status OK Vulnerabilities 0 Duplicated Blocks 0
Reliability Rating A Coverage 28.6 Lines to Cover 7
Lines of Code 1146 Bugs 0 Blocker Issues 0
Critical Issues 1 Major Issues 8 Minor Issues 76

Detected Issues

Rule File Description Message
python:S112 (MAJOR) source_hubspot/streams.py:148 "Exception" and "BaseException" should not be raised Replace this generic exception class with a more specific one.
python:mypy_import (MINOR) source_hubspot/streams.py:16 Require that imported module can be found or has stubs Library stubs not installed for "requests" (or incompatible with Python 3.9) . Code line: import requests
python:mypy_assignment (MINOR) source_hubspot/streams.py:955 Check that assigned value is compatible with target Incompatible types in assignment (expression has type "str", base class "Stream" defined the type as "None") . Code line: primary_key = "id"
python:mypy_assignment (MINOR) source_hubspot/streams.py:999 Check that assigned value is compatible with target Incompatible types in assignment (expression has type "str", base class "Stream" defined the type as "None") . Code line: primary_key = "canonical-vid"
python:mypy_assignment (MINOR) source_hubspot/streams.py:1029 Check that assigned value is compatible with target Incompatible types in assignment (expression has type "str", base class "Stream" defined the type as "None") . Code line: primary_key = "id"
python:mypy_assignment (MINOR) source_hubspot/streams.py:1041 Check that assigned value is compatible with target Incompatible types in assignment (expression has type "str", base class "Stream" defined the type as "None") . Code line: primary_key = "pipelineId"
python:mypy_assignment (MINOR) source_hubspot/streams.py:1053 Check that assigned value is compatible with target Incompatible types in assignment (expression has type "str", base class "Stream" defined the type as "None") . Code line: primary_key = "id"
python:mypy_assignment (MINOR) source_hubspot/streams.py:1066 Check that assigned value is compatible with target Incompatible types in assignment (expression has type "str", base class "Stream" defined the type as "None") . Code line: primary_key = "id"
python:mypy_assignment (MINOR) source_hubspot/streams.py:1079 Check that assigned value is compatible with target Incompatible types in assignment (expression has type "str", base class "Stream" defined the type as "None") . Code line: primary_key = "id"
python:mypy_assignment (MINOR) source_hubspot/streams.py:1161 Check that assigned value is compatible with target Incompatible types in assignment (expression has type "str", base class "Stream" defined the type as "None") . Code line: primary_key = "id"
python:mypy_assignment (MINOR) source_hubspot/streams.py:1233 Check that assigned value is compatible with target Incompatible types in assignment (expression has type "str", base class "Stream" defined the type as "None") . Code line: primary_key = "id"
python:mypy_assignment (MINOR) source_hubspot/streams.py:1244 Check that assigned value is compatible with target Incompatible types in assignment (expression has type "str", base class "Stream" defined the type as "None") . Code line: primary_key = "id"
python:mypy_assignment (MINOR) source_hubspot/streams.py:1311 Check that assigned value is compatible with target Incompatible types in assignment (expression has type "str", base class "Stream" defined the type as "None") . Code line: primary_key = "id"
python:mypy_assignment (MINOR) source_hubspot/streams.py:1318 Check that assigned value is compatible with target Incompatible types in assignment (expression has type "str", base class "Stream" defined the type as "None") . Code line: primary_key = "id"
python:mypy_assignment (MINOR) source_hubspot/streams.py:1325 Check that assigned value is compatible with target Incompatible types in assignment (expression has type "str", base class "Stream" defined the type as "None") . Code line: primary_key = "id"
python:mypy_assignment (MINOR) source_hubspot/streams.py:1332 Check that assigned value is compatible with target Incompatible types in assignment (expression has type "str", base class "Stream" defined the type as "None") . Code line: primary_key = "id"
python:mypy_assignment (MINOR) source_hubspot/streams.py:1339 Check that assigned value is compatible with target Incompatible types in assignment (expression has type "str", base class "Stream" defined the type as "None") . Code line: primary_key = "id"
python:mypy_assignment (MINOR) source_hubspot/streams.py:1346 Check that assigned value is compatible with target Incompatible types in assignment (expression has type "str", base class "Stream" defined the type as "None") . Code line: primary_key = "id"
python:mypy_assignment (MINOR) source_hubspot/streams.py:1353 Check that assigned value is compatible with target Incompatible types in assignment (expression has type "str", base class "Stream" defined the type as "None") . Code line: primary_key = "id"
python:mypy_assignment (MINOR) source_hubspot/streams.py:1360 Check that assigned value is compatible with target Incompatible types in assignment (expression has type "str", base class "Stream" defined the type as "None") . Code line: primary_key = "id"
python:mypy_assignment (MINOR) source_hubspot/streams.py:1366 Check that assigned value is compatible with target Incompatible types in assignment (expression has type "str", base class "Stream" defined the type as "None") . Code line: primary_key = "id"
python:mypy_assignment (MINOR) source_hubspot/streams.py:1371 Check that assigned value is compatible with target Incompatible types in assignment (expression has type "str", base class "Stream" defined the type as "None") . Code line: primary_key = "id"
python:mypy_assignment (MINOR) source_hubspot/streams.py:1376 Check that assigned value is compatible with target Incompatible types in assignment (expression has type "str", base class "Stream" defined the type as "None") . Code line: primary_key = "id"
python:mypy_assignment (MINOR) source_hubspot/streams.py:1382 Check that assigned value is compatible with target Incompatible types in assignment (expression has type "str", base class "Stream" defined the type as "None") . Code line: primary_key = "id"
python:mypy_assignment (MINOR) source_hubspot/streams.py:1387 Check that assigned value is compatible with target Incompatible types in assignment (expression has type "str", base class "Stream" defined the type as "None") . Code line: primary_key = "id"
python:mypy_return (MINOR) source_hubspot/streams.py:371 Check that function always returns a value Missing return statement . Code line: def _convert_datetime_to_string(dt: pendulum.datetime, declared_fo...
python:mypy_no_any_return (MINOR) source_hubspot/streams.py:373 Reject returning value with "Any" type if return type is not "Any" Returning Any from function declared to return "str" . Code line: return dt.to_date_string()
python:mypy_attr_defined (MINOR) source_hubspot/streams.py:373 Check that attribute exists pendulum.datetime? has no attribute "to_date_string" . Code line: return dt.to_date_string()
python:mypy_no_any_return (MINOR) source_hubspot/streams.py:375 Reject returning value with "Any" type if return type is not "Any" Returning Any from function declared to return "str" . Code line: return dt.to_datetime_string()
python:mypy_attr_defined (MINOR) source_hubspot/streams.py:375 Check that attribute exists pendulum.datetime? has no attribute "to_datetime_string" . Code line: return dt.to_datetime_string()
python:mypy_attr_defined (MINOR) source_hubspot/streams.py:386 Check that attribute exists Module has no attribute "parse" . Code line: dt = pendulum.parse(field_value)
python:mypy_import (MINOR) source_hubspot/source.py:15 Require that imported module can be found or has stubs Library stubs not installed for "requests" (or incompatible with Python 3.9) . Code line: from requests import HTTPError
python:mypy_var_annotated (MINOR) source_hubspot/streams.py:63 Require variable annotation if type can't be inferred Need type annotation for "local_properties" (hint: "local_properties: List[] = ...") . Code line: local_properties = []
python:mypy_misc (MINOR) source_hubspot/streams.py:66 Miscellaneous other checks Incompatible types in "yield" (actual type "List[Any]", expected type "Tuple[str]") . Code line: yield local_properties
python:mypy_misc (MINOR) source_hubspot/streams.py:74 Miscellaneous other checks Incompatible types in "yield" (actual type "List[str]", expected type "Tuple[str]") . Code line: yield local_properties
python:mypy_no_any_return (MINOR) source_hubspot/streams.py:179 Reject returning value with "Any" type if return type is not "Any" Returning Any from function declared to return "Union[MutableMapping[str, Any], List[MutableMapping[str, Any]]]" . Code line: return response.json()
python:mypy_return_value (MINOR) source_hubspot/streams.py:193 Check that return value is compatible with signature Incompatible return value type (got "Tuple[Union[MutableMapping[str, Any], List[MutableMapping[str, Any]]], Any]", expected "Tuple[Union[Mapping[str, Any], List[Mapping[str, Any]]], Any]") . Code line: return self._parse_and_handle_errors(response), response
python:mypy_assignment (MINOR) source_hubspot/streams.py:199 Check that assigned value is compatible with target Incompatible types in assignment (expression has type "None", variable has type "str") . Code line: entity: str = None
python:S5890 (MAJOR) source_hubspot/streams.py:199 Values assigned to variables should match their type annotations Assign to "entity" a value of type "str" instead of "NoneType" or update its type hint.
python:mypy_assignment (MINOR) source_hubspot/streams.py:200 Check that assigned value is compatible with target Incompatible types in assignment (expression has type "None", variable has type "str") . Code line: updated_at_field: str = None
python:S5890 (MAJOR) source_hubspot/streams.py:200 Values assigned to variables should match their type annotations Assign to "updated_at_field" a value of type "str" instead of "NoneType" or update its type hint.
python:mypy_assignment (MINOR) source_hubspot/streams.py:201 Check that assigned value is compatible with target Incompatible types in assignment (expression has type "None", variable has type "str") . Code line: created_at_field: str = None
python:S5890 (MAJOR) source_hubspot/streams.py:201 Values assigned to variables should match their type annotations Assign to "created_at_field" a value of type "str" instead of "NoneType" or update its type hint.
python:S5890 (MAJOR) source_hubspot/streams.py:203 Values assigned to variables should match their type annotations Assign to "more_key" a value of type "str" instead of "NoneType" or update its type hint.
python:mypy_assignment (MINOR) source_hubspot/streams.py:203 Check that assigned value is compatible with target Incompatible types in assignment (expression has type "None", variable has type "str") . Code line: more_key: str = None
python:mypy_no_any_return (MINOR) source_hubspot/streams.py:230 Reject returning value with "Any" type if return type is not "Any" Returning Any from function declared to return "str" . Code line: return self.url
python:mypy_attr_defined (MINOR) source_hubspot/streams.py:235 Check that attribute exists Module has no attribute "parse" . Code line: self._start_date = pendulum.parse(start_date)
python:mypy_index (MINOR) source_hubspot/streams.py:237 Check indexing operations Value of type "Optional[Mapping[str, Any]]" is not indexable . Code line: if credentials["credentials_title"] == "API Key Credentials":
python:mypy_union_attr (MINOR) source_hubspot/streams.py:238 Check that attribute exists in each item of a union Item "None" of "Optional[Mapping[str, Any]]" has no attribute "get" . Code line: self._session.params["hapikey"] = credentials.get("api_key...
python:mypy_return (MINOR) source_hubspot/streams.py:240 Check that function always returns a value Missing return statement . Code line: def backoff_time(self, response: requests.Response) -> Optional[fl...
python:mypy_no_any_return (MINOR) source_hubspot/streams.py:256 Reject returning value with "Any" type if return type is not "Any" Returning Any from function declared to return "Mapping[str, Any]" . Code line: return json_schema
python:mypy_arg_type (MINOR) source_hubspot/streams.py:265 Check argument types in calls Argument "stream_state" to "request_headers" of "Stream" has incompatible type "Optional[Mapping[str, Any]]"; expected "Mapping[str, Any]" . Code line: ...uest_headers = self.request_headers(stream_state=stream_state, stream_...
python:mypy_arg_type (MINOR) source_hubspot/streams.py:266 Check argument types in calls Argument "stream_state" to "request_params" of "Stream" has incompatible type "Optional[Mapping[str, Any]]"; expected "Mapping[str, Any]" . Code line: ...equest_params = self.request_params(stream_state=stream_state, stream_...
python:mypy_arg_type (MINOR) source_hubspot/streams.py:315 Check argument types in calls Argument "stream_state" to "parse_response" of "Stream" has incompatible type "Optional[Mapping[str, Any]]"; expected "Mapping[str, Any]" . Code line: ...._transform(self.parse_response(response, stream_state=stream_state)):
python:mypy_assignment (MINOR) source_hubspot/streams.py:351 Check that assigned value is compatible with target Incompatible types in assignment (expression has type "Iterable[Any]", variable has type "List[Any]") . Code line: records = self._transform(self.parse_response(...
python:mypy_valid_type (MINOR) source_hubspot/streams.py:354 Check that type (annotation) is valid Incompatible types in assignment (expression has type "Iterable[Any]", variable has type "List[Any]") [assignment] records = self._filter_old_records(records)
python:mypy_valid_type (MINOR) source_hubspot/streams.py:442 Check that type (annotation) is valid "None" not callable [misc] casted_value = target_type(field_value)
python:S5806 (MAJOR) source_hubspot/streams.py:460 Builtins should not be shadowed by local variables Rename this variable; it shadows a builtin.
python:mypy_assignment (MINOR) source_hubspot/streams.py:478 Check that assigned value is compatible with target Incompatible types in assignment (expression has type "DateTime", variable has type "Union[int, str]") . Code line: value = pendulum.from_timestamp(value / 1000.0)
python:mypy_attr_defined (MINOR) source_hubspot/streams.py:480 Check that attribute exists Module has no attribute "parse" . Code line: value = pendulum.parse(value)
python:S3776 (CRITICAL) source_hubspot/streams.py:548 Cognitive Complexity of functions should not be too high Refactor this function to reduce its Cognitive Complexity from 16 to the 15 allowed.
python:mypy_return (MINOR) source_hubspot/streams.py:548 Check that function always returns a value Missing return statement . Code line: def next_page_token(self, response: requests.Response) -> Optional...
python:mypy_return_value (MINOR) source_hubspot/streams.py:557 Check that return value is compatible with signature Return value expected . Code line: return
python:mypy_assignment (MINOR) source_hubspot/streams.py:584 Check that assigned value is compatible with target Incompatible types in assignment (expression has type "str", target has type "List[str]") . Code line: field_props["format"] = field_format
python:mypy_misc (MINOR) source_hubspot/streams.py:588 Miscellaneous other checks Decorated property not supported . Code line: @Property
python:mypy_no_any_return (MINOR) source_hubspot/streams.py:635 Reject returning value with "Any" type if return type is not "Any" Returning Any from function declared to return "Union[str, List[str]]" . Code line: return self.updated_at_field
python:mypy_assignment (MINOR) source_hubspot/streams.py:708 Check that assigned value is compatible with target Incompatible types in assignment (expression has type "int", variable has type "Duration") . Code line: chunk_size = int(chunk_size.total_seconds() * 1000) if self.ne...
python:mypy_call_overload (MINOR) source_hubspot/streams.py:710 Check that an overload variant matches arguments No overload variant of "range" matches argument types "int", "int", "Duration" . Code line: for ts in range(start_ts, now_ts, chunk_size):
python:S5890 (MAJOR) source_hubspot/streams.py:737 Values assigned to variables should match their type annotations Assign to "last_modified_field" a value of type "str" instead of "NoneType" or update its type hint.
python:mypy_assignment (MINOR) source_hubspot/streams.py:737 Check that assigned value is compatible with target Incompatible types in assignment (expression has type "None", variable has type "str") . Code line: last_modified_field: str = None
python:S5890 (MAJOR) source_hubspot/streams.py:738 Values assigned to variables should match their type annotations Assign to "associations" a value of type "list[str]" instead of "NoneType" or update its type hint.
python:mypy_assignment (MINOR) source_hubspot/streams.py:738 Check that assigned value is compatible with target Incompatible types in assignment (expression has type "None", variable has type "List[str]") . Code line: associations: List[str] = None
python:mypy_arg_type (MINOR) source_hubspot/streams.py:786 Check argument types in calls Argument "stream_state" to "parse_response" of "Stream" has incompatible type "Optional[Mapping[str, Any]]"; expected "Mapping[str, Any]" . Code line: ...m(self.parse_response(raw_response, stream_state=stream_state, stream_...
python:mypy_attr_defined (MINOR) source_hubspot/streams.py:805 Check that attribute exists "_lru_cache_wrapper[Mapping[str, Any]]" has no attribute "keys" . Code line: properties_list = list(self.properties.keys())
python:mypy_assignment (MINOR) source_hubspot/streams.py:824 Check that assigned value is compatible with target Incompatible types in assignment (expression has type "Iterable[Any]", variable has type "List[Any]") . Code line: records = self._filter_old_records(records)
python:mypy_assignment (MINOR) source_hubspot/streams.py:825 Check that assigned value is compatible with target Incompatible types in assignment (expression has type "Iterable[MutableMapping[Any, Any]]", variable has type "List[Any]") . Code line: records = self._flat_associations(records)
python:mypy_return (MINOR) source_hubspot/streams.py:858 Check that function always returns a value Missing return statement . Code line: def next_page_token(self, response: requests.Response) -> Optional...
python:mypy_assignment (MINOR) source_hubspot/streams.py:884 Check that assigned value is compatible with target Incompatible types in assignment (expression has type "Optional[str]", base class "Stream" defined the type as "str") . Code line: entity: Optional[str] = None
python:mypy_arg_type (MINOR) source_hubspot/streams.py:941 Check argument types in calls Argument 1 to "_flat_associations" of "Stream" has incompatible type "Iterable[Mapping[str, Any]]"; expected "Iterable[MutableMapping[Any, Any]]" . Code line: yield from self._flat_associations(records)
python:mypy_no_redef (MINOR) source_hubspot/streams.py:1081 Check that each name is defined once Name "url" already defined on line 1075 . Code line: @Property
python:mypy_index (MINOR) source_hubspot/streams.py:1181 Check indexing operations Value of type "Optional[Mapping[str, Any]]" is not indexable . Code line: return f"{self.url}/{stream_slice['form_id']}"
python:mypy_index (MINOR) source_hubspot/streams.py:1219 Check indexing operations Unsupported target for indexed assignment ("Mapping[str, Any]") . Code line: record["formId"] = stream_slice["form_id"]
python:mypy_index (MINOR) source_hubspot/streams.py:1219 Check indexing operations Value of type "Optional[Mapping[str, Any]]" is not indexable . Code line: record["formId"] = stream_slice["form_id"]
python:mypy_attr_defined (MINOR) source_hubspot/streams.py:1285 Check that attribute exists pendulum.datetime? has no attribute "to_datetime_string" . Code line: version["timestamp"] = self._field_to_datetime...
python:mypy_import (MINOR) source_hubspot/errors.py:6 Require that imported module can be found or has stubs Library stubs not installed for "requests" (or incompatible with Python 3.9) . Code line: from requests import HTTPError

Coverage (28.6%)

File Coverage File Coverage
source_hubspot/init.py 100.0 source_hubspot/errors.py 100.0
source_hubspot/source.py 82.6 source_hubspot/streams.py 91.4

Please sign in to comment.