Skip to content

Commit 41999ff

Browse files
committed
Merge branch 'release/0.7.6b'
2 parents 4adc34e + f859a61 commit 41999ff

File tree

11 files changed

+39
-16
lines changed

11 files changed

+39
-16
lines changed

Changelog.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Changelog
22
=========
33

4-
## 2013-12-02 0.7.5b
4+
## 2013-12-04 0.7.6b
55
--------------------
66
* Update indentation support;
77
* Python3 support;

Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ PACKAGE_MAINTAINER="Kirill Klenov <horneds@gmail.com>"
4545
PACKAGE_URL=http://github.com/klen/python-mode
4646
deb: clean $(CURDIR)/build
4747
@git co gh-pages
48+
@rm -rf deb
4849
@fpm -s dir -t deb -a all \
4950
-n $(PACKAGE_NAME) \
5051
-v $(PACKAGE_VERSION) \

doc/pymode.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
(__) (__) (__) (_) (_)(_____)(_)\_) (_/\/\_)(_____)(____/(____) ~
77

88

9-
Version: 0.7.5b
9+
Version: 0.7.6b
1010

1111
==============================================================================
1212
CONTENTS *pymode-contents*

plugin/pymode.vim

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
" vi: fdl=1
2-
let g:pymode_version = "0.7.5b"
2+
let g:pymode_version = "0.7.6b"
33

44
com! PymodeVersion echomsg "Current python-mode version: " . g:pymode_version
55
com! PymodeTroubleshooting call pymode#troubleshooting#test()
@@ -147,6 +147,9 @@ call pymode#default('g:pymode_breakpoint_cmd', '')
147147
" Rope support
148148
call pymode#default('g:pymode_rope', 1)
149149

150+
" System plugin variable
151+
call pymode#default('g:pymode_rope_current', '')
152+
150153
" If project hasnt been finded in current working directory, look at parents directory
151154
call pymode#default('g:pymode_rope_lookup_project', 1)
152155

pymode/libs/pylama/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
66
"""
77

8-
version_info = 2, 0, 3
8+
version_info = 2, 0, 4
99

1010
__version__ = version = '.'.join(map(str, version_info))
1111
__project__ = __name__

pymode/libs/pylama/config.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ def parse_linters(csp_str):
128128
if linter:
129129
result.append((name, linter))
130130
else:
131-
logging.warn("Linter `%s` not found." % name)
131+
logging.warn("Linter `%s` not found.", name)
132132
return result
133133

134134
parser.add_argument(

pymode/libs/pylama/core.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
"""
66
import logging
77
import re
8+
import sys
89
from .lint.extensions import LINTERS
910

1011
#: The skip pattern
@@ -16,7 +17,7 @@
1617

1718
# Setup a logger
1819
LOGGER = logging.getLogger('pylama')
19-
STREAM = logging.StreamHandler()
20+
STREAM = logging.StreamHandler(sys.stdout)
2021
LOGGER.addHandler(STREAM)
2122

2223

@@ -175,6 +176,9 @@ def __enter__(self):
175176
self.code = self._file.read() + '\n\n'
176177
return self
177178

178-
def __exit__(self):
179+
def __exit__(self, t, value, traceback):
179180
if not self._file is None:
180181
self._file.close()
182+
183+
if t and LOGGER.level == logging.DEBUG:
184+
LOGGER.debug(traceback)

pymode/lint.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,10 @@ def code_check():
3131
env.stop()
3232
return False
3333

34+
if env.options.get('debug'):
35+
from pylama.core import LOGGER, logging
36+
LOGGER.setLevel(logging.DEBUG)
37+
3438
with silence_stderr():
3539
errors = check_path(path, options=options, code=env.source)
3640

pymode/rope.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ def look_ropeproject(path):
2323
:return str|None: A finded path
2424
2525
"""
26+
env.debug('Look project', path)
2627
p = os.path.abspath(path)
2728

2829
while True:
@@ -31,7 +32,7 @@ def look_ropeproject(path):
3132

3233
new_p = os.path.abspath(os.path.join(p, ".."))
3334
if new_p == p:
34-
return '.'
35+
return path
3536

3637
p = new_p
3738

@@ -279,7 +280,8 @@ def get_ctx(*args, **kwargs):
279280
if resources.get(path):
280281
return resources.get(path)
281282

282-
project_path = os.path.dirname(env.curdir)
283+
project_path = env.curdir
284+
env.debug('Look ctx', project_path)
283285
if env.var('g:pymode_rope_lookup_project', True):
284286
project_path = look_ropeproject(project_path)
285287

@@ -353,8 +355,10 @@ def __init__(self, path, project_path):
353355
self.generate_autoimport_cache()
354356

355357
env.debug('Context init', project_path)
358+
env.message('Init Rope project: %s' % project_path)
356359

357360
def __enter__(self):
361+
env.let('g:pymode_rope_current', self.project.root.real_path)
358362
self.project.validate(self.project.root)
359363
self.resource = libutils.path_to_resource(
360364
self.project, env.curbuf.name, 'file')

pymode/utils.py

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,18 @@
2121
def silence_stderr():
2222
""" Redirect stderr. """
2323

24-
with threading.Lock():
25-
stderr = sys.stderr
26-
sys.stderr = StringIO()
24+
if DEBUG:
25+
yield
2726

28-
yield
27+
else:
28+
with threading.Lock():
29+
stderr = sys.stderr
30+
sys.stderr = StringIO()
31+
32+
yield
2933

30-
with threading.Lock():
31-
sys.stderr = stderr
34+
with threading.Lock():
35+
sys.stderr = stderr
3236

3337

3438
def patch_paths():

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy