Skip to content

Commit

Permalink
punctuation, wording
Browse files Browse the repository at this point in the history
  • Loading branch information
ReimarBauer committed Jan 13, 2025
1 parent 2c79bdb commit 9a0daa6
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions mslib/msui/flighttrack.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
from mslib.msui.performance_settings import DEFAULT_PERFORMANCE

from mslib.utils import writexml
xml.dom.minidom.Element.writexml = writexml # nosec We take care of writing correct xml
xml.dom.minidom.Element.writexml = writexml # nosec, we take care of writing correct XML
# Constants for identifying the table columns when the WaypointsTableModel is
# used with a QTableWidget.
LOCATION, LAT, LON, FLIGHTLEVEL, PRESSURE = list(range(5))
Expand Down Expand Up @@ -616,7 +616,7 @@ def save_to_ftml(self, filename=None):
file_dir.close()

def get_xml_doc(self):
doc = xml.dom.minidom.Document() # nosec We take care of writing correct xml
doc = xml.dom.minidom.Document() # nosec, we take care of writing correct XML
ft_el = doc.createElement("FlightTrack")
ft_el.setAttribute("version", __version__)
doc.appendChild(ft_el)
Expand Down
2 changes: 1 addition & 1 deletion mslib/msui/kmloverlay_dockwidget.py
Original file line number Diff line number Diff line change
Expand Up @@ -607,7 +607,7 @@ def merge_file(self):
# no_network, prevents automatically loading remote documents
# https://gist.github.com/jack-om/f2c762f399e6ee652f05320921ece4c9
with _fs.open(_name, 'r') as kmlf:
tree = et.parse(kmlf, parser=secure_parser) # nosec parse KML file using the secured parser
tree = et.parse(kmlf, parser=secure_parser) # nosec, parse using the secured parser
root = tree.getroot() # get the root of the file
self.remove_ns(root) # removes <kml> and </kml>
element.append(copy.deepcopy(root[0]))
Expand Down
2 changes: 1 addition & 1 deletion mslib/mswms/mpl_lsec.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ def plot_lsection(self, data, lats, lons, valid_time, init_time):
# Derive additional data fields and make the plot.
self._prepare_datafields()

impl = getDOMImplementation() # nosec This is used to create and write a new XML document
impl = getDOMImplementation() # nosec, this is used to create and write a new XML document
xmldoc = impl.createDocument(None, "MSS_LinearSection_Data", None)

# Title of this section.
Expand Down
2 changes: 1 addition & 1 deletion mslib/mswms/mpl_vsec.py
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ def plot_vsection(self, data, lats, lons, valid_time, init_time,
# =========================================================================
elif mime_type == "text/xml":

impl = getDOMImplementation() # nosec This is used to create and write a new XML document
impl = getDOMImplementation() # nosec, this is used to create and write a new XML document
xmldoc = impl.createDocument(None, "MSS_VerticalSection_Data", None)

# Title of this section.
Expand Down
4 changes: 2 additions & 2 deletions mslib/utils/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,12 +103,12 @@ def writexml(self, writer, indent="", addindent="", newl=""):

for a_name in sorted(attrs.keys()):
writer.write(" %s=\"" % a_name)
_write_data(writer, attrs[a_name].value) # nosec We take care of writing correct xml
_write_data(writer, attrs[a_name].value) # nosec, we take care of writing correct XML
writer.write("\"")
if self.childNodes:
writer.write(">")
if (len(self.childNodes) == 1 and self.childNodes[0].nodeType == Node.TEXT_NODE):
# nosec, we take care of writing correct xml
# nosec, we take care of writing correct XML
self.childNodes[0].writexml(writer, '', '', '')
else:
writer.write(newl)
Expand Down

0 comments on commit 9a0daa6

Please sign in to comment.