Skip to content

Commit

Permalink
#12003 source smartsheets: fix startdate in spec
Browse files Browse the repository at this point in the history
  • Loading branch information
davydov-d committed Apr 20, 2022
1 parent 9eed5f7 commit 9c95ae8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ def read_records(self, from_dt: str) -> Iterable[Dict[str, str]]:
for row in self.data.rows:
yield self._construct_record(row)

def check_connection(self, logger: logging.Logger) -> Tuple[bool, str]:
def check_connection(self, logger: logging.Logger) -> Tuple[bool, Optional[str]]:
try:
_ = self.data
except smartsheet.exceptions.ApiError as e:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,10 @@
"type": "string"
},
"start_datetime": {
"title": "Start Date",
"type": ["null", "string"],
"examples": [
"2000-01-01",
"2000-01-01 13:00",
"2000-01-01 13:00:00",
"2000-01-01T13:00+00:00",
"2000-01-01T13:00:00-07:00"
],
"description": "ISO 8601, for instance: `YYYY-MM-DD`, `YYYY-MM-DD HH:MM:SS+HH:MM`",
"title": "Start Datetime",
"type": "string",
"examples": ["2000-01-01T13:00:00", "2000-01-01T13:00:00-07:00"],
"description": "ISO 8601, for instance: `YYYY-MM-DDTHH:MM:SS`, `YYYY-MM-DDTHH:MM:SS+HH:MM`",
"format": "date-time"
}
}
Expand Down

1 comment on commit 9c95ae8

@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 Smartsheets(#12077)

Measures

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

Detected Issues

Rule File Description Message
python:mypy_return_value (MINOR) source_smartsheets/sheet.py Check that return value is compatible with signature Incompatible return value type (got "Tuple[bool, None]", expected "Tuple[bool, str]") . Code line: return True, None
python:mypy_assignment (MINOR) source_smartsheets/sheet.py:25 Check that assigned value is compatible with target Incompatible types in assignment (expression has type "int", target has type "Optional[str]") . Code line: kwargs["page_size"] = 1
python:mypy_valid_type (MINOR) source_smartsheets/sheet.py:29 Check that type (annotation) is valid Function "builtins.any" is not valid as a type . Code line: def _column_to_property(column_type: str) -> Dict[str, any]:
python:mypy_no_any_return (MINOR) source_smartsheets/sheet.py:51 Reject returning value with "Any" type if return type is not "Any" Returning Any from function declared to return "str" . Code line: return self.data.name
python:mypy_return (MINOR) source_smartsheets/sheet.py:58 Check that function always returns a value Missing return statement . Code line: def primary_key(self) -> str:
python:mypy_no_any_return (MINOR) source_smartsheets/sheet.py:61 Reject returning value with "Any" type if return type is not "Any" Returning Any from function declared to return "str" . Code line: return column.title
python:mypy_valid_type (MINOR) source_smartsheets/source.py:16 Check that type (annotation) is valid Function "builtins.any" is not valid as a type . Code line: ...ogger: logging.Logger, config: Mapping[str, Any]) -> Tuple[bool, any]:
python:mypy_var_annotated (MINOR) source_smartsheets/streams.py:18 Require variable annotation if type can't be inferred Need type annotation for "_state" (hint: "_state: Dict[, ] = ...") . Code line: self._state = {}
python:mypy_assignment (MINOR) source_smartsheets/streams.py:41 Check that assigned value is compatible with target Incompatible types in assignment (expression has type "Mapping[str, Any]", variable has type "Dict[Any, Any]") . Code line: self._state = value

Coverage (100.0%)

File Coverage File Coverage
source_smartsheets/init.py 100.0 source_smartsheets/sheet.py 100.0
source_smartsheets/source.py 100.0 source_smartsheets/streams.py 89.2

Please sign in to comment.