💄 Fix violations against pylint.
This commit is contained in:
parent
c029ff2055
commit
ef8a05be38
8 changed files with 16 additions and 22 deletions
|
@ -1,12 +1,11 @@
|
|||
#!/usr/bin/env python
|
||||
|
||||
import argparse
|
||||
import errno
|
||||
import os
|
||||
import subprocess
|
||||
import sys
|
||||
|
||||
from lib.util import *
|
||||
from lib.util import scoped_cwd
|
||||
|
||||
|
||||
SOURCE_ROOT = os.path.abspath(os.path.dirname(os.path.dirname(__file__)))
|
||||
|
@ -68,7 +67,7 @@ def update_apm():
|
|||
|
||||
def update_node_modules():
|
||||
for dirname in ['.', 'browser/default_app', 'spec']:
|
||||
update_node_modules_for_dir(dirname);
|
||||
update_node_modules_for_dir(dirname)
|
||||
|
||||
|
||||
def update_node_modules_for_dir(dirname):
|
||||
|
|
|
@ -4,8 +4,6 @@ import os
|
|||
import subprocess
|
||||
import sys
|
||||
|
||||
from lib.util import *
|
||||
|
||||
|
||||
SOURCE_ROOT = os.path.dirname(os.path.dirname(__file__))
|
||||
|
||||
|
@ -22,5 +20,6 @@ def main():
|
|||
else:
|
||||
subprocess.check_call(['node', coffee, '-c', '-o', output_dir, input_file])
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
sys.exit(main())
|
||||
|
|
2
script/cpplint.py
vendored
2
script/cpplint.py
vendored
|
@ -31,7 +31,7 @@ def main():
|
|||
def list_files(directories, filters):
|
||||
matches = []
|
||||
for directory in directories:
|
||||
for root, dirs, filenames, in os.walk(directory):
|
||||
for root, _, filenames, in os.walk(directory):
|
||||
for f in filters:
|
||||
for filename in fnmatch.filter(filenames, f):
|
||||
matches.append(os.path.join(root, filename))
|
||||
|
|
|
@ -1,14 +1,13 @@
|
|||
#!/usr/bin/env python
|
||||
|
||||
import errno
|
||||
import glob
|
||||
import os
|
||||
import shutil
|
||||
import subprocess
|
||||
import sys
|
||||
import tarfile
|
||||
|
||||
from lib.util import *
|
||||
from lib.util import scoped_cwd, rm_rf, get_atom_shell_version, make_zip, \
|
||||
safe_mkdir
|
||||
|
||||
|
||||
ATOM_SHELL_VRESION = get_atom_shell_version()
|
||||
|
@ -79,7 +78,7 @@ def main():
|
|||
|
||||
def force_build():
|
||||
build = os.path.join(SOURCE_ROOT, 'script', 'build.py')
|
||||
subprocess.check_call([sys.executable, build, '-c', 'Release']);
|
||||
subprocess.check_call([sys.executable, build, '-c', 'Release'])
|
||||
|
||||
|
||||
def copy_binaries():
|
||||
|
@ -99,7 +98,7 @@ def copy_headers():
|
|||
# Copy standard node headers from node. repository.
|
||||
for include_path in HEADERS_DIRS:
|
||||
abs_path = os.path.join(NODE_DIR, include_path)
|
||||
for dirpath, dirnames, filenames in os.walk(abs_path):
|
||||
for dirpath, _, filenames in os.walk(abs_path):
|
||||
for filename in filenames:
|
||||
extension = os.path.splitext(filename)[1]
|
||||
if extension not in HEADERS_SUFFIX:
|
||||
|
@ -111,7 +110,7 @@ def copy_headers():
|
|||
# Copy V8 headers from chromium's repository.
|
||||
src = os.path.join(SOURCE_ROOT, 'vendor', 'brightray', 'vendor', 'download',
|
||||
'libchromiumcontent', 'src')
|
||||
for dirpath, dirnames, filenames in os.walk(os.path.join(src, 'v8')):
|
||||
for dirpath, _, filenames in os.walk(os.path.join(src, 'v8')):
|
||||
for filename in filenames:
|
||||
extension = os.path.splitext(filename)[1]
|
||||
if extension not in HEADERS_SUFFIX:
|
||||
|
@ -122,8 +121,7 @@ def copy_headers():
|
|||
|
||||
|
||||
def copy_license():
|
||||
license = os.path.join(SOURCE_ROOT, 'LICENSE')
|
||||
shutil.copy2(license, DIST_DIR)
|
||||
shutil.copy2(os.path.join(SOURCE_ROOT, 'LICENSE'), DIST_DIR)
|
||||
|
||||
|
||||
def create_version():
|
||||
|
|
|
@ -17,7 +17,7 @@ class GitHub:
|
|||
def __getattr__(self, attr):
|
||||
return _Callable(self, '/%s' % attr)
|
||||
|
||||
def _http(self, method, path, **kw):
|
||||
def send(self, method, path, **kw):
|
||||
if not 'headers' in kw:
|
||||
kw['headers'] = dict()
|
||||
headers = kw['headers']
|
||||
|
@ -47,7 +47,7 @@ class _Executable:
|
|||
self._path = path
|
||||
|
||||
def __call__(self, **kw):
|
||||
return self._gh._http(self._method, self._path, **kw)
|
||||
return self._gh.send(self._method, self._path, **kw)
|
||||
|
||||
|
||||
class _Callable(object):
|
||||
|
|
|
@ -3,11 +3,11 @@
|
|||
import sys
|
||||
import os
|
||||
|
||||
from lib.util import *
|
||||
from lib.util import safe_mkdir, extract_zip, tempdir, download
|
||||
|
||||
|
||||
SOURCE_ROOT = os.path.abspath(os.path.dirname(os.path.dirname(__file__)))
|
||||
FRAMEWORKS_URL='https://gh-contractor-zcbenz.s3.amazonaws.com/frameworks'
|
||||
FRAMEWORKS_URL = 'https://gh-contractor-zcbenz.s3.amazonaws.com/frameworks'
|
||||
|
||||
|
||||
def main():
|
||||
|
|
|
@ -1,10 +1,9 @@
|
|||
#!/usr/bin/env python
|
||||
|
||||
import os
|
||||
import subprocess
|
||||
import sys
|
||||
|
||||
from lib.util import *
|
||||
|
||||
|
||||
SOURCE_ROOT = os.path.abspath(os.path.dirname(os.path.dirname(__file__)))
|
||||
|
||||
|
|
|
@ -4,12 +4,11 @@ import argparse
|
|||
import errno
|
||||
import glob
|
||||
import os
|
||||
import requests
|
||||
import subprocess
|
||||
import sys
|
||||
import tempfile
|
||||
|
||||
from lib.util import *
|
||||
from lib.util import get_atom_shell_version, scoped_cwd, safe_mkdir
|
||||
from lib.github import GitHub
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue