Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit41999ff

Browse files
committed
Merge branch 'release/0.7.6b'
2 parents4adc34e +f859a61 commit41999ff

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-
letg:pymode_version="0.7.5b"
2+
letg:pymode_version="0.7.6b"
33

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

150+
" System plugin variable
151+
callpymode#default('g:pymode_rope_current','')
152+
150153
" If project hasnt been finded in current working directory, look at parents directory
151154
callpymode#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
iflinter:
129129
result.append((name,linter))
130130
else:
131-
logging.warn("Linter `%s` not found."%name)
131+
logging.warn("Linter `%s` not found.",name)
132132
returnresult
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
importlogging
77
importre
8+
importsys
89
from .lint.extensionsimportLINTERS
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
returnself
177178

178-
def__exit__(self):
179+
def__exit__(self,t,value,traceback):
179180
ifnotself._fileisNone:
180181
self._file.close()
182+
183+
iftandLOGGER.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
returnFalse
3333

34+
ifenv.options.get('debug'):
35+
frompylama.coreimportLOGGER,logging
36+
LOGGER.setLevel(logging.DEBUG)
37+
3438
withsilence_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
whileTrue:
@@ -31,7 +32,7 @@ def look_ropeproject(path):
3132

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

3637
p=new_p
3738

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

282-
project_path=os.path.dirname(env.curdir)
283+
project_path=env.curdir
284+
env.debug('Look ctx',project_path)
283285
ifenv.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
defsilence_stderr():
2222
""" Redirect stderr. """
2323

24-
withthreading.Lock():
25-
stderr=sys.stderr
26-
sys.stderr=StringIO()
24+
ifDEBUG:
25+
yield
2726

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

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

3337

3438
defpatch_paths():

‎t/rope.vim

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
letg:pymode_rope_completion_bind='X'
22
letg:pymode_rope_autoimport=0
33
letg:pymode_debug=1
4+
letg:pymode_rope_lookup_project=0
45

56
sourceplugin/pymode.vim
67

@@ -16,10 +17,12 @@ describe 'pymode-plugin'
1617
end
1718

1819
it'pymode rope auto open project in current working directory'
19-
let project_path='.ropeproject'
20+
let project_path=getcwd() .'/.ropeproject'
2021
Expectisdirectory(project_path)==0
2122
normal oimporX
2223
Expectgetline('.')=='import'
24+
Expectg:pymode_rope_current==getcwd() .'/'
25+
Expectg:pymode_rope_current .'.ropeproject'== project_path
2326
Expectisdirectory(project_path)==1
2427
end
2528

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp