Skip to content

Commit

Permalink
bumping
Browse files Browse the repository at this point in the history
  • Loading branch information
eugene-kulak committed Feb 23, 2022
1 parent 55541c5 commit 3b4c249
Show file tree
Hide file tree
Showing 2 changed files with 212 additions and 79 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@
- name: Facebook Marketing
sourceDefinitionId: e7778cfc-e97c-4458-9ecb-b4f2bba8946c
dockerRepository: airbyte/source-facebook-marketing
dockerImageTag: 0.2.35
dockerImageTag: 0.2.36
documentationUrl: https://docs.airbyte.io/integrations/sources/facebook-marketing
icon: facebook.svg
sourceType: api
Expand Down
289 changes: 211 additions & 78 deletions airbyte-config/init/src/main/resources/seed/source_specs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1648,145 +1648,278 @@
supportsNormalization: false
supportsDBT: false
supported_destination_sync_modes: []
- dockerImage: "airbyte/source-facebook-marketing:0.2.35"
- dockerImage: "airbyte/source-facebook-marketing:0.2.36"
spec:
documentationUrl: "https://docs.airbyte.io/integrations/sources/facebook-marketing"
changelogUrl: "https://docs.airbyte.io/integrations/sources/facebook-marketing"
connectionSpecification:
title: "Source Facebook Marketing"
type: "object"
properties:
account_id:
title: "Account Id"
description: "The Facebook Ad account ID to use when pulling data from the\
\ Facebook Marketing API."
type: "string"
access_token:
title: "Access Token"
description: "The value of the access token generated. See the <a href=\"\
https://docs.airbyte.io/integrations/sources/facebook-marketing\">docs</a>\
\ for more information"
airbyte_secret: true
type: "string"
start_date:
title: "Start Date"
description: "The date from which you'd like to replicate data for AdCreatives\
\ and AdInsights APIs, in the format YYYY-MM-DDT00:00:00Z. All data generated\
\ after this date will be replicated."
description: "The date from which you'd like to replicate data for all incremental\
\ streams, in the format YYYY-MM-DDT00:00:00Z. All data generated after\
\ this date will be replicated."
order: 0
pattern: "^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}Z$"
examples:
- "2017-01-25T00:00:00Z"
type: "string"
format: "date-time"
end_date:
title: "End Date"
description: "The date until which you'd like to replicate data for AdCreatives\
\ and AdInsights APIs, in the format YYYY-MM-DDT00:00:00Z. All data generated\
description: "The date until which you'd like to replicate data for all\
\ incremental streams, in the format YYYY-MM-DDT00:00:00Z. All data generated\
\ between start_date and this date will be replicated. Not setting this\
\ option will result in always syncing the latest data."
order: 1
pattern: "^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}Z$"
examples:
- "2017-01-26T00:00:00Z"
type: "string"
format: "date-time"
account_id:
title: "Account ID"
description: "The Facebook Ad account ID to use when pulling data from the\
\ Facebook Marketing API."
order: 2
examples:
- "111111111111111"
type: "string"
access_token:
title: "Access Token"
description: "The value of the access token generated. See the <a href=\"\
https://docs.airbyte.io/integrations/sources/facebook-marketing\">docs</a>\
\ for more information"
order: 3
airbyte_secret: true
type: "string"
include_deleted:
title: "Include Deleted"
description: "Include data from deleted Campaigns, Ads, and AdSets"
default: false
order: 4
type: "boolean"
fetch_thumbnail_images:
title: "Fetch Thumbnail Images"
description: "In each Ad Creative, fetch the thumbnail_url and store the\
\ result in thumbnail_data_url"
default: false
order: 5
type: "boolean"
include_deleted:
title: "Include Deleted"
description: "Include data from deleted campaigns, ads, and adsets"
default: false
type: "boolean"
insights_lookback_window:
title: "Insights Lookback Window"
description: "The attribution window for the actions"
default: 28
minimum: 0
maximum: 28
type: "integer"
insights_days_per_job:
title: "Insights Days Per Job"
description: "Number of days to sync in one job (the more data you have,\
\ the smaller this parameter should be)"
default: 7
minimum: 1
maximum: 30
type: "integer"
custom_insights:
title: "Custom Insights"
description: "A list wich contains insights entries, each entry must have\
description: "A list which contains insights entries, each entry must have\
\ a name and can contains fields, breakdowns or action_breakdowns)"
order: 6
type: "array"
items:
title: "InsightConfig"
description: "Config for custom insights"
type: "object"
properties:
name:
title: "Name"
description: "The name value of insight"
type: "string"
fields:
title: "Fields"
description: "A list of chosen fields for fields parameter"
default: []
type: "array"
items:
type: "string"
title: "ValidEnums"
description: "Generic enumeration.\n\nDerive from this class to\
\ define new enumerations."
enum:
- "account_currency"
- "account_id"
- "account_name"
- "action_values"
- "actions"
- "ad_bid_value"
- "ad_click_actions"
- "ad_id"
- "ad_impression_actions"
- "ad_name"
- "adset_bid_value"
- "adset_end"
- "adset_id"
- "adset_name"
- "adset_start"
- "age_targeting"
- "attribution_setting"
- "auction_bid"
- "auction_competitiveness"
- "auction_max_competitor_bid"
- "buying_type"
- "campaign_id"
- "campaign_name"
- "canvas_avg_view_percent"
- "canvas_avg_view_time"
- "catalog_segment_actions"
- "catalog_segment_value"
- "catalog_segment_value_mobile_purchase_roas"
- "catalog_segment_value_omni_purchase_roas"
- "catalog_segment_value_website_purchase_roas"
- "clicks"
- "conversion_rate_ranking"
- "conversion_values"
- "conversions"
- "converted_product_quantity"
- "converted_product_value"
- "cost_per_15_sec_video_view"
- "cost_per_2_sec_continuous_video_view"
- "cost_per_action_type"
- "cost_per_ad_click"
- "cost_per_conversion"
- "cost_per_dda_countby_convs"
- "cost_per_estimated_ad_recallers"
- "cost_per_inline_link_click"
- "cost_per_inline_post_engagement"
- "cost_per_one_thousand_ad_impression"
- "cost_per_outbound_click"
- "cost_per_thruplay"
- "cost_per_unique_action_type"
- "cost_per_unique_click"
- "cost_per_unique_conversion"
- "cost_per_unique_inline_link_click"
- "cost_per_unique_outbound_click"
- "cpc"
- "cpm"
- "cpp"
- "created_time"
- "ctr"
- "date_start"
- "date_stop"
- "dda_countby_convs"
- "dda_results"
- "engagement_rate_ranking"
- "estimated_ad_recall_rate"
- "estimated_ad_recall_rate_lower_bound"
- "estimated_ad_recall_rate_upper_bound"
- "estimated_ad_recallers"
- "estimated_ad_recallers_lower_bound"
- "estimated_ad_recallers_upper_bound"
- "frequency"
- "full_view_impressions"
- "full_view_reach"
- "gender_targeting"
- "impressions"
- "inline_link_click_ctr"
- "inline_link_clicks"
- "inline_post_engagement"
- "instant_experience_clicks_to_open"
- "instant_experience_clicks_to_start"
- "instant_experience_outbound_clicks"
- "interactive_component_tap"
- "labels"
- "location"
- "mobile_app_purchase_roas"
- "objective"
- "optimization_goal"
- "outbound_clicks"
- "outbound_clicks_ctr"
- "place_page_name"
- "purchase_roas"
- "qualifying_question_qualify_answer_rate"
- "quality_ranking"
- "quality_score_ectr"
- "quality_score_ecvr"
- "quality_score_organic"
- "reach"
- "social_spend"
- "spend"
- "total_postbacks"
- "unique_actions"
- "unique_clicks"
- "unique_conversions"
- "unique_ctr"
- "unique_inline_link_click_ctr"
- "unique_inline_link_clicks"
- "unique_link_clicks_ctr"
- "unique_outbound_clicks"
- "unique_outbound_clicks_ctr"
- "unique_video_continuous_2_sec_watched_actions"
- "unique_video_view_15_sec"
- "updated_time"
- "video_15_sec_watched_actions"
- "video_30_sec_watched_actions"
- "video_avg_time_watched_actions"
- "video_continuous_2_sec_watched_actions"
- "video_p100_watched_actions"
- "video_p25_watched_actions"
- "video_p50_watched_actions"
- "video_p75_watched_actions"
- "video_p95_watched_actions"
- "video_play_actions"
- "video_play_curve_actions"
- "video_play_retention_0_to_15s_actions"
- "video_play_retention_20_to_60s_actions"
- "video_play_retention_graph_actions"
- "video_thruplay_watched_actions"
- "video_time_watched_actions"
- "website_ctr"
- "website_purchase_roas"
- "wish_bid"
breakdowns:
title: "Breakdowns"
description: "A list of chosen breakdowns for breakdowns"
default: []
type: "array"
items:
type: "string"
title: "ValidBreakdowns"
description: "Generic enumeration.\n\nDerive from this class to\
\ define new enumerations."
enum:
- "ad_format_asset"
- "age"
- "app_id"
- "body_asset"
- "call_to_action_asset"
- "country"
- "description_asset"
- "device_platform"
- "dma"
- "frequency_value"
- "gender"
- "hourly_stats_aggregated_by_advertiser_time_zone"
- "hourly_stats_aggregated_by_audience_time_zone"
- "image_asset"
- "impression_device"
- "link_url_asset"
- "place_page_id"
- "platform_position"
- "product_id"
- "publisher_platform"
- "region"
- "skan_conversion_id"
- "title_asset"
- "video_asset"
action_breakdowns:
title: "Action Breakdowns"
description: "A list of chosen action_breakdowns for action_breakdowns"
default: []
type: "array"
items:
type: "string"
title: "ValidActionBreakdowns"
description: "Generic enumeration.\n\nDerive from this class to\
\ define new enumerations."
enum:
- "action_canvas_component_name"
- "action_carousel_card_id"
- "action_carousel_card_name"
- "action_destination"
- "action_device"
- "action_reaction"
- "action_target_id"
- "action_type"
- "action_video_sound"
- "action_video_type"
required:
- "name"
required:
- "start_date"
- "account_id"
- "access_token"
- "start_date"
definitions:
InsightConfig:
title: "InsightConfig"
type: "object"
properties:
name:
title: "Name"
description: "The name value of insight"
type: "string"
fields:
title: "Fields"
description: "A list of chosen fields for fields parameter"
default: []
type: "array"
items:
type: "string"
breakdowns:
title: "Breakdowns"
description: "A list of chosen breakdowns for breakdowns"
default: []
type: "array"
items:
type: "string"
action_breakdowns:
title: "Action Breakdowns"
description: "A list of chosen action_breakdowns for action_breakdowns"
default: []
type: "array"
items:
type: "string"
required:
- "name"
supportsIncremental: true
supportsNormalization: false
supportsDBT: false
Expand Down

