diff --git a/docs/source/conf.py b/docs/source/conf.py index f3f0280f..ea3b7f54 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -22,7 +22,7 @@ html_show_copyright = False on_rtd = os.environ.get('READTHEDOCS', None) == 'True' -if not on_rtd: # only import and set the theme if we're building docs locally +if not on_rtd: # only import and set the theme if we’re building docs locally try: import sphinx_rtd_theme html_theme = 'sphinx_rtd_theme' diff --git a/powerline/bindings/tmux/powerline.conf b/powerline/bindings/tmux/powerline.conf index 3fb316a3..b8a07517 100644 --- a/powerline/bindings/tmux/powerline.conf +++ b/powerline/bindings/tmux/powerline.conf @@ -1,7 +1,7 @@ if-shell 'test -z "$POWERLINE_CONFIG_COMMAND"' 'set-environment -g POWERLINE_CONFIG_COMMAND powerline-config' -# Don't version-check for this core functionality -- anything too old to -# support these options likely won't work well with powerline +# Don’t version-check for this core functionality -- anything too old to +# support these options likely won’t work well with powerline set -g status on set -g status-utf8 on set -g status-interval 2 diff --git a/powerline/lib/debug.py b/powerline/lib/debug.py index 478b9ed8..ddd386f0 100755 --- a/powerline/lib/debug.py +++ b/powerline/lib/debug.py @@ -66,7 +66,7 @@ def print_cycles(objects, outstream=sys.stdout, show_progress=False): referents = gc.get_referents(obj) for referent in referents: - # If we've found our way back to the start, this is + # If we’ve found our way back to the start, this is # a cycle, so print it out if referent is start: try: @@ -78,13 +78,13 @@ def print_cycles(objects, outstream=sys.stdout, show_progress=False): outstream.write('Cyclic reference: %i\n' % id(referent)) print_path(current_path) - # Don't go back through the original list of objects, or + # Don’t go back through the original list of objects, or # through temporary references to the object, since those # are just an artifact of the cycle detector itself. elif referent is objects or isinstance(referent, FrameType): continue - # We haven't seen this object before, so recurse + # We haven’t seen this object before, so recurse elif id(referent) not in all: recurse(referent, start, all, current_path + (obj,)) diff --git a/powerline/lib/shell.py b/powerline/lib/shell.py index 8dd4ca13..b7add3c4 100644 --- a/powerline/lib/shell.py +++ b/powerline/lib/shell.py @@ -85,7 +85,7 @@ except ImportError: and not os.path.isdir(fn) ) - # If we're given a path with a directory part, look it up directly rather + # If we’re given a path with a directory part, look it up directly rather # than referring to PATH directories. This includes checking relative to the # current directory, e.g. ./script if os.path.dirname(cmd): @@ -115,7 +115,7 @@ except ImportError: else: files = [cmd + ext for ext in pathext] else: - # On other platforms you don't have things like PATHEXT to tell you + # On other platforms you don’t have things like PATHEXT to tell you # what file suffixes are executable, so just pass on cmd as-is. files = [cmd] diff --git a/powerline/lib/threaded.py b/powerline/lib/threaded.py index 5e30988a..01ad2a0d 100644 --- a/powerline/lib/threaded.py +++ b/powerline/lib/threaded.py @@ -102,7 +102,7 @@ class ThreadedSegment(Segment, MultiRunnedThread): def shutdown(self): self.shutdown_event.set() if self.daemon and self.is_alive(): - # Give the worker thread a chance to shutdown, but don't block for + # Give the worker thread a chance to shutdown, but don’t block for # too long self.join(0.01) diff --git a/powerline/lib/vcs/git.py b/powerline/lib/vcs/git.py index d7d5733a..df5b3203 100644 --- a/powerline/lib/vcs/git.py +++ b/powerline/lib/vcs/git.py @@ -70,7 +70,7 @@ class GitRepository(object): if path: gitd = git_directory(self.directory) # We need HEAD as without it using fugitive to commit causes the - # current file's status (and only the current file) to not be updated + # current file’s status (and only the current file) to not be updated # for some reason I cannot be bothered to figure out. return get_file_status( directory=self.directory, diff --git a/powerline/lint/markedjson/reader.py b/powerline/lint/markedjson/reader.py index e212a2bd..6b329bf9 100644 --- a/powerline/lint/markedjson/reader.py +++ b/powerline/lint/markedjson/reader.py @@ -7,7 +7,7 @@ from powerline.lint.markedjson.error import MarkedError, Mark, NON_PRINTABLE from powerline.lib.unicode import unicode -# This module contains abstractions for the input stream. You don't have to +# This module contains abstractions for the input stream. You don’t have to # looks further, there are no pretty code. @@ -24,7 +24,7 @@ class Reader(object): # Reader accepts # - a file-like object with its `read` method returning `str`, - # Yeah, it's ugly and slow. + # Yeah, it’s ugly and slow. def __init__(self, stream): self.name = None self.stream = None diff --git a/powerline/lint/markedjson/scanner.py b/powerline/lint/markedjson/scanner.py index b4776f8a..affb791f 100644 --- a/powerline/lint/markedjson/scanner.py +++ b/powerline/lint/markedjson/scanner.py @@ -175,7 +175,7 @@ class Scanner: if self.check_plain(): return self.fetch_plain() - # No? It's an error. Let's produce a nice error message. + # No? It’s an error. Let’s produce a nice error message. raise ScannerError( "while scanning for the next token", None, "found character %r that cannot start any token" % ch, @@ -186,7 +186,7 @@ class Scanner: def next_possible_simple_key(self): # Return the number of the nearest possible simple key. Actually we - # don't need to loop through the whole dictionary. We may replace it + # don’t need to loop through the whole dictionary. We may replace it # with the following code: # if not self.possible_simple_keys: # return None @@ -211,11 +211,11 @@ class Scanner: del self.possible_simple_keys[level] def save_possible_simple_key(self): - # The next token may start a simple key. We check if it's possible + # The next token may start a simple key. We check if it’s possible # and save its position. This function is called for # SCALAR(flow), '[', and '{'. - # The next token might be a simple key. Let's save it's number and + # The next token might be a simple key. Let’s save it’s number and # position. if self.allow_simple_key: self.remove_possible_simple_key() @@ -364,7 +364,7 @@ class Scanner: def scan_flow_scalar(self): # See the specification for details. # Note that we loose indentation rules for quoted scalars. Quoted - # scalars don't need to adhere indentation because " and ' clearly + # scalars don’t need to adhere indentation because " and ' clearly # mark the beginning and the end of them. Therefore we are less # restrictive then the specification requires. We only need to check # that document separators are not included in scalars. diff --git a/powerline/renderer.py b/powerline/renderer.py index dccc8f15..b6560a60 100644 --- a/powerline/renderer.py +++ b/powerline/renderer.py @@ -248,7 +248,7 @@ class Renderer(object): current_width = 0 if not width: - # No width specified, so we don't need to crop or pad anything + # No width specified, so we don’t need to crop or pad anything if output_width: current_width = self._render_length(theme, segments, self.compute_divider_widths(theme)) return construct_returned_value(''.join([ diff --git a/powerline/renderers/i3bar.py b/powerline/renderers/i3bar.py index 223458c2..db8c40d2 100644 --- a/powerline/renderers/i3bar.py +++ b/powerline/renderers/i3bar.py @@ -14,7 +14,7 @@ class I3barRenderer(Renderer): @staticmethod def hlstyle(*args, **kwargs): - # We don't need to explicitly reset attributes, so skip those calls + # We don’t need to explicitly reset attributes, so skip those calls return '' def hl(self, contents, fg=None, bg=None, attr=None): diff --git a/powerline/renderers/pango_markup.py b/powerline/renderers/pango_markup.py index 02511ab5..e0dfa481 100644 --- a/powerline/renderers/pango_markup.py +++ b/powerline/renderers/pango_markup.py @@ -12,7 +12,7 @@ class PangoMarkupRenderer(Renderer): @staticmethod def hlstyle(*args, **kwargs): - # We don't need to explicitly reset attributes, so skip those calls + # We don’t need to explicitly reset attributes, so skip those calls return '' def hl(self, contents, fg=None, bg=None, attr=None): diff --git a/powerline/renderers/shell/__init__.py b/powerline/renderers/shell/__init__.py index b767fc26..3318ff22 100644 --- a/powerline/renderers/shell/__init__.py +++ b/powerline/renderers/shell/__init__.py @@ -82,7 +82,7 @@ class ShellRenderer(Renderer): If an argument is None, the argument is ignored. If an argument is False, the argument is reset to the terminal defaults. If an argument - is a valid color or attribute, it's added to the ANSI escape code. + is a valid color or attribute, it’s added to the ANSI escape code. ''' ansi = [0] if fg is not None: diff --git a/powerline/renderers/tmux.py b/powerline/renderers/tmux.py index 5c02f29b..97deda9f 100644 --- a/powerline/renderers/tmux.py +++ b/powerline/renderers/tmux.py @@ -13,7 +13,7 @@ class TmuxRenderer(Renderer): def hlstyle(self, fg=None, bg=None, attr=None): '''Highlight a segment.''' - # We don't need to explicitly reset attributes, so skip those calls + # We don’t need to explicitly reset attributes, so skip those calls if not attr and not bg and not fg: return '' tmux_attr = [] diff --git a/powerline/renderers/vim.py b/powerline/renderers/vim.py index c93950cc..58c690dd 100644 --- a/powerline/renderers/vim.py +++ b/powerline/renderers/vim.py @@ -128,7 +128,7 @@ class VimRenderer(Renderer): If an argument is None, the argument is ignored. If an argument is False, the argument is reset to the terminal defaults. If an argument - is a valid color or attribute, it's added to the vim highlight group. + is a valid color or attribute, it’s added to the vim highlight group. ''' # In order not to hit E541 two consequent identical highlighting # specifiers may be squashed into one. @@ -137,7 +137,7 @@ class VimRenderer(Renderer): return '' self.prev_highlight = (fg, bg, attr) - # We don't need to explicitly reset attributes in vim, so skip those + # We don’t need to explicitly reset attributes in vim, so skip those # calls if not attr and not bg and not fg: return '' diff --git a/powerline/segments/common.py b/powerline/segments/common.py index 6ab82944..8bf540cd 100644 --- a/powerline/segments/common.py +++ b/powerline/segments/common.py @@ -549,7 +549,7 @@ weather = with_docstring(WeatherSegment(), '''Return weather from Yahoo! Weather. Uses GeoIP lookup from http://freegeoip.net/ to automatically determine -your current location. This should be changed if you're in a VPN or if your +your current location. This should be changed if you’re in a VPN or if your IP address is registered at another location. Returns a list of colorized icon and temperature segments depending on @@ -1060,7 +1060,7 @@ class NowPlayingSegment(Segment): set .. set n - For the information we are looking for we don't really care if we're on + For the information we are looking for we don’t really care if we’re on the tag level or the set level. The dictionary comprehension in this method takes anything in ignore_levels and brings the key inside that to the first level of the dictionary. diff --git a/powerline/segments/vim/__init__.py b/powerline/segments/vim/__init__.py index 114c4765..81abe36c 100644 --- a/powerline/segments/vim/__init__.py +++ b/powerline/segments/vim/__init__.py @@ -304,7 +304,7 @@ def file_size(pl, suffix='B', si_prefix=False): string appended to the file size :param bool si_prefix: use SI prefix, e.g. MB instead of MiB - :return: file size or None if the file isn't saved or if the size is too big to fit in a number + :return: file size or None if the file isn’t saved or if the size is too big to fit in a number ''' # Note: returns file size in &encoding, not in &fileencoding. But returned # size is updated immediately; and it is valid for any buffer diff --git a/powerline/theme.py b/powerline/theme.py index 6bfc9b45..53921e43 100644 --- a/powerline/theme.py +++ b/powerline/theme.py @@ -163,6 +163,6 @@ class Theme(object): elif segment['align'] == 'c': segment['contents'] = segment['contents'].center(segment['width']) # We need to yield a copy of the segment, or else mode-dependent - # segment contents can't be cached correctly e.g. when caching + # segment contents can’t be cached correctly e.g. when caching # non-current window contents for vim statuslines yield segment.copy() diff --git a/scripts/powerline-daemon b/scripts/powerline-daemon index 3a67d1b8..04cd1365 100755 --- a/scripts/powerline-daemon +++ b/scripts/powerline-daemon @@ -398,7 +398,7 @@ def main(): daemonize() if use_filesystem: - # Create a locked pid file containing the daemon's PID + # Create a locked pid file containing the daemon’s PID if lockpidfile() is None: if not args.quiet: sys.stderr.write( diff --git a/setup.py b/setup.py index d953241a..371b8237 100755 --- a/setup.py +++ b/setup.py @@ -79,7 +79,7 @@ setup( author_email='kim.silkebaekken+vim@gmail.com', url='https://github.com/Lokaltog/powerline', license='MIT', - # XXX Python 3 doesn't allow compiled C files to be included in the scripts + # XXX Python 3 doesn’t allow compiled C files to be included in the scripts # list below. This is because Python 3 distutils tries to decode the file to # ASCII, and fails when powerline-client is a binary. # diff --git a/tests/test_provided_config_files.py b/tests/test_provided_config_files.py index 381cd842..9fc2b6ea 100644 --- a/tests/test_provided_config_files.py +++ b/tests/test_provided_config_files.py @@ -33,7 +33,7 @@ class TestVimConfig(TestCase): ) with open(os.path.join(cfg_path, 'config.json'), 'r') as f: local_themes_raw = json.load(f)['ext']['vim']['local_themes'] - # Don't run tests on external/plugin segments + # Don’t run tests on external/plugin segments local_themes = dict((k, v) for (k, v) in local_themes_raw.items()) self.assertEqual(len(buffers), len(local_themes) - 1) outputs = {}