Skip to content

Commit d675168

Browse files
committed
noop: fix misc bad escapes in strings
1 parent 9394b35 commit d675168

6 files changed

Lines changed: 12 additions & 12 deletions

File tree

handlers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ def dispatch_request(self, site, key_id, **kwargs):
197197
return mf2_json
198198

199199
def merge_urls(self, obj, property, urls, object_type='article'):
200-
"""Updates an object's ActivityStreams URL objects in place.
200+
r"""Updates an object's ActivityStreams URL objects in place.
201201
202202
Adds all URLs in urls that don't already exist in ``obj[property]``\.
203203

original_post_discovery.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@
5151

5252
def discover(source, activity, fetch_hfeed=True, include_redirect_sources=True,
5353
already_fetched_hfeeds=None):
54-
"""Augments the standard original post discovery algorithm with a
54+
r"""Augments the standard original post discovery algorithm with a
5555
reverse lookup that supports posts without a backlink or citation.
5656
5757
If ``fetch_hfeed`` is False, then we will check the db for previously found
@@ -171,7 +171,7 @@ def resolve(urls):
171171

172172

173173
def refetch(source):
174-
"""Refetch the author's URLs and look for new or updated syndication
174+
r"""Refetch the author's URLs and look for new or updated syndication
175175
links that might not have been there the first time we looked.
176176
177177
Args:
@@ -277,7 +277,7 @@ def _posse_post_discovery(source, activity, syndication_url, fetch_hfeed,
277277

278278

279279
def _process_author(source, author_url, refetch=False, store_blanks=True):
280-
"""Fetch the author's domain URL, and look for syndicated posts.
280+
r"""Fetch the author's domain URL, and look for syndicated posts.
281281
282282
Args:
283283
source (models.Source)
@@ -404,7 +404,7 @@ def updated_or_published(item):
404404

405405

406406
def _merge_hfeeds(feed1, feed2):
407-
"""Merge items from two ``h-feeds`` into a composite feed.
407+
r"""Merge items from two ``h-feeds`` into a composite feed.
408408
409409
Skips items in ``feed2`` that are already represented in ``feed1``\, based on
410410
the ``url`` property.
@@ -455,7 +455,7 @@ def _find_feed_items(mf2):
455455

456456
def process_entry(source, permalink, feed_entry, refetch, preexisting,
457457
store_blanks=True):
458-
"""Fetch and process an h-entry and save a new :class:`models.SyndicatedPost`.
458+
r"""Fetch and process an h-entry and save a new :class:`models.SyndicatedPost`.
459459
460460
Args:
461461
source (models.Source)
@@ -560,7 +560,7 @@ def process_entry(source, permalink, feed_entry, refetch, preexisting,
560560

561561
def _process_syndication_urls(source, permalink, syndication_urls,
562562
preexisting):
563-
"""Process a list of syndication URLs looking for one that matches the
563+
r"""Process a list of syndication URLs looking for one that matches the
564564
current source. If one is found, stores a new :class:`models.SyndicatedPost`
565565
in the db.
566566

pages.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ def which_bridgy():
6666
@app.route('/users')
6767
@flask_util.headers({'Cache-Control': 'public, max-age=3600'})
6868
def users():
69-
"""View for ``/users``.
69+
r"""View for ``/users``.
7070
7171
Semi-optimized. Pages by source name. Queries each source type for results
7272
with name greater than the start_name query param, then merge sorts the

tasks.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ def is_quote_mention(activity, source):
3636

3737

3838
class Poll(View):
39-
"""Task handler that fetches and processes new responses from a single source.
39+
r"""Task handler that fetches and processes new responses from a single source.
4040
4141
Request parameters:
4242

tumblr.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,12 +57,12 @@
5757
# have a default way, but themes often do it themselves, differently. Sigh.
5858
# Details in https://github.com/snarfed/bridgy/issues/278
5959
DISQUS_SHORTNAME_RES = (
60-
re.compile("""
60+
re.compile(r"""
6161
(?:https?://disqus\.com/forums|disqus[ -_]?(?:user|short)?name)
6262
\ *[=:/]\ *['"]?
6363
([^/"\' ]+) # the actual shortname
6464
""", re.IGNORECASE | re.VERBOSE),
65-
re.compile('https?://([^./"\' ]+)\.disqus\.com/embed\.js'),
65+
re.compile(r'https?://([^./"\' ]+)\.disqus\.com/embed\.js'),
6666
)
6767

6868

wordpress_rest.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ def urls_and_domains(self, auth_entity):
106106
return [self.url], [self.key_id()]
107107

108108
def create_comment(self, post_url, author_name, author_url, content):
109-
"""Creates a new comment in the source silo.
109+
r"""Creates a new comment in the source silo.
110110
111111
If the last part of the post URL is numeric, e.g.
112112
``http://site/post/123999``\, it's used as the post id. Otherwise, we

0 commit comments

Comments
 (0)