diff options
| author | django-bot <ops@djangoproject.com> | 2025-07-22 20:41:41 -0700 |
|---|---|---|
| committer | nessita <124304+nessita@users.noreply.github.com> | 2025-07-23 20:17:55 -0300 |
| commit | 69a93a88edb56ba47f624dac7a21aacc47ea474f (patch) | |
| tree | f57507a4435d032493cae40e06ecb254790b67b2 /django/utils/feedgenerator.py | |
| parent | 55b0cc21310b76ce4018dd793ba50556eaf0af06 (diff) | |
Refs #36500 -- Rewrapped long docstrings and block comments via a script.
Rewrapped long docstrings and block comments to 79 characters + newline
using script from https://github.com/medmunds/autofix-w505.
Diffstat (limited to 'django/utils/feedgenerator.py')
| -rw-r--r-- | django/utils/feedgenerator.py | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/django/utils/feedgenerator.py b/django/utils/feedgenerator.py index e52720a61e..a9eaffc205 100644 --- a/django/utils/feedgenerator.py +++ b/django/utils/feedgenerator.py @@ -65,9 +65,10 @@ def _guess_stylesheet_mimetype(url): """ mimetypedb = mimetypes.MimeTypes() - # The official mimetype for XSLT files is technically `application/xslt+xml` - # but as of 2024 almost no browser supports that (they all expect text/xsl). - # On top of that, windows seems to assume that the type for xsl is text/xml. + # The official mimetype for XSLT files is technically + # `application/xslt+xml` but as of 2024 almost no browser supports that + # (they all expect text/xsl). On top of that, windows seems to assume that + # the type for xsl is text/xml. mimetypedb.readfp(StringIO("text/xsl\txsl\ntext/xsl\txslt")) return mimetypedb.guess_type(url) @@ -215,8 +216,8 @@ class SyndicationFeed: def root_attributes(self): """ - Return extra attributes to place on the root (i.e. feed/channel) element. - Called from write(). + Return extra attributes to place on the root (i.e. feed/channel) + element. Called from write(). """ return {} @@ -235,7 +236,8 @@ class SyndicationFeed: def item_attributes(self, item): """ - Return extra attributes to place on each item (i.e. item/entry) element. + Return extra attributes to place on each item (i.e. item/entry) + element. """ return {} @@ -295,8 +297,8 @@ class RssFeed(SyndicationFeed): def write(self, outfile, encoding): handler = SimplerXMLGenerator(outfile, encoding, short_empty_elements=True) handler.startDocument() - # Any stylesheet must come after the start of the document but before any tag. - # https://www.w3.org/Style/styling-XML.en.html + # Any stylesheet must come after the start of the document but before + # any tag. https://www.w3.org/Style/styling-XML.en.html self.add_stylesheets(handler) handler.startElement("rss", self.rss_attributes()) handler.startElement("channel", self.root_attributes()) |
