Skip to content

Commit 81179c5

Browse files
committed
lint: trailing whitespace changes
1 parent 44ce849 commit 81179c5

File tree

2 files changed

+12
-12
lines changed

2 files changed

+12
-12
lines changed

src/acquisition/covidcast/database.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -117,28 +117,28 @@ def insert_or_update_batch(self, cc_rows: List[CovidcastRow], batch_size=2**20,
117117
get_structured_logger("insert_or_update_batch").fatal(err_msg)
118118
raise DBLoadStateException(err_msg)
119119

120-
# NOTE: `value_update_timestamp` is hardcoded to "NOW" (which is appropriate) and
120+
# NOTE: `value_update_timestamp` is hardcoded to "NOW" (which is appropriate) and
121121
# `is_latest_issue` is hardcoded to 1 (which is temporary and addressed later in this method)
122122
insert_into_loader_sql = f'''
123123
INSERT INTO `{self.load_table}`
124124
(`source`, `signal`, `time_type`, `geo_type`, `time_value`, `geo_value`,
125-
`value_updated_timestamp`, `value`, `stderr`, `sample_size`, `issue`, `lag`,
125+
`value_updated_timestamp`, `value`, `stderr`, `sample_size`, `issue`, `lag`,
126126
`is_latest_issue`, `missing_value`, `missing_stderr`, `missing_sample_size`)
127127
VALUES
128-
(%s, %s, %s, %s, %s, %s,
129-
UNIX_TIMESTAMP(NOW()), %s, %s, %s, %s, %s,
128+
(%s, %s, %s, %s, %s, %s,
129+
UNIX_TIMESTAMP(NOW()), %s, %s, %s, %s, %s,
130130
1, %s, %s, %s)
131131
'''
132132

133133
# all load table entries are already marked "is_latest_issue".
134134
# if an entry in the load table is NOT in the latest table, it is clearly now the latest value for that key (so we do nothing (thanks to INNER join)).
135135
# if an entry *IS* in both load and latest tables, but latest table issue is newer, unmark is_latest_issue in load.
136136
fix_is_latest_issue_sql = f'''
137-
UPDATE
138-
`{self.load_table}` JOIN `{self.latest_view}`
139-
USING (`source`, `signal`, `geo_type`, `geo_value`, `time_type`, `time_value`)
140-
SET `{self.load_table}`.`is_latest_issue`=0
141-
WHERE `{self.load_table}`.`issue` < `{self.latest_view}`.`issue`
137+
UPDATE
138+
`{self.load_table}` JOIN `{self.latest_view}`
139+
USING (`source`, `signal`, `geo_type`, `geo_value`, `time_type`, `time_value`)
140+
SET `{self.load_table}`.`is_latest_issue`=0
141+
WHERE `{self.load_table}`.`issue` < `{self.latest_view}`.`issue`
142142
'''
143143

144144
# TODO: consider handling cc_rows as a generator instead of a list

src/maintenance/signal_dash_data_generator.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -150,11 +150,11 @@ def write_coverage(
150150

151151
def get_enabled_signals(self) -> List[DashboardSignal]:
152152
"""Retrieve all enabled signals from the database"""
153-
select_statement = f'''SELECT `id`,
153+
select_statement = f'''SELECT `id`,
154154
`name`,
155155
`source`,
156156
`covidcast_signal`,
157-
`latest_coverage_update`,
157+
`latest_coverage_update`,
158158
`latest_status_update`
159159
FROM `{Database.SIGNAL_TABLE_NAME}`
160160
WHERE `enabled`
@@ -208,7 +208,7 @@ def get_coverage(dashboard_signal: DashboardSignal) -> List[DashboardSignalCover
208208
lambda x: pd.to_datetime(Week(x // 100, x % 100).startdate()))
209209

210210
signal_coverage_list = []
211-
211+
212212
for _, row in count_by_geo_type_df.iterrows():
213213
signal_coverage = DashboardSignalCoverage(
214214
signal_id=dashboard_signal.db_id,

0 commit comments

Comments
 (0)