Skip to content

Commit

Permalink
Merge pull request #2466 from cta-observatory/sonarqube_fixes
Browse files Browse the repository at this point in the history
Fix some minor issues found by sonarqube
  • Loading branch information
maxnoe committed Jan 4, 2024
2 parents e4402ad + 30fd288 commit 6ffc12d
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion ctapipe/io/tests/test_metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ def test_from_dict():
data_association="Subarray",
data_model_name="Unofficial DL1",
data_model_version="1.0",
data_model_url="http://google.com",
data_model_url="https://example.org",
format="hdf5",
),
process=meta.Process(type_="Simulation", subtype="Prod3b", id_="423442"),
Expand Down
7 changes: 5 additions & 2 deletions ctapipe/visualization/bokeh.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import sys
import tempfile
from abc import ABCMeta
from tempfile import NamedTemporaryFile

import astropy.units as u
import matplotlib.pyplot as plt
Expand Down Expand Up @@ -134,7 +134,10 @@ def show(self):
output_notebook()
else:
# this only sets the default name, created only when show is called
output_file(tempfile.mktemp(prefix="ctapipe_bokeh_", suffix=".html"))
tmp = NamedTemporaryFile(
delete=False, prefix="ctapipe_bokeh_", suffix=".html"
)
output_file(tmp.name)

self._handle = show(self.figure, notebook_handle=self._use_notebook)

Expand Down
2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -389,7 +389,7 @@ def setup(app):
"numpy": ("https://numpy.org/doc/stable/", None),
"scipy": ("https://docs.scipy.org/doc/scipy/", None),
"astropy": ("https://docs.astropy.org/en/latest/", None),
"pytables": ("http://www.pytables.org/", None),
"pytables": ("https://www.pytables.org/", None),
"pandas": ("https://pandas.pydata.org/pandas-docs/stable/", None),
"matplotlib": ("https://matplotlib.org/stable", None),
"cython": ("https://docs.cython.org/en/latest/", None),
Expand Down

0 comments on commit 6ffc12d

Please sign in to comment.