1 comment on commit 3b4c249

@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 Facebook Marketing(#10588)

Measures

Name Value Name Value Name Value
Bugs 0 Coverage 100.0 Vulnerabilities 0
Quality Gate Status ERROR Security Rating A Duplicated Lines (%) 0.0
Code Smells 2 Lines to Cover 2 Duplicated Blocks 0
Lines of Code 1087 Reliability Rating A Blocker Issues 0
Critical Issues 0 Major Issues 8 Minor Issues 192

Detected Issues

Rule File Description Message
python:black_need_format (MINOR) source_facebook_marketing/api.py Please run one of the commands: "black --config ./pyproject.toml <path_to_updated_folder>" or "./gradlew format" 1 code part(s) should be updated.
flake8:W291 (MAJOR) source_facebook_marketing/api.py:96 trailing whitespace trailing whitespace
python:mypy_no_redef (MINOR) streams/base_streams.py:76 Check that each name is defined once Name "api_batch" already defined on line 69 . Code line: api_batch: FacebookAdsApiBatch = self._api.api.new_bat...
python:mypy_attr_defined (MINOR) source_facebook_marketing/source.py:43 Check that attribute exists "Mapping[str, Any]" has no attribute "end_date" . Code line: if pendulum.instance(config.end_date) < pendulum.instance(conf...
python:mypy_attr_defined (MINOR) source_facebook_marketing/source.py:43 Check that attribute exists "Mapping[str, Any]" has no attribute "start_date" . Code line: ...ulum.instance(config.end_date) < pendulum.instance(config.start_date):
python:mypy_no_redef (MINOR) source_facebook_marketing/source.py:56 Check that each name is defined once Name "config" already defined on line 50 . Code line: config: ConnectorConfig = ConnectorConfig.parse_obj(config)
python:mypy_attr_defined (MINOR) source_facebook_marketing/source.py:77 Check that attribute exists "Mapping[str, Any]" has no attribute "start_date" . Code line: Campaigns(api=api, start_date=config.start_date, end_date=...
python:mypy_attr_defined (MINOR) source_facebook_marketing/source.py:77 Check that attribute exists "Mapping[str, Any]" has no attribute "end_date" . Code line: ...(api=api, start_date=config.start_date, end_date=config.end_date, incl...
python:mypy_attr_defined (MINOR) source_facebook_marketing/source.py:77 Check that attribute exists "Mapping[str, Any]" has no attribute "include_deleted" . Code line: ..._date, end_date=config.end_date, include_deleted=config.include_delete...
python:mypy_attr_defined (MINOR) source_facebook_marketing/source.py:79 Check that attribute exists "Mapping[str, Any]" has no attribute "start_date" . Code line: Videos(api=api, start_date=config.start_date, end_date=con...
python:mypy_attr_defined (MINOR) source_facebook_marketing/source.py:79 Check that attribute exists "Mapping[str, Any]" has no attribute "end_date" . Code line: ...(api=api, start_date=config.start_date, end_date=config.end_date, incl...
python:mypy_attr_defined (MINOR) source_facebook_marketing/source.py:79 Check that attribute exists "Mapping[str, Any]" has no attribute "include_deleted" . Code line: ..._date, end_date=config.end_date, include_deleted=config.include_delete...
python:mypy_misc (MINOR) source_facebook_marketing/spec.py:18 Miscellaneous other checks Enum() expects a string, tuple, list or dict literal as the second argument . Code line: ValidFields = Enum("ValidEnums", AdsInsights.Field.dict)
python:mypy_misc (MINOR) source_facebook_marketing/spec.py:19 Miscellaneous other checks Enum() expects a string, tuple, list or dict literal as the second argument . Code line: ValidBreakdowns = Enum("ValidBreakdowns", AdsInsights.Breakdowns.__dic...
python:mypy_name_defined (MINOR) source_facebook_marketing/spec.py:20 Check that name is defined Enum() expects a string, tuple, list or dict literal as the second argument [misc] ValidActionBreakdowns = Enum("ValidActionBreakdowns", AdsInsights.Acti...
python:mypy_attr_defined (MINOR) streams/init.py:5 Check that attribute exists Module "source_facebook_marketing.streams.streams" does not explicitly export attribute "AdsInsights"; implicit reexport disabled . Code line: from .streams import (
python:mypy_arg_type (MINOR) streams/async_job.py:149 Check argument types in calls Argument "jobs" to "update_in_batch" has incompatible type "List[InsightAsyncJob]"; expected "List[AsyncJob]" . Code line: update_in_batch(api=self._api, jobs=self._jobs)
python:mypy_return_value (MINOR) streams/async_job.py:236 Check that return value is compatible with signature Incompatible return value type (got "List[InsightAsyncJob]", expected "List[AsyncJob]") . Code line: return jobs
python:mypy_unreachable (MINOR) streams/async_job.py:266 Warn about unreachable statements or expressions Statement is unreachable . Code line: end_time = self._finish_time or pendulum.now()
python:mypy_index (MINOR) streams/async_job.py:315 Check indexing operations Value of type "Optional[Any]" is not indexable . Code line: job_status = self._job["async_status"]
python:mypy_index (MINOR) streams/async_job.py:316 Check indexing operations Value of type "Optional[Any]" is not indexable . Code line: percent = self._job["async_percent_completion"]
python:mypy_operator (MINOR) streams/async_job.py:319 Check that operator is valid for operands Unsupported operand types for < ("Duration" and "None") . Code line: if self.elapsed_time > self.job_timeout:
python:mypy_assignment (MINOR) streams/async_job.py:321 Check that assigned value is compatible with target Incompatible types in assignment (expression has type "DateTime", variable has type "None") . Code line: self._finish_time = pendulum.now()
python:mypy_assignment (MINOR) streams/async_job.py:325 Check that assigned value is compatible with target Incompatible types in assignment (expression has type "DateTime", variable has type "None") . Code line: self._finish_time = pendulum.now() # TODO: is not actual ...
python:mypy_assignment (MINOR) streams/async_job.py:328 Check that assigned value is compatible with target Incompatible types in assignment (expression has type "DateTime", variable has type "None") . Code line: self._finish_time = pendulum.now()
python:mypy_attr_defined (MINOR) streams/async_job.py:330 Check that attribute exists "None" has no attribute "in_seconds" . Code line: ...er.info(f"{self}: has status {job_status} after {self.elapsed_time.in_...
python:mypy_var_annotated (MINOR) streams/async_job_manager.py:43 Require variable annotation if type can't be inferred Need type annotation for "_running_jobs" (hint: "_running_jobs: List[] = ...") . Code line: self._running_jobs = []
python:mypy_no_any_return (MINOR) streams/async_job_manager.py:136 Reject returning value with "Any" type if return type is not "Any" Returning Any from function declared to return "float" . Code line: return min(throttle.per_account, throttle.per_application)
python:mypy_var_annotated (MINOR) streams/base_insight_streams.py:58 Require variable annotation if type can't be inferred Need type annotation for "breakdowns" (hint: "breakdowns: List[] = ...") . Code line: breakdowns = []
python:mypy_assignment (MINOR) streams/base_insight_streams.py:62 Check that assigned value is compatible with target Incompatible default for argument "name" (default has type "None", argument has type "str") . Code line: name: str = None,
python:mypy_assignment (MINOR) streams/base_insight_streams.py:63 Check that assigned value is compatible with target Incompatible default for argument "fields" (default has type "None", argument has type "List[str]") . Code line: fields: List[str] = None,
python:mypy_assignment (MINOR) streams/base_insight_streams.py:64 Check that assigned value is compatible with target Incompatible default for argument "breakdowns" (default has type "None", argument has type "List[str]") . Code line: breakdowns: List[str] = None,
python:mypy_name_defined (MINOR) streams/base_insight_streams.py:65 Check that name is defined Incompatible default for argument "action_breakdowns" (default has type "None", argument has type "List[str]") [assignment] action_breakdowns: List[str] = None,
python:mypy_var_annotated (MINOR) streams/base_insight_streams.py:79 Require variable annotation if type can't be inferred Need type annotation for "_completed_slices" (hint: "_completed_slices: Set[] = ...") . Code line: self._completed_slices = set()
python:mypy_no_any_return (MINOR) streams/base_insight_streams.py:85 Reject returning value with "Any" type if return type is not "Any" Returning Any from function declared to return "str" . Code line: return casing.camel_to_snake(name)
python:mypy_override (MINOR) streams/base_insight_streams.py:88 Check that method override is compatible with base class Signature of "primary_key" incompatible with supertype "FBMarketingStream" . Code line: def primary_key(self) -> Optional[Union[str, List[str], List[List[...
python:mypy_assignment (MINOR) streams/base_insight_streams.py:98 Check that assigned value is compatible with target Incompatible default for argument "cursor_field" (default has type "None", argument has type "List[str]") . Code line: cursor_field: List[str] = None,
python:mypy_assignment (MINOR) streams/base_insight_streams.py:99 Check that assigned value is compatible with target Incompatible default for argument "stream_slice" (default has type "None", argument has type "Mapping[str, Any]") . Code line: stream_slice: Mapping[str, Any] = None,
python:mypy_assignment (MINOR) streams/base_insight_streams.py:100 Check that assigned value is compatible with target Incompatible default for argument "stream_state" (default has type "None", argument has type "Mapping[str, Any]") . Code line: stream_state: Mapping[str, Any] = None,
python:mypy_attr_defined (MINOR) streams/base_insight_streams.py:130 Check that attribute exists Module has no attribute "parse" . Code line: self._cursor_value = pendulum.parse(value[self.cursor_field])....
python:mypy_attr_defined (MINOR) streams/base_insight_streams.py:131 Check that attribute exists Module has no attribute "parse" . Code line: self._completed_slices = set(pendulum.parse(v).date() for v in...
python:mypy_return_value (MINOR) streams/base_insight_streams.py:144 Check that return value is compatible with signature Incompatible return value type (got "List[]", expected "Iterator[Any]") . Code line: return []
python:S5886 (MAJOR) streams/base_insight_streams.py:144 Function return types should be consistent with their type hint Return a value of type "Iterator" instead of "list" or update function "_date_intervals" type hint.
python:mypy_no_any_return (MINOR) streams/base_insight_streams.py:146 Reject returning value with "Any" type if return type is not "Any" Returning Any from function declared to return "Iterator[Any]" . Code line: return date_range.range("days", self.time_increment)
python:mypy_attr_defined (MINOR) streams/base_insight_streams.py:168 Check that attribute exists Module has no attribute "Period"; maybe "period"? . Code line: interval = pendulum.Period(ts_start, ts_end)
python:mypy_assignment (MINOR) streams/base_insight_streams.py:172 Check that assigned value is compatible with target Incompatible default for argument "cursor_field" (default has type "None", argument has type "List[str]") . Code line: ..., sync_mode: SyncMode, cursor_field: List[str] = None, stream_state: M...
python:mypy_assignment (MINOR) streams/base_insight_streams.py:172 Check that assigned value is compatible with target Incompatible default for argument "stream_state" (default has type "None", argument has type "Mapping[str, Any]") . Code line: ...cursor_field: List[str] = None, stream_state: Mapping[str, Any] = None
python:mypy_name_defined (MINOR) streams/base_insight_streams.py:188 Check that name is defined Incompatible types in assignment (expression has type "Mapping[str, Any]", variable has type "MutableMapping[str, Any]") [assignment] self.state = stream_state
python:S1134 (MAJOR) streams/base_insight_streams.py:216 Track uses of "FIXME" tags Take the required action to fix the issue indicated by this "FIXME" comment.
python:mypy_override (MINOR) streams/base_insight_streams.py:229 Check that method override is compatible with base class Signature of "request_params" incompatible with supertype "FBMarketingIncrementalStream" . Code line: def request_params(self, **kwargs) -> MutableMapping[str, Any]:
python:mypy_no_any_return (MINOR) streams/base_insight_streams.py:254 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_assignment (MINOR) streams/base_streams.py:84 Check that assigned value is compatible with target Incompatible default for argument "cursor_field" (default has type "None", argument has type "List[str]") . Code line: cursor_field: List[str] = None,
python:mypy_assignment (MINOR) streams/base_streams.py:85 Check that assigned value is compatible with target Incompatible default for argument "stream_slice" (default has type "None", argument has type "Mapping[str, Any]") . Code line: stream_slice: Mapping[str, Any] = None,
python:mypy_assignment (MINOR) streams/base_streams.py:86 Check that assigned value is compatible with target Incompatible default for argument "stream_state" (default has type "None", argument has type "Mapping[str, Any]") . Code line: stream_state: Mapping[str, Any] = None,
python:mypy_assignment (MINOR) streams/base_streams.py:92 Check that assigned value is compatible with target Incompatible types in assignment (expression has type "Iterable[MutableMapping[str, Any]]", variable has type "Generator[Any, None, None]") . Code line: loaded_records_iter = self.execute_in_batch(loaded_records...
python:mypy_attr_defined (MINOR) streams/base_streams.py:161 Check that attribute exists Module has no attribute "parse" . Code line: max_cursor = max(pendulum.parse(state_value), pendulum.parse(r...
python:mypy_override (MINOR) streams/base_streams.py:170 Check that method override is compatible with base class Signature of "request_params" incompatible with supertype "FBMarketingStream" . Code line: def request_params(self, stream_state: Mapping[str, Any], **kwargs...
python:mypy_attr_defined (MINOR) streams/base_streams.py:179 Check that attribute exists Module has no attribute "parse" . Code line: ...value = self.start_date if not state_value else pendulum.parse(state...
python:mypy_attr_defined (MINOR) streams/base_streams.py:225 Check that attribute exists Module has no attribute "parse" . Code line: self._cursor_value = pendulum.parse(value[self.cursor_field])
python:mypy_assignment (MINOR) streams/base_streams.py:228 Check that assigned value is compatible with target Incompatible default for argument "cursor_field" (default has type "None", argument has type "List[str]") . Code line: ..., sync_mode: SyncMode, cursor_field: List[str] = None, stream_state: M...
python:mypy_assignment (MINOR) streams/base_streams.py:228 Check that assigned value is compatible with target Incompatible default for argument "stream_state" (default has type "None", argument has type "Mapping[str, Any]") . Code line: ...cursor_field: List[str] = None, stream_state: Mapping[str, Any] = None
python:mypy_attr_defined (MINOR) streams/base_streams.py:238 Check that attribute exists Module has no attribute "parse" . Code line: record_cursor_value = pendulum.parse(latest_record[self.cursor...
python:mypy_assignment (MINOR) streams/base_streams.py:251 Check that assigned value is compatible with target Incompatible default for argument "cursor_field" (default has type "None", argument has type "List[str]") . Code line: cursor_field: List[str] = None,
python:mypy_assignment (MINOR) streams/base_streams.py:252 Check that assigned value is compatible with target Incompatible default for argument "stream_slice" (default has type "None", argument has type "Mapping[str, Any]") . Code line: stream_slice: Mapping[str, Any] = None,
python:mypy_assignment (MINOR) streams/base_streams.py:253 Check that assigned value is compatible with target Incompatible default for argument "stream_state" (default has type "None", argument has type "Mapping[str, Any]") . Code line: stream_state: Mapping[str, Any] = None,
python:mypy_attr_defined (MINOR) streams/base_streams.py:263 Check that attribute exists Module has no attribute "parse" . Code line: if self._cursor_value and pendulum.parse(record[self.curso...
python:mypy_import (MINOR) streams/streams.py:9 Require that imported module can be found or has stubs Library stubs not installed for "requests" (or incompatible with Python 3.7) . Code line: import requests
python:mypy_assignment (MINOR) streams/streams.py:40 Check that assigned value is compatible with target Incompatible types in assignment (expression has type "str", base class "FBMarketingStream" defined the type as "None") . Code line: entity_prefix = "adcreative"
python:mypy_assignment (MINOR) streams/streams.py:55 Check that assigned value is compatible with target Incompatible default for argument "cursor_field" (default has type "None", argument has type "List[str]") . Code line: cursor_field: List[str] = None,
python:mypy_assignment (MINOR) streams/streams.py:56 Check that assigned value is compatible with target Incompatible default for argument "stream_slice" (default has type "None", argument has type "Mapping[str, Any]") . Code line: stream_slice: Mapping[str, Any] = None,
python:mypy_assignment (MINOR) streams/streams.py:57 Check that assigned value is compatible with target Incompatible default for argument "stream_state" (default has type "None", argument has type "Mapping[str, Any]") . Code line: stream_state: Mapping[str, Any] = None,
python:mypy_index (MINOR) streams/streams.py:62 Check indexing operations Unsupported target for indexed assignment ("Mapping[str, Any]") . Code line: record["thumbnail_data_url"] = fetch_thumbnail_data_ur...
python:mypy_arg_type (MINOR) streams/streams.py:62 Check argument types in calls Argument 1 to "fetch_thumbnail_data_url" has incompatible type "Optional[Any]"; expected "str" . Code line: ..."thumbnail_data_url"] = fetch_thumbnail_data_url(record.get("thumbnail...
python:mypy_no_any_return (MINOR) streams/streams.py:66 Reject returning value with "Any" type if return type is not "Any" Returning Any from function declared to return "Iterable[Any]" . Code line: return self._api.account.get_ad_creatives(params=params)
python:mypy_assignment (MINOR) streams/streams.py:72 Check that assigned value is compatible with target Incompatible types in assignment (expression has type "str", base class "FBMarketingStream" defined the type as "None") . Code line: entity_prefix = "ad"
python:mypy_no_any_return (MINOR) streams/streams.py:75 Reject returning value with "Any" type if return type is not "Any" Returning Any from function declared to return "Iterable[Any]" . Code line: return self._api.account.get_ads(params=params)
python:mypy_assignment (MINOR) streams/streams.py:81 Check that assigned value is compatible with target Incompatible types in assignment (expression has type "str", base class "FBMarketingStream" defined the type as "None") . Code line: entity_prefix = "adset"
python:mypy_no_any_return (MINOR) streams/streams.py:84 Reject returning value with "Any" type if return type is not "Any" Returning Any from function declared to return "Iterable[Any]" . Code line: return self._api.account.get_ad_sets(params=params)
python:mypy_assignment (MINOR) streams/streams.py:90 Check that assigned value is compatible with target Incompatible types in assignment (expression has type "str", base class "FBMarketingStream" defined the type as "None") . Code line: entity_prefix = "campaign"
python:mypy_no_any_return (MINOR) streams/streams.py:93 Reject returning value with "Any" type if return type is not "Any" Returning Any from function declared to return "Iterable[Any]" . Code line: return self._api.account.get_campaigns(params=params)
python:mypy_assignment (MINOR) streams/streams.py:99 Check that assigned value is compatible with target Incompatible types in assignment (expression has type "str", base class "FBMarketingStream" defined the type as "None") . Code line: entity_prefix = "video"
python:mypy_no_any_return (MINOR) streams/streams.py:102 Reject returning value with "Any" type if return type is not "Any" Returning Any from function declared to return "Iterable[Any]" . Code line: return self._api.account.get_ad_videos(params=params)
python:mypy_no_any_return (MINOR) streams/streams.py:120 Reject returning value with "Any" type if return type is not "Any" Returning Any from function declared to return "Iterable[Any]" . Code line: return self._api.account.get_ad_images(params=params, fields=s...
python:mypy_var_annotated (MINOR) streams/streams.py:147 Require variable annotation if type can't be inferred Need type annotation for "breakdowns" (hint: "breakdowns: List[] = ...") . Code line: breakdowns = []
python:mypy_attr_defined (MINOR) source_facebook_marketing/source.py:78 Check that attribute exists "Mapping[str, Any]" has no attribute "start_date" . Code line: Images(api=api, start_date=config.start_date, end_date=con...
python:mypy_attr_defined (MINOR) source_facebook_marketing/source.py:78 Check that attribute exists "Mapping[str, Any]" has no attribute "end_date" . Code line: ...(api=api, start_date=config.start_date, end_date=config.end_date, incl...
python:mypy_attr_defined (MINOR) source_facebook_marketing/source.py:78 Check that attribute exists "Mapping[str, Any]" has no attribute "include_deleted" . Code line: ..._date, end_date=config.end_date, include_deleted=config.include_delete...
python:mypy_attr_defined (MINOR) source_facebook_marketing/source.py:69 Check that attribute exists "Mapping[str, Any]" has no attribute "fetch_thumbnail_images" . Code line: ... AdCreatives(api=api, fetch_thumbnail_images=config.fetch_thumbnai...
python:mypy_attr_defined (MINOR) source_facebook_marketing/source.py:82 Check that attribute exists "Mapping[str, Any]" has no attribute "custom_insights" . Code line: ... return self._update_insights_streams(insights=config.custom_insight...
python:mypy_no_any_return (MINOR) source_facebook_marketing/source.py:108 Reject returning value with "Any" type if return type is not "Any" Returning Any from function declared to return "List[Type[Any]]" . Code line: return streams
python:mypy_no_any_return (MINOR) source_facebook_marketing/source.py:120 Reject returning value with "Any" type if return type is not "Any" Returning Any from function declared to return "List[Type[Any]]" . Code line: return streams + insights_custom_streams
python:mypy_attr_defined (MINOR) source_facebook_marketing/source.py:62 Check that attribute exists "Mapping[str, Any]" has no attribute "end_date" . Code line: end_date=config.end_date,
python:mypy_attr_defined (MINOR) source_facebook_marketing/source.py:67 Check that attribute exists "Mapping[str, Any]" has no attribute "start_date" . Code line: AdSets(api=api, start_date=config.start_date, end_date=con...
python:mypy_attr_defined (MINOR) source_facebook_marketing/source.py:67 Check that attribute exists "Mapping[str, Any]" has no attribute "end_date" . Code line: ...(api=api, start_date=config.start_date, end_date=config.end_date, incl...
python:mypy_attr_defined (MINOR) source_facebook_marketing/source.py:67 Check that attribute exists "Mapping[str, Any]" has no attribute "include_deleted" . Code line: ..._date, end_date=config.end_date, include_deleted=config.include_delete...
python:mypy_attr_defined (MINOR) source_facebook_marketing/source.py:68 Check that attribute exists "Mapping[str, Any]" has no attribute "start_date" . Code line: Ads(api=api, start_date=config.start_date, end_date=config...
python:mypy_attr_defined (MINOR) source_facebook_marketing/source.py:68 Check that attribute exists "Mapping[str, Any]" has no attribute "end_date" . Code line: ...(api=api, start_date=config.start_date, end_date=config.end_date, incl...
python:mypy_attr_defined (MINOR) source_facebook_marketing/source.py:68 Check that attribute exists "Mapping[str, Any]" has no attribute "include_deleted" . Code line: ..._date, end_date=config.end_date, include_deleted=config.include_delete...
python:S1700 (MAJOR) source_facebook_marketing/api.py:158 A field should not duplicate the name of its containing class Rename field "api"
python:mypy_attr_defined (MINOR) source_facebook_marketing/source.py:45 Check that attribute exists "Mapping[str, Any]" has no attribute "account_id" . Code line: api = API(account_id=config.account_id, access_token=config.ac...
python:black_need_format (MINOR) source_facebook_marketing/api.py Please run one of the commands: "black --config ./pyproject.toml <path_to_updated_folder>" or "./gradlew format" 1 code part(s) should be updated.
flake8:W291 (MAJOR) source_facebook_marketing/api.py:96 trailing whitespace trailing whitespace
python:mypy_no_redef (MINOR) streams/base_streams.py:76 Check that each name is defined once Name "api_batch" already defined on line 69 . Code line: api_batch: FacebookAdsApiBatch = self._api.api.new_bat...
python:mypy_attr_defined (MINOR) source_facebook_marketing/source.py:43 Check that attribute exists "Mapping[str, Any]" has no attribute "end_date" . Code line: if pendulum.instance(config.end_date) < pendulum.instance(conf...
python:mypy_attr_defined (MINOR) source_facebook_marketing/source.py:43 Check that attribute exists "Mapping[str, Any]" has no attribute "start_date" . Code line: ...ulum.instance(config.end_date) < pendulum.instance(config.start_date):
python:mypy_no_redef (MINOR) source_facebook_marketing/source.py:56 Check that each name is defined once Name "config" already defined on line 50 . Code line: config: ConnectorConfig = ConnectorConfig.parse_obj(config)
python:mypy_attr_defined (MINOR) source_facebook_marketing/source.py:77 Check that attribute exists "Mapping[str, Any]" has no attribute "start_date" . Code line: Campaigns(api=api, start_date=config.start_date, end_date=...
python:mypy_attr_defined (MINOR) source_facebook_marketing/source.py:77 Check that attribute exists "Mapping[str, Any]" has no attribute "end_date" . Code line: ...(api=api, start_date=config.start_date, end_date=config.end_date, incl...
python:mypy_attr_defined (MINOR) source_facebook_marketing/source.py:77 Check that attribute exists "Mapping[str, Any]" has no attribute "include_deleted" . Code line: ..._date, end_date=config.end_date, include_deleted=config.include_delete...
python:mypy_attr_defined (MINOR) source_facebook_marketing/source.py:79 Check that attribute exists "Mapping[str, Any]" has no attribute "start_date" . Code line: Videos(api=api, start_date=config.start_date, end_date=con...
python:mypy_attr_defined (MINOR) source_facebook_marketing/source.py:79 Check that attribute exists "Mapping[str, Any]" has no attribute "end_date" . Code line: ...(api=api, start_date=config.start_date, end_date=config.end_date, incl...
python:mypy_attr_defined (MINOR) source_facebook_marketing/source.py:79 Check that attribute exists "Mapping[str, Any]" has no attribute "include_deleted" . Code line: ..._date, end_date=config.end_date, include_deleted=config.include_delete...
python:mypy_misc (MINOR) source_facebook_marketing/spec.py:18 Miscellaneous other checks Enum() expects a string, tuple, list or dict literal as the second argument . Code line: ValidFields = Enum("ValidEnums", AdsInsights.Field.dict)
python:mypy_misc (MINOR) source_facebook_marketing/spec.py:19 Miscellaneous other checks Enum() expects a string, tuple, list or dict literal as the second argument . Code line: ValidBreakdowns = Enum("ValidBreakdowns", AdsInsights.Breakdowns.__dic...
python:mypy_name_defined (MINOR) source_facebook_marketing/spec.py:20 Check that name is defined Enum() expects a string, tuple, list or dict literal as the second argument [misc] ValidActionBreakdowns = Enum("ValidActionBreakdowns", AdsInsights.Acti...
python:mypy_attr_defined (MINOR) streams/init.py:5 Check that attribute exists Module "source_facebook_marketing.streams.streams" does not explicitly export attribute "AdsInsights"; implicit reexport disabled . Code line: from .streams import (
python:mypy_arg_type (MINOR) streams/async_job.py:149 Check argument types in calls Argument "jobs" to "update_in_batch" has incompatible type "List[InsightAsyncJob]"; expected "List[AsyncJob]" . Code line: update_in_batch(api=self._api, jobs=self._jobs)
python:mypy_return_value (MINOR) streams/async_job.py:236 Check that return value is compatible with signature Incompatible return value type (got "List[InsightAsyncJob]", expected "List[AsyncJob]") . Code line: return jobs
python:mypy_unreachable (MINOR) streams/async_job.py:266 Warn about unreachable statements or expressions Statement is unreachable . Code line: end_time = self._finish_time or pendulum.now()
python:mypy_index (MINOR) streams/async_job.py:315 Check indexing operations Value of type "Optional[Any]" is not indexable . Code line: job_status = self._job["async_status"]
python:mypy_index (MINOR) streams/async_job.py:316 Check indexing operations Value of type "Optional[Any]" is not indexable . Code line: percent = self._job["async_percent_completion"]
python:mypy_operator (MINOR) streams/async_job.py:319 Check that operator is valid for operands Unsupported operand types for < ("Duration" and "None") . Code line: if self.elapsed_time > self.job_timeout:
python:mypy_assignment (MINOR) streams/async_job.py:321 Check that assigned value is compatible with target Incompatible types in assignment (expression has type "DateTime", variable has type "None") . Code line: self._finish_time = pendulum.now()
python:mypy_assignment (MINOR) streams/async_job.py:325 Check that assigned value is compatible with target Incompatible types in assignment (expression has type "DateTime", variable has type "None") . Code line: self._finish_time = pendulum.now() # TODO: is not actual ...
python:mypy_assignment (MINOR) streams/async_job.py:328 Check that assigned value is compatible with target Incompatible types in assignment (expression has type "DateTime", variable has type "None") . Code line: self._finish_time = pendulum.now()
python:mypy_attr_defined (MINOR) streams/async_job.py:330 Check that attribute exists "None" has no attribute "in_seconds" . Code line: ...er.info(f"{self}: has status {job_status} after {self.elapsed_time.in_...
python:mypy_var_annotated (MINOR) streams/async_job_manager.py:43 Require variable annotation if type can't be inferred Need type annotation for "_running_jobs" (hint: "_running_jobs: List[] = ...") . Code line: self._running_jobs = []
python:mypy_no_any_return (MINOR) streams/async_job_manager.py:136 Reject returning value with "Any" type if return type is not "Any" Returning Any from function declared to return "float" . Code line: return min(throttle.per_account, throttle.per_application)
python:mypy_var_annotated (MINOR) streams/base_insight_streams.py:58 Require variable annotation if type can't be inferred Need type annotation for "breakdowns" (hint: "breakdowns: List[] = ...") . Code line: breakdowns = []
python:mypy_assignment (MINOR) streams/base_insight_streams.py:62 Check that assigned value is compatible with target Incompatible default for argument "name" (default has type "None", argument has type "str") . Code line: name: str = None,
python:mypy_assignment (MINOR) streams/base_insight_streams.py:63 Check that assigned value is compatible with target Incompatible default for argument "fields" (default has type "None", argument has type "List[str]") . Code line: fields: List[str] = None,
python:mypy_assignment (MINOR) streams/base_insight_streams.py:64 Check that assigned value is compatible with target Incompatible default for argument "breakdowns" (default has type "None", argument has type "List[str]") . Code line: breakdowns: List[str] = None,
python:mypy_name_defined (MINOR) streams/base_insight_streams.py:65 Check that name is defined Incompatible default for argument "action_breakdowns" (default has type "None", argument has type "List[str]") [assignment] action_breakdowns: List[str] = None,
python:mypy_var_annotated (MINOR) streams/base_insight_streams.py:79 Require variable annotation if type can't be inferred Need type annotation for "_completed_slices" (hint: "_completed_slices: Set[] = ...") . Code line: self._completed_slices = set()
python:mypy_no_any_return (MINOR) streams/base_insight_streams.py:85 Reject returning value with "Any" type if return type is not "Any" Returning Any from function declared to return "str" . Code line: return casing.camel_to_snake(name)
python:mypy_override (MINOR) streams/base_insight_streams.py:88 Check that method override is compatible with base class Signature of "primary_key" incompatible with supertype "FBMarketingStream" . Code line: def primary_key(self) -> Optional[Union[str, List[str], List[List[...
python:mypy_assignment (MINOR) streams/base_insight_streams.py:98 Check that assigned value is compatible with target Incompatible default for argument "cursor_field" (default has type "None", argument has type "List[str]") . Code line: cursor_field: List[str] = None,
python:mypy_assignment (MINOR) streams/base_insight_streams.py:99 Check that assigned value is compatible with target Incompatible default for argument "stream_slice" (default has type "None", argument has type "Mapping[str, Any]") . Code line: stream_slice: Mapping[str, Any] = None,
python:mypy_assignment (MINOR) streams/base_insight_streams.py:100 Check that assigned value is compatible with target Incompatible default for argument "stream_state" (default has type "None", argument has type "Mapping[str, Any]") . Code line: stream_state: Mapping[str, Any] = None,
python:mypy_attr_defined (MINOR) streams/base_insight_streams.py:130 Check that attribute exists Module has no attribute "parse" . Code line: self._cursor_value = pendulum.parse(value[self.cursor_field])....
python:mypy_attr_defined (MINOR) streams/base_insight_streams.py:131 Check that attribute exists Module has no attribute "parse" . Code line: self._completed_slices = set(pendulum.parse(v).date() for v in...
python:mypy_return_value (MINOR) streams/base_insight_streams.py:144 Check that return value is compatible with signature Incompatible return value type (got "List[]", expected "Iterator[Any]") . Code line: return []
python:S5886 (MAJOR) streams/base_insight_streams.py:144 Function return types should be consistent with their type hint Return a value of type "Iterator" instead of "list" or update function "_date_intervals" type hint.
python:mypy_no_any_return (MINOR) streams/base_insight_streams.py:146 Reject returning value with "Any" type if return type is not "Any" Returning Any from function declared to return "Iterator[Any]" . Code line: return date_range.range("days", self.time_increment)
python:mypy_attr_defined (MINOR) streams/base_insight_streams.py:168 Check that attribute exists Module has no attribute "Period"; maybe "period"? . Code line: interval = pendulum.Period(ts_start, ts_end)
python:mypy_assignment (MINOR) streams/base_insight_streams.py:172 Check that assigned value is compatible with target Incompatible default for argument "cursor_field" (default has type "None", argument has type "List[str]") . Code line: ..., sync_mode: SyncMode, cursor_field: List[str] = None, stream_state: M...
python:mypy_assignment (MINOR) streams/base_insight_streams.py:172 Check that assigned value is compatible with target Incompatible default for argument "stream_state" (default has type "None", argument has type "Mapping[str, Any]") . Code line: ...cursor_field: List[str] = None, stream_state: Mapping[str, Any] = None
python:mypy_name_defined (MINOR) streams/base_insight_streams.py:188 Check that name is defined Incompatible types in assignment (expression has type "Mapping[str, Any]", variable has type "MutableMapping[str, Any]") [assignment] self.state = stream_state
python:S1134 (MAJOR) streams/base_insight_streams.py:216 Track uses of "FIXME" tags Take the required action to fix the issue indicated by this "FIXME" comment.
python:mypy_override (MINOR) streams/base_insight_streams.py:229 Check that method override is compatible with base class Signature of "request_params" incompatible with supertype "FBMarketingIncrementalStream" . Code line: def request_params(self, **kwargs) -> MutableMapping[str, Any]:
python:mypy_no_any_return (MINOR) streams/base_insight_streams.py:254 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_assignment (MINOR) streams/base_streams.py:84 Check that assigned value is compatible with target Incompatible default for argument "cursor_field" (default has type "None", argument has type "List[str]") . Code line: cursor_field: List[str] = None,
python:mypy_assignment (MINOR) streams/base_streams.py:85 Check that assigned value is compatible with target Incompatible default for argument "stream_slice" (default has type "None", argument has type "Mapping[str, Any]") . Code line: stream_slice: Mapping[str, Any] = None,
python:mypy_assignment (MINOR) streams/base_streams.py:86 Check that assigned value is compatible with target Incompatible default for argument "stream_state" (default has type "None", argument has type "Mapping[str, Any]") . Code line: stream_state: Mapping[str, Any] = None,
python:mypy_assignment (MINOR) streams/base_streams.py:92 Check that assigned value is compatible with target Incompatible types in assignment (expression has type "Iterable[MutableMapping[str, Any]]", variable has type "Generator[Any, None, None]") . Code line: loaded_records_iter = self.execute_in_batch(loaded_records...
python:mypy_attr_defined (MINOR) streams/base_streams.py:161 Check that attribute exists Module has no attribute "parse" . Code line: max_cursor = max(pendulum.parse(state_value), pendulum.parse(r...
python:mypy_override (MINOR) streams/base_streams.py:170 Check that method override is compatible with base class Signature of "request_params" incompatible with supertype "FBMarketingStream" . Code line: def request_params(self, stream_state: Mapping[str, Any], **kwargs...
python:mypy_attr_defined (MINOR) streams/base_streams.py:179 Check that attribute exists Module has no attribute "parse" . Code line: ...value = self.start_date if not state_value else pendulum.parse(state...
python:mypy_attr_defined (MINOR) streams/base_streams.py:225 Check that attribute exists Module has no attribute "parse" . Code line: self._cursor_value = pendulum.parse(value[self.cursor_field])
python:mypy_assignment (MINOR) streams/base_streams.py:228 Check that assigned value is compatible with target Incompatible default for argument "cursor_field" (default has type "None", argument has type "List[str]") . Code line: ..., sync_mode: SyncMode, cursor_field: List[str] = None, stream_state: M...
python:mypy_assignment (MINOR) streams/base_streams.py:228 Check that assigned value is compatible with target Incompatible default for argument "stream_state" (default has type "None", argument has type "Mapping[str, Any]") . Code line: ...cursor_field: List[str] = None, stream_state: Mapping[str, Any] = None
python:mypy_attr_defined (MINOR) streams/base_streams.py:238 Check that attribute exists Module has no attribute "parse" . Code line: record_cursor_value = pendulum.parse(latest_record[self.cursor...
python:mypy_assignment (MINOR) streams/base_streams.py:251 Check that assigned value is compatible with target Incompatible default for argument "cursor_field" (default has type "None", argument has type "List[str]") . Code line: cursor_field: List[str] = None,
python:mypy_assignment (MINOR) streams/base_streams.py:252 Check that assigned value is compatible with target Incompatible default for argument "stream_slice" (default has type "None", argument has type "Mapping[str, Any]") . Code line: stream_slice: Mapping[str, Any] = None,
python:mypy_assignment (MINOR) streams/base_streams.py:253 Check that assigned value is compatible with target Incompatible default for argument "stream_state" (default has type "None", argument has type "Mapping[str, Any]") . Code line: stream_state: Mapping[str, Any] = None,
python:mypy_attr_defined (MINOR) streams/base_streams.py:263 Check that attribute exists Module has no attribute "parse" . Code line: if self._cursor_value and pendulum.parse(record[self.curso...
python:mypy_import (MINOR) streams/streams.py:9 Require that imported module can be found or has stubs Library stubs not installed for "requests" (or incompatible with Python 3.7) . Code line: import requests
python:mypy_assignment (MINOR) streams/streams.py:40 Check that assigned value is compatible with target Incompatible types in assignment (expression has type "str", base class "FBMarketingStream" defined the type as "None") . Code line: entity_prefix = "adcreative"
python:mypy_assignment (MINOR) streams/streams.py:55 Check that assigned value is compatible with target Incompatible default for argument "cursor_field" (default has type "None", argument has type "List[str]") . Code line: cursor_field: List[str] = None,
python:mypy_assignment (MINOR) streams/streams.py:56 Check that assigned value is compatible with target Incompatible default for argument "stream_slice" (default has type "None", argument has type "Mapping[str, Any]") . Code line: stream_slice: Mapping[str, Any] = None,
python:mypy_assignment (MINOR) streams/streams.py:57 Check that assigned value is compatible with target Incompatible default for argument "stream_state" (default has type "None", argument has type "Mapping[str, Any]") . Code line: stream_state: Mapping[str, Any] = None,
python:mypy_index (MINOR) streams/streams.py:62 Check indexing operations Unsupported target for indexed assignment ("Mapping[str, Any]") . Code line: record["thumbnail_data_url"] = fetch_thumbnail_data_ur...
python:mypy_arg_type (MINOR) streams/streams.py:62 Check argument types in calls Argument 1 to "fetch_thumbnail_data_url" has incompatible type "Optional[Any]"; expected "str" . Code line: ..."thumbnail_data_url"] = fetch_thumbnail_data_url(record.get("thumbnail...
python:mypy_no_any_return (MINOR) streams/streams.py:66 Reject returning value with "Any" type if return type is not "Any" Returning Any from function declared to return "Iterable[Any]" . Code line: return self._api.account.get_ad_creatives(params=params)
python:mypy_assignment (MINOR) streams/streams.py:72 Check that assigned value is compatible with target Incompatible types in assignment (expression has type "str", base class "FBMarketingStream" defined the type as "None") . Code line: entity_prefix = "ad"
python:mypy_no_any_return (MINOR) streams/streams.py:75 Reject returning value with "Any" type if return type is not "Any" Returning Any from function declared to return "Iterable[Any]" . Code line: return self._api.account.get_ads(params=params)
python:mypy_assignment (MINOR) streams/streams.py:81 Check that assigned value is compatible with target Incompatible types in assignment (expression has type "str", base class "FBMarketingStream" defined the type as "None") . Code line: entity_prefix = "adset"
python:mypy_no_any_return (MINOR) streams/streams.py:84 Reject returning value with "Any" type if return type is not "Any" Returning Any from function declared to return "Iterable[Any]" . Code line: return self._api.account.get_ad_sets(params=params)
python:mypy_assignment (MINOR) streams/streams.py:90 Check that assigned value is compatible with target Incompatible types in assignment (expression has type "str", base class "FBMarketingStream" defined the type as "None") . Code line: entity_prefix = "campaign"
python:mypy_no_any_return (MINOR) streams/streams.py:93 Reject returning value with "Any" type if return type is not "Any" Returning Any from function declared to return "Iterable[Any]" . Code line: return self._api.account.get_campaigns(params=params)
python:mypy_assignment (MINOR) streams/streams.py:99 Check that assigned value is compatible with target Incompatible types in assignment (expression has type "str", base class "FBMarketingStream" defined the type as "None") . Code line: entity_prefix = "video"
python:mypy_no_any_return (MINOR) streams/streams.py:102 Reject returning value with "Any" type if return type is not "Any" Returning Any from function declared to return "Iterable[Any]" . Code line: return self._api.account.get_ad_videos(params=params)
python:mypy_no_any_return (MINOR) streams/streams.py:120 Reject returning value with "Any" type if return type is not "Any" Returning Any from function declared to return "Iterable[Any]" . Code line: return self._api.account.get_ad_images(params=params, fields=s...
python:mypy_var_annotated (MINOR) streams/streams.py:147 Require variable annotation if type can't be inferred Need type annotation for "breakdowns" (hint: "breakdowns: List[] = ...") . Code line: breakdowns = []
python:mypy_attr_defined (MINOR) source_facebook_marketing/source.py:78 Check that attribute exists "Mapping[str, Any]" has no attribute "start_date" . Code line: Images(api=api, start_date=config.start_date, end_date=con...
python:mypy_attr_defined (MINOR) source_facebook_marketing/source.py:78 Check that attribute exists "Mapping[str, Any]" has no attribute "end_date" . Code line: ...(api=api, start_date=config.start_date, end_date=config.end_date, incl...
python:mypy_attr_defined (MINOR) source_facebook_marketing/source.py:78 Check that attribute exists "Mapping[str, Any]" has no attribute "include_deleted" . Code line: ..._date, end_date=config.end_date, include_deleted=config.include_delete...
python:mypy_attr_defined (MINOR) source_facebook_marketing/source.py:69 Check that attribute exists "Mapping[str, Any]" has no attribute "fetch_thumbnail_images" . Code line: ... AdCreatives(api=api, fetch_thumbnail_images=config.fetch_thumbnai...
python:mypy_attr_defined (MINOR) source_facebook_marketing/source.py:82 Check that attribute exists "Mapping[str, Any]" has no attribute "custom_insights" . Code line: ... return self._update_insights_streams(insights=config.custom_insight...
python:mypy_no_any_return (MINOR) source_facebook_marketing/source.py:108 Reject returning value with "Any" type if return type is not "Any" Returning Any from function declared to return "List[Type[Any]]" . Code line: return streams
python:mypy_no_any_return (MINOR) source_facebook_marketing/source.py:120 Reject returning value with "Any" type if return type is not "Any" Returning Any from function declared to return "List[Type[Any]]" . Code line: return streams + insights_custom_streams
python:mypy_attr_defined (MINOR) source_facebook_marketing/source.py:62 Check that attribute exists "Mapping[str, Any]" has no attribute "end_date" . Code line: end_date=config.end_date,
python:mypy_attr_defined (MINOR) source_facebook_marketing/source.py:67 Check that attribute exists "Mapping[str, Any]" has no attribute "start_date" . Code line: AdSets(api=api, start_date=config.start_date, end_date=con...
python:mypy_attr_defined (MINOR) source_facebook_marketing/source.py:67 Check that attribute exists "Mapping[str, Any]" has no attribute "end_date" . Code line: ...(api=api, start_date=config.start_date, end_date=config.end_date, incl...
python:mypy_attr_defined (MINOR) source_facebook_marketing/source.py:67 Check that attribute exists "Mapping[str, Any]" has no attribute "include_deleted" . Code line: ..._date, end_date=config.end_date, include_deleted=config.include_delete...
python:mypy_attr_defined (MINOR) source_facebook_marketing/source.py:68 Check that attribute exists "Mapping[str, Any]" has no attribute "start_date" . Code line: Ads(api=api, start_date=config.start_date, end_date=config...
python:mypy_attr_defined (MINOR) source_facebook_marketing/source.py:68 Check that attribute exists "Mapping[str, Any]" has no attribute "end_date" . Code line: ...(api=api, start_date=config.start_date, end_date=config.end_date, incl...
python:mypy_attr_defined (MINOR) source_facebook_marketing/source.py:68 Check that attribute exists "Mapping[str, Any]" has no attribute "include_deleted" . Code line: ..._date, end_date=config.end_date, include_deleted=config.include_delete...
python:S1700 (MAJOR) source_facebook_marketing/api.py:158 A field should not duplicate the name of its containing class Rename field "api"
python:mypy_attr_defined (MINOR) source_facebook_marketing/source.py:45 Check that attribute exists "Mapping[str, Any]" has no attribute "account_id" . Code line: api = API(account_id=config.account_id, access_token=config.ac...

Coverage (100.0%)

File Coverage File Coverage
source_facebook_marketing/init.py 100.0 source_facebook_marketing/api.py 83.2
source_facebook_marketing/source.py 100.0 source_facebook_marketing/spec.py 100.0
source_facebook_marketing/streams/init.py 100.0 source_facebook_marketing/streams/async_job.py 100.0
source_facebook_marketing/streams/async_job_manager.py 95.9 source_facebook_marketing/streams/base_insight_streams.py 91.2
source_facebook_marketing/streams/base_streams.py 74.4 source_facebook_marketing/streams/common.py 97.4
source_facebook_marketing/streams/streams.py 86.7

Please sign in to comment.