Skip to content

Commit

Permalink
precommit fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
nabobalis committed Apr 4, 2024
1 parent ea6a405 commit b393491
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 8 deletions.
2 changes: 1 addition & 1 deletion sunpy/net/dataretriever/sources/fermi_gbm.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ class GBMClient(GenericClient):
<BLANKLINE>
"""

pattern = ('https://heasarc.gsfc.nasa.gov/FTP/fermi/data/gbm/daily/{{year:4d}}/{{month:2d}}/{{day:2d}}/current/'
'glg_{{Resolution:5}}_{{Detector:2}}_{{year:2d}}{{month:2d}}{{day:2d}}_v00.pha')

Expand Down
6 changes: 1 addition & 5 deletions sunpy/net/scraper.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,11 +89,7 @@ def __init__(self, pattern, **kwargs):
else:
now = datetime.now()
milliseconds_ = int(now.microsecond / 1000.)
self.now = now.strftime('{start}{milli:03d}{end}'.format(
start=self.timepattern[0:milliseconds.start()],
milli=milliseconds_,
end=self.timepattern[milliseconds.end():]
))
self.now = now.strftime(f'{self.timepattern[0:milliseconds.start()]}{milliseconds_:03d}{self.timepattern[milliseconds.end():]}')

def matches(self, filepath, date):
"""
Expand Down
2 changes: 0 additions & 2 deletions sunpy/net/tests/test_scraper_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,6 @@ def test_check_timerange():
'2019-02-28 23:59:00', '2019-02-28 23:59:59.999000'),
({'year': 2020, 'month': 7, 'day': 31, 'hour': 23, 'minute': 59, 'second': 59},
'2020-07-31 23:59:59', '2020-07-31 23:59:59.999000'),
({'year': 2020, 'month': 7, 'day': 31, 'hour': 23, 'minute': 59, 'second': 59},
'2020-07-31 23:59:59', '2020-07-31 23:59:59.999000'),
])
def test_get_timerange_from_exdict(exdict, start, end):
tr = TimeRange(start, end)
Expand Down

0 comments on commit b393491

Please sign in to comment.