Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/strutil.py @ 25979:b723f05ec49b
strutil: use absolute_import
This file doesn't import anything. But chances are we'll eventually
implement a static analysis check that ensures absolute_import is used.
So we might as well add this.
author | Gregory Szorc <gregory.szorc@gmail.com> |
---|---|
date | Sat, 08 Aug 2015 20:01:40 -0700 |
parents | 25e572394f5c |
children |
comparison
equal
deleted
inserted
replaced
25978:762f4c6df6b1 | 25979:b723f05ec49b |
---|---|
2 # | 2 # |
3 # Copyright 2006 Vadim Gelfer <vadim.gelfer@gmail.com> | 3 # Copyright 2006 Vadim Gelfer <vadim.gelfer@gmail.com> |
4 # | 4 # |
5 # This software may be used and distributed according to the terms of the | 5 # This software may be used and distributed according to the terms of the |
6 # GNU General Public License version 2 or any later version. | 6 # GNU General Public License version 2 or any later version. |
7 | |
8 from __future__ import absolute_import | |
7 | 9 |
8 def findall(haystack, needle, start=0, end=None): | 10 def findall(haystack, needle, start=0, end=None): |
9 if end is None: | 11 if end is None: |
10 end = len(haystack) | 12 end = len(haystack) |
11 if end < 0: | 13 if end < 0: |