Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3)

Unified Diff: tools-webrtc/vim/webrtc.ycm_extra_conf.py

Issue 2812273002: Fix lint errors to enable stricter PyLint rules (Closed)
Patch Set: Rebased Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tools-webrtc/ios/generate_licenses.py ('k') | webrtc/audio/test/unittests/low_bandwidth_audio_test_test.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools-webrtc/vim/webrtc.ycm_extra_conf.py
diff --git a/tools-webrtc/vim/webrtc.ycm_extra_conf.py b/tools-webrtc/vim/webrtc.ycm_extra_conf.py
index b716e45060f2e34f45ff2b658ad26445c7886e1b..e954639f8d50939ad8b6832b732f21d4d9f0e689 100644
--- a/tools-webrtc/vim/webrtc.ycm_extra_conf.py
+++ b/tools-webrtc/vim/webrtc.ycm_extra_conf.py
@@ -61,16 +61,16 @@ import subprocess
import sys
# Flags from YCM's default config.
-_default_flags = [
+_DEFAULT_FLAGS = [
'-DUSE_CLANG_COMPLETER',
'-std=c++11',
'-x',
'c++',
]
-_header_alternates = ('.cc', '.cpp', '.c', '.mm', '.m')
+_HEADER_ALTERNATES = ('.cc', '.cpp', '.c', '.mm', '.m')
-_extension_flags = {
+_EXTENSION_FLAGS = {
'.m': ['-x', 'objective-c'],
'.mm': ['-x', 'objective-c++'],
}
@@ -302,7 +302,7 @@ def GetClangOptionsFromNinjaForFilename(webrtc_root, filename):
basename, extension = os.path.splitext(filename)
if extension == '.h':
- candidates = [basename + ext for ext in _header_alternates]
+ candidates = [basename + ext for ext in _HEADER_ALTERNATES]
else:
candidates = [filename]
@@ -314,7 +314,7 @@ def GetClangOptionsFromNinjaForFilename(webrtc_root, filename):
buildable_extension = os.path.splitext(candidate)[1]
break
- additional_flags += _extension_flags.get(buildable_extension, [])
+ additional_flags += _EXTENSION_FLAGS.get(buildable_extension, [])
if not clang_line:
# If ninja didn't know about filename or it's companion files, then try a
@@ -349,7 +349,7 @@ def FlagsForFile(filename):
# determine the flags again.
should_cache_flags_for_file = bool(clang_flags)
- final_flags = _default_flags + clang_flags
+ final_flags = _DEFAULT_FLAGS + clang_flags
return {
'flags': final_flags,
« no previous file with comments | « tools-webrtc/ios/generate_licenses.py ('k') | webrtc/audio/test/unittests/low_bandwidth_audio_test_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698