Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: ensure_dependencies.py

Issue 5248250277789696: Noissue - Use set literals in ensure_dependencies.py (Closed)
Patch Set: Created May 4, 2015, 12:42 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ensure_dependencies.py
===================================================================
--- a/ensure_dependencies.py
+++ b/ensure_dependencies.py
@@ -167,7 +167,7 @@
def safe_join(path, subpath):
# This has been inspired by Flask's safe_join() function
- forbidden = set([os.sep, os.altsep]) - set([posixpath.sep, None])
+ forbidden = {os.sep, os.altsep} - {posixpath.sep, None}
if any(sep in subpath for sep in forbidden):
raise Exception("Illegal directory separator in dependency path %s" % subpath)
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld