Skip to content

Commit

Permalink
solve conflict
Browse files Browse the repository at this point in the history
  • Loading branch information
marcosmarxm committed Feb 22, 2022
2 parents ae92f2d + ab1bf07 commit bc02e11
Showing 0 changed files with 0 additions and 0 deletions.

1 comment on commit bc02e11

@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 Shopify(#10501)

Measures

Name Value Name Value Name Value
Duplicated Blocks 0 Vulnerabilities 0 Security Rating A
Reliability Rating A Code Smells 1 Bugs 0
Duplicated Lines (%) 0.0 Lines to Cover 6 Quality Gate Status OK
Coverage 83.3 Lines of Code 482 Blocker Issues 0
Critical Issues 2 Major Issues 10 Minor Issues 86

Detected Issues

Rule File Description Message
python:mypy_arg_type (MINOR) source_shopify/source.py:485 Check argument types in calls Argument 1 to "TenderTransactions" has incompatible type "Mapping[str, Any]"; expected "Dict[Any, Any]" . Code line: TenderTransactions(config),
python:mypy_arg_type (MINOR) source_shopify/source.py:447 Check argument types in calls Argument 1 to "Shop" has incompatible type "Mapping[str, Any]"; expected "Dict[Any, Any]" . Code line: response = list(Shop(config).read_records(sync_mode=None))
python:mypy_union_attr (MINOR) source_shopify/source.py:470 Check that attribute exists in each item of a union Item "None" of "Optional[List[str]]" has no attribute "iter" (not iterable) . Code line: for stream in SCOPES_MAPPING.get(user_scope["handle"])
python:mypy_assignment (MINOR) source_shopify/auth.py:34 Check that assigned value is compatible with target Incompatible types in assignment (expression has type "Optional[Any]", variable has type "str") . Code line: auth_method: str = credentials.get("auth_method")
python:mypy_misc (MINOR) source_shopify/source.py:70 Miscellaneous other checks Incompatible types in "yield" (actual type "Iterable[MutableMapping[Any, Any]]", expected type "Mapping[Any, Any]") . Code line: yield self._transformer.transform(records)
python:S5890 (MAJOR) source_shopify/source.py:161 Values assigned to variables should match their type annotations Assign to "nested_record_field_name" a value of type "str" instead of "NoneType" or update its type hint.
python:mypy_assignment (MINOR) source_shopify/source.py:161 Check that assigned value is compatible with target Incompatible types in assignment (expression has type "None", variable has type "str") . Code line: nested_record_field_name: str = None
python:mypy_unreachable (MINOR) source_shopify/source.py:184 Warn about unreachable statements or expressions Statement is unreachable . Code line: if record.get(self.nested_substream):
python:mypy_union_attr (MINOR) source_shopify/source.py:197 Check that attribute exists in each item of a union Item "None" of "Optional[Mapping[str, Any]]" has no attribute "get" . Code line: slice_data = stream_slice.get(self.slice_key)
python:mypy_assignment (MINOR) source_shopify/source.py:291 Check that assigned value is compatible with target Incompatible types in assignment (expression has type "str", base class "ChildSubstream" defined the type as "None") . Code line: nested_substream = "refunds"
python:mypy_index (MINOR) source_shopify/source.py:445 Check indexing operations Unsupported target for indexed assignment ("Mapping[str, Any]") . Code line: config["authenticator"] = ShopifyAuthenticator(config)
python:mypy_arg_type (MINOR) source_shopify/source.py:483 Check argument types in calls Argument 1 to "OrderRefunds" has incompatible type "Mapping[str, Any]"; expected "Dict[Any, Any]" . Code line: OrderRefunds(config),
python:mypy_arg_type (MINOR) source_shopify/source.py:484 Check argument types in calls Argument 1 to "OrderRisks" has incompatible type "Mapping[str, Any]"; expected "Dict[Any, Any]" . Code line: OrderRisks(config),
python:mypy_no_any_return (MINOR) source_shopify/transform.py:100 Reject returning value with "Any" type if return type is not "Any" Returning Any from function declared to return "Iterable[MutableMapping[Any, Any]]" . Code line: return self._transform_string(field)
python:mypy_arg_type (MINOR) source_shopify/source.py:495 Check argument types in calls Argument 1 to "Shop" has incompatible type "Mapping[str, Any]"; expected "Dict[Any, Any]" . Code line: Shop(config),
python:mypy_attr_defined (MINOR) source_shopify/source.py:114 Check that attribute exists "str" has no attribute "get" . Code line: if record.get(self.cursor_field, "") >= stream_state.g...
python:S5890 (MAJOR) source_shopify/source.py:395 Values assigned to variables should match their type annotations Assign to "parent_stream_class" a value of type "object" or update its type hint.
python:mypy_assignment (MINOR) source_shopify/source.py:401 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: ...def path(self, stream_slice: Mapping[str, Any] = None, **kwargs) -> st...
python:mypy_arg_type (MINOR) source_shopify/source.py:491 Check argument types in calls Argument 1 to "InventoryItems" has incompatible type "Mapping[str, Any]"; expected "Dict[Any, Any]" . Code line: InventoryItems(config),
python:S5890 (MAJOR) source_shopify/source.py:407 Values assigned to variables should match their type annotations Assign to "parent_stream_class" a value of type "object" or update its type hint.
python:mypy_assignment (MINOR) source_shopify/source.py:414 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: ...def path(self, stream_slice: Mapping[str, Any] = None, **kwargs) -> st...
python:S5890 (MAJOR) source_shopify/source.py:423 Values assigned to variables should match their type annotations Assign to "parent_stream_class" a value of type "object" or update its type hint.
python:mypy_assignment (MINOR) source_shopify/source.py:428 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: ...def path(self, stream_slice: Mapping[str, Any] = None, **kwargs) -> st...
python:mypy_arg_type (MINOR) source_shopify/source.py:493 Check argument types in calls Argument 1 to "FulfillmentOrders" has incompatible type "Mapping[str, Any]"; expected "Dict[Any, Any]" . Code line: FulfillmentOrders(config),
python:mypy_arg_type (MINOR) source_shopify/source.py:494 Check argument types in calls Argument 1 to "Fulfillments" has incompatible type "Mapping[str, Any]"; expected "Dict[Any, Any]" . Code line: Fulfillments(config),
python:S5890 (MAJOR) source_shopify/source.py:374 Values assigned to variables should match their type annotations Assign to "parent_stream_class" a value of type "object" or update its type hint.
python:mypy_assignment (MINOR) source_shopify/source.py:379 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: ...def path(self, stream_slice: Mapping[str, Any] = None, **kwargs) -> st...
python:mypy_arg_type (MINOR) source_shopify/source.py:490 Check argument types in calls Argument 1 to "Locations" has incompatible type "Mapping[str, Any]"; expected "Dict[Any, Any]" . Code line: Locations(config),
python:mypy_arg_type (MINOR) source_shopify/source.py:492 Check argument types in calls Argument 1 to "InventoryLevels" has incompatible type "Mapping[str, Any]"; expected "Dict[Any, Any]" . Code line: InventoryLevels(config),
python:mypy_assignment (MINOR) source_shopify/auth.py:16 Check that assigned value is compatible with target Incompatible default for argument "auth_method" (default has type "None", argument has type "str") . Code line: def init(self, auth_method: str = None):
python:mypy_index (MINOR) source_shopify/source.py:460 Check indexing operations Unsupported target for indexed assignment ("Mapping[str, Any]") . Code line: config["authenticator"] = ShopifyAuthenticator(config)
python:mypy_arg_type (MINOR) source_shopify/source.py:97 Check argument types in calls Argument 1 to "cache_stream_state" has incompatible type "Callable[[IncrementalShopifyStream, Mapping[str, Any], Mapping[str, Any], KwArg(Any)], Any]"; expected "EagerlyCachedStreamState" . Code line: @stream_state_cache.cache_stream_state
python:S5890 (MAJOR) source_shopify/source.py:159 Values assigned to variables should match their type annotations Assign to "slice_key" a value of type "str" instead of "NoneType" or update its type hint.
python:mypy_assignment (MINOR) source_shopify/source.py:159 Check that assigned value is compatible with target Incompatible types in assignment (expression has type "None", variable has type "str") . Code line: slice_key: str = None
python:mypy_assignment (MINOR) source_shopify/source.py:164 Check that assigned value is compatible with target Incompatible default for argument "next_page_token" (default has type "None", argument has type "Mapping[str, Any]") . Code line: ...arams(self, next_page_token: Mapping[str, Any] = None, **kwargs) -> Mu...
python:mypy_assignment (MINOR) source_shopify/source.py:170 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: ...m_slices(self, stream_state: Mapping[str, Any] = None, **kwargs) -> It...
python:mypy_operator (MINOR) source_shopify/source.py:177 Check that operator is valid for operands "object" not callable . Code line: parent_stream = self.parent_stream_class(self.config)
python:mypy_assignment (MINOR) source_shopify/source.py:191 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:S5890 (MAJOR) source_shopify/source.py:285 Values assigned to variables should match their type annotations Assign to "parent_stream_class" a value of type "object" or update its type hint.
python:S5890 (MAJOR) source_shopify/source.py:299 Values assigned to variables should match their type annotations Assign to "parent_stream_class" a value of type "object" or update its type hint.
python:S5890 (MAJOR) source_shopify/source.py:314 Values assigned to variables should match their type annotations Assign to "parent_stream_class" a value of type "object" or update its type hint.
python:S5890 (MAJOR) source_shopify/source.py:349 Values assigned to variables should match their type annotations Assign to "parent_stream_class" a value of type "object" or update its type hint.
python:mypy_attr_defined (MINOR) source_shopify/utils.py:135 Check that attribute exists "object" has no attribute "name" . Code line: state_object[stream.name] = {stream.cursor_field: current_...
python:mypy_attr_defined (MINOR) source_shopify/utils.py:135 Check that attribute exists "object" has no attribute "cursor_field" . Code line: state_object[stream.name] = {stream.cursor_field: current_...
python:mypy_misc (MINOR) source_shopify/source.py:76 Miscellaneous other checks Incompatible types in "yield" (actual type "Iterable[MutableMapping[Any, Any]]", expected type "Mapping[Any, Any]") . Code line: yield self._transformer.transform(record)
python:mypy_return_value (MINOR) source_shopify/transform.py:45 Check that return value is compatible with signature Incompatible return value type (got "Optional[List[str]]", expected "List[str]") . Code line: return json_types.get(value_type)
python:mypy_no_any_return (MINOR) source_shopify/transform.py:54 Reject returning value with "Any" type if return type is not "Any" Returning Any from function declared to return "str" . Code line: return schema_types
python:mypy_assignment (MINOR) source_shopify/transform.py:87 Check that assigned value is compatible with target Incompatible default for argument "schema" (default has type "None", argument has type "Mapping[str, Any]") . Code line: ...rm(self, field: Any, schema: Mapping[str, Any] = None) -> Iterable[Mut...
python:mypy_arg_type (MINOR) source_shopify/transform.py:95 Check argument types in calls Argument 1 to "_first_non_null_type" of "DataTypeEnforcer" has incompatible type "str"; expected "List[str]" . Code line: schema_type = self._first_non_null_type(schema_types)
python:mypy_no_any_return (MINOR) source_shopify/transform.py:98 Reject returning value with "Any" type if return type is not "Any" Returning Any from function declared to return "Iterable[MutableMapping[Any, Any]]" . Code line: return self._transform_number(field)
python:mypy_no_any_return (MINOR) source_shopify/transform.py:103 Reject returning value with "Any" type if return type is not "Any" Returning Any from function declared to return "Iterable[MutableMapping[Any, Any]]" . Code line: return self._transform_object(field, properties)
python:mypy_no_any_return (MINOR) source_shopify/transform.py:106 Reject returning value with "Any" type if return type is not "Any" Returning Any from function declared to return "Iterable[MutableMapping[Any, Any]]" . Code line: return self._transform_array(field, properties)
python:mypy_no_any_return (MINOR) source_shopify/transform.py:107 Reject returning value with "Any" type if return type is not "Any" Returning Any from function declared to return "Iterable[MutableMapping[Any, Any]]" . Code line: return field
python:mypy_arg_type (MINOR) source_shopify/source.py:475 Check argument types in calls Argument 1 to "Customers" has incompatible type "Mapping[str, Any]"; expected "Dict[Any, Any]" . Code line: Customers(config),
python:mypy_arg_type (MINOR) source_shopify/source.py:476 Check argument types in calls Argument 1 to "Orders" has incompatible type "Mapping[str, Any]"; expected "Dict[Any, Any]" . Code line: Orders(config),
python:mypy_arg_type (MINOR) source_shopify/source.py:477 Check argument types in calls Argument 1 to "DraftOrders" has incompatible type "Mapping[str, Any]"; expected "Dict[Any, Any]" . Code line: DraftOrders(config),
python:mypy_arg_type (MINOR) source_shopify/source.py:478 Check argument types in calls Argument 1 to "Products" has incompatible type "Mapping[str, Any]"; expected "Dict[Any, Any]" . Code line: Products(config),
python:mypy_arg_type (MINOR) source_shopify/source.py:479 Check argument types in calls Argument 1 to "AbandonedCheckouts" has incompatible type "Mapping[str, Any]"; expected "Dict[Any, Any]" . Code line: AbandonedCheckouts(config),
python:mypy_arg_type (MINOR) source_shopify/source.py:480 Check argument types in calls Argument 1 to "Metafields" has incompatible type "Mapping[str, Any]"; expected "Dict[Any, Any]" . Code line: Metafields(config),
python:mypy_arg_type (MINOR) source_shopify/source.py:481 Check argument types in calls Argument 1 to "CustomCollections" has incompatible type "Mapping[str, Any]"; expected "Dict[Any, Any]" . Code line: CustomCollections(config),
python:mypy_arg_type (MINOR) source_shopify/source.py:482 Check argument types in calls Argument 1 to "Collects" has incompatible type "Mapping[str, Any]"; expected "Dict[Any, Any]" . Code line: Collects(config),
python:mypy_arg_type (MINOR) source_shopify/source.py:486 Check argument types in calls Argument 1 to "Transactions" has incompatible type "Mapping[str, Any]"; expected "Dict[Any, Any]" . Code line: Transactions(config),
python:mypy_arg_type (MINOR) source_shopify/source.py:487 Check argument types in calls Argument 1 to "Pages" has incompatible type "Mapping[str, Any]"; expected "Dict[Any, Any]" . Code line: Pages(config),
python:mypy_arg_type (MINOR) source_shopify/source.py:488 Check argument types in calls Argument 1 to "PriceRules" has incompatible type "Mapping[str, Any]"; expected "Dict[Any, Any]" . Code line: PriceRules(config),
python:mypy_arg_type (MINOR) source_shopify/source.py:489 Check argument types in calls Argument 1 to "DiscountCodes" has incompatible type "Mapping[str, Any]"; expected "Dict[Any, Any]" . Code line: DiscountCodes(config),
python:mypy_attr_defined (MINOR) source_shopify/utils.py:132 Check that attribute exists "object" has no attribute "name" . Code line: ... tmp_stream_state_value = state_object.get(stream.name, {}).get(...
python:mypy_attr_defined (MINOR) source_shopify/utils.py:132 Check that attribute exists "object" has no attribute "cursor_field" . Code line: ...te_value = state_object.get(stream.name, {}).get(stream.cursor_field, ...
python:mypy_attr_defined (MINOR) source_shopify/utils.py:138 Check that attribute exists "object" has no attribute "name" . Code line: state_object[stream.name] = {
python:mypy_attr_defined (MINOR) source_shopify/utils.py:139 Check that attribute exists "object" has no attribute "cursor_field" . Code line: stream.cursor_field: min(current_stream_state.get(...
python:S5720 (CRITICAL) source_shopify/utils.py:143 "self" should be the first argument to instance methods Rename "func" to "self" or add the missing "self" parameter.
python:mypy_import (MINOR) source_shopify/utils.py:10 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:S5720 (CRITICAL) source_shopify/utils.py:87 "self" should be the first argument to instance methods Rename "threshold" to "self" or add the missing "self" parameter.
python:mypy_misc (MINOR) source_shopify/utils.py:87 Miscellaneous other checks Self argument missing for a non-static method (or an invalid type for self) . Code line: def balance_rate_limit(threshold: float = 0.9, rate_limit_header: ...
python:mypy_assignment (MINOR) source_shopify/source.py:50 Check that assigned value is compatible with target Incompatible default for argument "next_page_token" (default has type "None", argument has type "Mapping[str, Any]") . Code line: ...arams(self, next_page_token: Mapping[str, Any] = None, **kwargs) -> Mu...
python:mypy_assignment (MINOR) source_shopify/source.py:55 Check that assigned value is compatible with target Incompatible types in assignment (expression has type "str", target has type "int") . Code line: params["order"] = f"{self.order_field} asc"
python:mypy_assignment (MINOR) source_shopify/source.py:98 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: ...t_params(self, stream_state: Mapping[str, Any] = None, next_page_token...
python:mypy_assignment (MINOR) source_shopify/source.py:98 Check that assigned value is compatible with target Incompatible default for argument "next_page_token" (default has type "None", argument has type "Mapping[str, Any]") . Code line: ...tr, Any] = None, next_page_token: Mapping[str, Any] = None, **kwargs):
python:mypy_assignment (MINOR) source_shopify/source.py:110 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: ...an_state(self, stream_state: Mapping[str, Any] = None, records_slice: ...
python:mypy_assignment (MINOR) source_shopify/source.py:110 Check that assigned value is compatible with target Incompatible default for argument "records_slice" (default has type "None", argument has type "Mapping[str, Any]") . Code line: ...tr, Any] = None, records_slice: Mapping[str, Any] = None) -> Iterable:
python:mypy_override (MINOR) source_shopify/source.py:133 Check that method override is compatible with base class Signature of "request_params" incompatible with supertype "ShopifyStream" . Code line: def request_params(
python:mypy_assignment (MINOR) source_shopify/source.py:134 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: self, stream_state: Mapping[str, Any] = None, next_page_token:...
python:mypy_assignment (MINOR) source_shopify/source.py:134 Check that assigned value is compatible with target Incompatible default for argument "next_page_token" (default has type "None", argument has type "Mapping[str, Any]") . Code line: ...[str, Any] = None, next_page_token: Mapping[str, Any] = None, **kwargs
python:mypy_override (MINOR) source_shopify/source.py:228 Check that method override is compatible with base class Signature of "request_params" incompatible with supertype "ShopifyStream" . Code line: def request_params(
python:mypy_assignment (MINOR) source_shopify/source.py:229 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: self, stream_state: Mapping[str, Any] = None, next_page_token:...
python:mypy_assignment (MINOR) source_shopify/source.py:229 Check that assigned value is compatible with target Incompatible default for argument "next_page_token" (default has type "None", argument has type "Mapping[str, Any]") . Code line: ...[str, Any] = None, next_page_token: Mapping[str, Any] = None, **kwargs
python:mypy_override (MINOR) source_shopify/source.py:274 Check that method override is compatible with base class Signature of "request_params" incompatible with supertype "ShopifyStream" . Code line: def request_params(
python:mypy_assignment (MINOR) source_shopify/source.py:275 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: self, stream_state: Mapping[str, Any] = None, next_page_token:...
python:mypy_assignment (MINOR) source_shopify/source.py:275 Check that assigned value is compatible with target Incompatible default for argument "next_page_token" (default has type "None", argument has type "Mapping[str, Any]") . Code line: ...[str, Any] = None, next_page_token: Mapping[str, Any] = None, **kwargs
python:mypy_no_any_return (MINOR) source_shopify/source.py:139 Reject returning value with "Any" type if return type is not "Any" Returning Any from function declared to return "MutableMapping[str, Any]" . Code line: return params
python:mypy_no_any_return (MINOR) source_shopify/source.py:235 Reject returning value with "Any" type if return type is not "Any" Returning Any from function declared to return "MutableMapping[str, Any]" . Code line: return params
python:mypy_assignment (MINOR) source_shopify/source.py:354 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: ...def path(self, stream_slice: Mapping[str, Any] = None, **kwargs) -> st...
python:mypy_assignment (MINOR) source_shopify/source.py:305 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: ...def path(self, stream_slice: Mapping[str, Any] = None, **kwargs) -> st...
python:mypy_import (MINOR) source_shopify/source.py:10 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_no_any_return (MINOR) source_shopify/source.py:281 Reject returning value with "Any" type if return type is not "Any" Returning Any from function declared to return "MutableMapping[str, Any]" . Code line: return params
python:mypy_assignment (MINOR) source_shopify/source.py:293 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: ...def path(self, stream_slice: Mapping[str, Any] = None, **kwargs) -> st...
python:mypy_assignment (MINOR) source_shopify/source.py:320 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: ...def path(self, stream_slice: Mapping[str, Any] = None, **kwargs) -> st...
python:mypy_return (MINOR) source_shopify/source.py:441 Check that function always returns a value Missing return statement . Code line: def check_connection(self, logger: AirbyteLogger, config: Mapping[...
python:mypy_valid_type (MINOR) source_shopify/source.py:441 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]:

Coverage (83.3%)

File Coverage File Coverage
source_shopify/init.py 100.0 source_shopify/auth.py 80.0
source_shopify/source.py 61.9 source_shopify/transform.py 94.8
source_shopify/utils.py 89.3

Please sign in to comment.