Skip to content

Commit

Permalink
a few other flake8 items
Browse files Browse the repository at this point in the history
  • Loading branch information
tnking97 committed Apr 23, 2021
1 parent a611c62 commit 5e25064
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 18 deletions.
7 changes: 3 additions & 4 deletions jwql/instrument_monitors/common_monitors/bias_monitor.py
Original file line number Diff line number Diff line change
Expand Up @@ -282,10 +282,9 @@ def most_recent_search(self):
where the bias monitor was run.
"""

sub_query = session.query(
self.query_table.aperture,
func.max(self.query_table.end_time_mjd).label('maxdate')
).group_by(self.query_table.aperture).subquery('t2')
sub_query = session.query(self.query_table.aperture,
func.max(self.query_table.end_time_mjd).label('maxdate')
).group_by(self.query_table.aperture).subquery('t2')

# Note that "self.query_table.run_monitor == True" below is
# intentional. Switching = to "is" results in an error in the query.
Expand Down
2 changes: 1 addition & 1 deletion jwql/jwql_monitors/generate_preview_images.py
Original file line number Diff line number Diff line change
Expand Up @@ -611,7 +611,7 @@ def group_filenames(filenames):
subgroup.append(file_to_match)

else:
# filename_dict['filename_type'] may be 'guider' or 'time_series', for instance. Treat individually.
# filename_dict['filename_type'] may be 'guider' or 'time_series', for instance. Treat individually.
matched_names.append(filename)
subgroup.append(filename)

Expand Down
22 changes: 10 additions & 12 deletions jwql/website/apps/jwql/bokeh_dashboard.py
Original file line number Diff line number Diff line change
Expand Up @@ -171,20 +171,18 @@ def dashboard_files_per_day(self):
p2.line(x='date', y='used', source=source, color='#355C7D', line_dash='dashed', line_width=3, legend='Used Storage')
tab2 = Panel(child=p2, title='Storage')

p1.xaxis.formatter = DatetimeTickFormatter(
hours=["%d %B %Y"],
days=["%d %B %Y"],
months=["%d %B %Y"],
years=["%d %B %Y"],
)
p1.xaxis.formatter = DatetimeTickFormatter(hours=["%d %B %Y"],
days=["%d %B %Y"],
months=["%d %B %Y"],
years=["%d %B %Y"],
)
p1.xaxis.major_label_orientation = pi / 4

p2.xaxis.formatter = DatetimeTickFormatter(
hours=["%d %B %Y"],
days=["%d %B %Y"],
months=["%d %B %Y"],
years=["%d %B %Y"],
)
p2.xaxis.formatter = DatetimeTickFormatter(hours=["%d %B %Y"],
days=["%d %B %Y"],
months=["%d %B %Y"],
years=["%d %B %Y"],
)
p2.xaxis.major_label_orientation = pi / 4

tabs = Tabs(tabs=[tab1, tab2])
Expand Down
2 changes: 1 addition & 1 deletion style_guide/typing_demo/typing_demo_1.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@

# For heterogeneous non-tuples, use Union.
a_heterogeneous_list: List[Union[int, bool, str]] = [1, True, "jwql"]
a_heterogeneous_dict: Dict[Union[str, int], Union[bool, int]] = {"jwql": True, 1:1}
a_heterogeneous_dict: Dict[Union[str, int], Union[bool, int]] = {"jwql": True, 1: 1}

# If a value can be None, use Optional
maybe_a_string: Optional[str] = "jwql" if not a_bool else None
Expand Down

0 comments on commit 5e25064

Please sign in to comment.