commit ca69ff89a3cf695c77805aa0dff946cde73df770 Author: Kenneth Benzie (Benie) Date: Fri Aug 24 17:30:18 2018 +0100 Add python config files and .conduit.yaml * Add pylint config file * Add flake8 config file * Add ipython config file diff --git a/.conduit.yaml b/.conduit.yaml new file mode 100644 index 0000000..a10df84 --- /dev/null +++ b/.conduit.yaml @@ -0,0 +1,6 @@ +--- +- location: ~/.config/python +- symlink: + - {src: flake8, dst: ~/.config/flake8} + - {src: pylintrc, dst: ~/.pylintrc} + - {src: ipython_config.py, dst: ~/.ipython/profile_default/ipython_config.py} diff --git a/flake8 b/flake8 new file mode 100644 index 0000000..8eac1b9 --- /dev/null +++ b/flake8 @@ -0,0 +1,2 @@ +[flake8] +ignore = E122 W503 diff --git a/ipython_config.py b/ipython_config.py new file mode 100644 index 0000000..0046e22 --- /dev/null +++ b/ipython_config.py @@ -0,0 +1,614 @@ +# Configuration file for ipython. + +#------------------------------------------------------------------------------ +# Configurable configuration +#------------------------------------------------------------------------------ + +#------------------------------------------------------------------------------ +# InteractiveShellApp configuration +#------------------------------------------------------------------------------ + +# A Mixin for applications that start InteractiveShell instances. +# +# Provides configurables for loading extensions and executing files as part of +# configuring a Shell environment. +# +# The following methods should be called by the :meth:`initialize` method of the +# subclass: +# +# - :meth:`init_path` +# - :meth:`init_shell` (to be implemented by the subclass) +# - :meth:`init_gui_pylab` +# - :meth:`init_extensions` +# - :meth:`init_code` + +# Execute the given command string. +# c.InteractiveShellApp.code_to_run = '' + +# Run the file referenced by the PYTHONSTARTUP environment variable at IPython +# startup. +# c.InteractiveShellApp.exec_PYTHONSTARTUP = True + +# List of files to run at IPython startup. +# c.InteractiveShellApp.exec_files = [] + +# lines of code to run at IPython startup. +# c.InteractiveShellApp.exec_lines = [] + +# A list of dotted module names of IPython extensions to load. +# c.InteractiveShellApp.extensions = [] + +# dotted module name of an IPython extension to load. +# c.InteractiveShellApp.extra_extension = '' + +# A file to be run +# c.InteractiveShellApp.file_to_run = '' + +# Enable GUI event loop integration with any of ('glut', 'gtk', 'gtk3', 'osx', +# 'pyglet', 'qt', 'qt5', 'tk', 'wx'). +# c.InteractiveShellApp.gui = None + +# Should variables loaded at startup (by startup files, exec_lines, etc.) be +# hidden from tools like %who? +# c.InteractiveShellApp.hide_initial_ns = True + +# Configure matplotlib for interactive use with the default matplotlib backend. +# c.InteractiveShellApp.matplotlib = None + +# Run the module as a script. +# c.InteractiveShellApp.module_to_run = '' + +# Pre-load matplotlib and numpy for interactive use, selecting a particular +# matplotlib backend and loop integration. +# c.InteractiveShellApp.pylab = None + +# If true, IPython will populate the user namespace with numpy, pylab, etc. and +# an ``import *`` is done from numpy and pylab, when using pylab mode. +# +# When False, pylab mode should not import any names into the user namespace. +# c.InteractiveShellApp.pylab_import_all = True + +# Reraise exceptions encountered loading IPython extensions? +# c.InteractiveShellApp.reraise_ipython_extension_failures = False + +#------------------------------------------------------------------------------ +# LoggingConfigurable configuration +#------------------------------------------------------------------------------ + +# A parent class for Configurables that log. +# +# Subclasses have a log trait, and the default behavior is to get the logger +# from the currently running Application. + +#------------------------------------------------------------------------------ +# SingletonConfigurable configuration +#------------------------------------------------------------------------------ + +# A configurable that only allows one instance. +# +# This class is for classes that should only have one instance of itself or +# *any* subclass. To create and retrieve such a class use the +# :meth:`SingletonConfigurable.instance` method. + +#------------------------------------------------------------------------------ +# Application configuration +#------------------------------------------------------------------------------ + +# This is an application. + +# The date format used by logging formatters for %(asctime)s +# c.Application.log_datefmt = '%Y-%m-%d %H:%M:%S' + +# The Logging format template +# c.Application.log_format = '[%(name)s]%(highlevel)s %(message)s' + +# Set the log level by value or name. +# c.Application.log_level = 30 + +#------------------------------------------------------------------------------ +# BaseIPythonApplication configuration +#------------------------------------------------------------------------------ + +# IPython: an enhanced interactive Python shell. + +# Whether to create profile dir if it doesn't exist +# c.BaseIPythonApplication.auto_create = False + +# Whether to install the default config files into the profile dir. If a new +# profile is being created, and IPython contains config files for that profile, +# then they will be staged into the new directory. Otherwise, default config +# files will be automatically generated. +# c.BaseIPythonApplication.copy_config_files = False + +# Path to an extra config file to load. +# +# If specified, load this config file in addition to any other IPython config. +# c.BaseIPythonApplication.extra_config_file = u'' + +# The name of the IPython directory. This directory is used for logging +# configuration (through profiles), history storage, etc. The default is usually +# $HOME/.ipython. This option can also be specified through the environment +# variable IPYTHONDIR. +# c.BaseIPythonApplication.ipython_dir = u'' + +# Whether to overwrite existing config files when copying +# c.BaseIPythonApplication.overwrite = False + +# The IPython profile to use. +# c.BaseIPythonApplication.profile = u'default' + +# Create a massive crash report when IPython encounters what may be an internal +# error. The default is to append a short message to the usual traceback +# c.BaseIPythonApplication.verbose_crash = False + +#------------------------------------------------------------------------------ +# TerminalIPythonApp configuration +#------------------------------------------------------------------------------ + +# Whether to display a banner upon starting IPython. +# c.TerminalIPythonApp.display_banner = True + +# If a command or file is given via the command-line, e.g. 'ipython foo.py', +# start an interactive shell after executing the file or command. +# c.TerminalIPythonApp.force_interact = False + +# Start IPython quickly by skipping the loading of config files. +# c.TerminalIPythonApp.quick = False + +#------------------------------------------------------------------------------ +# InteractiveShell configuration +#------------------------------------------------------------------------------ + +# An enhanced, interactive shell for Python. + +# 'all', 'last', 'last_expr' or 'none', specifying which nodes should be run +# interactively (displaying output from expressions). +# c.InteractiveShell.ast_node_interactivity = 'last_expr' + +# A list of ast.NodeTransformer subclass instances, which will be applied to +# user input before code is run. +# c.InteractiveShell.ast_transformers = [] + +# Make IPython automatically call any callable object even if you didn't type +# explicit parentheses. For example, 'str 43' becomes 'str(43)' automatically. +# The value can be '0' to disable the feature, '1' for 'smart' autocall, where +# it is not applied if there are no more arguments on the line, and '2' for +# 'full' autocall, where all callable objects are automatically called (even if +# no arguments are present). +# c.InteractiveShell.autocall = 0 + +# Autoindent IPython code entered interactively. +# c.InteractiveShell.autoindent = True + +# Enable magic commands to be called without the leading %. +# c.InteractiveShell.automagic = True + +# The part of the banner to be printed before the profile +# c.InteractiveShell.banner1 = 'Python 2.7.10 (default, Oct 23 2015, 19:19:21) \nType "copyright", "credits" or "license" for more information.\n\nIPython 5.0.0 -- An enhanced Interactive Python.\n? -> Introduction and overview of IPython\'s features.\n%quickref -> Quick reference.\nhelp -> Python\'s own help system.\nobject? -> Details about \'object\', use \'object??\' for extra details.\n' + +# The part of the banner to be printed after the profile +# c.InteractiveShell.banner2 = '' + +# Set the size of the output cache. The default is 1000, you can change it +# permanently in your config file. Setting it to 0 completely disables the +# caching system, and the minimum value accepted is 20 (if you provide a value +# less than 20, it is reset to 0 and a warning is issued). This limit is +# defined because otherwise you'll spend more time re-flushing a too small cache +# than working +# c.InteractiveShell.cache_size = 1000 + +# Use colors for displaying information about objects. Because this information +# is passed through a pager (like 'less'), and some pagers get confused with +# color codes, this capability can be turned off. +# c.InteractiveShell.color_info = True + +# Set the color scheme (NoColor, Neutral, Linux, or LightBG). +# c.InteractiveShell.colors = 'Neutral' + +# +# c.InteractiveShell.debug = False + +# **Deprecated** +# +# Will be removed in IPython 6.0 +# +# Enable deep (recursive) reloading by default. IPython can use the deep_reload +# module which reloads changes in modules recursively (it replaces the reload() +# function, so you don't need to change anything to use it). `deep_reload` +# forces a full reload of modules whose code may have changed, which the default +# reload() function does not. When deep_reload is off, IPython will use the +# normal reload(), but deep_reload will still be available as dreload(). +# c.InteractiveShell.deep_reload = False + +# Don't call post-execute functions that have failed in the past. +# c.InteractiveShell.disable_failing_post_execute = False + +# If True, anything that would be passed to the pager will be displayed as +# regular output instead. +# c.InteractiveShell.display_page = False + +# (Provisional API) enables html representation in mime bundles sent to pagers. +# c.InteractiveShell.enable_html_pager = False + +# Total length of command history +# c.InteractiveShell.history_length = 10000 + +# The number of saved history entries to be loaded into the history buffer at +# startup. +# c.InteractiveShell.history_load_length = 1000 + +# +# c.InteractiveShell.ipython_dir = '' + +# Start logging to the given file in append mode. Use `logfile` to specify a log +# file to **overwrite** logs to. +# c.InteractiveShell.logappend = '' + +# The name of the logfile to use. +# c.InteractiveShell.logfile = '' + +# Start logging to the default log file in overwrite mode. Use `logappend` to +# specify a log file to **append** logs to. +# c.InteractiveShell.logstart = False + +# +# c.InteractiveShell.object_info_string_level = 0 + +# Automatically call the pdb debugger after every exception. +# c.InteractiveShell.pdb = False + +# Deprecated since IPython 4.0 and ignored since 5.0, set +# TerminalInteractiveShell.prompts object directly. +# c.InteractiveShell.prompt_in1 = 'In [\\#]: ' + +# Deprecated since IPython 4.0 and ignored since 5.0, set +# TerminalInteractiveShell.prompts object directly. +# c.InteractiveShell.prompt_in2 = ' .\\D.: ' + +# Deprecated since IPython 4.0 and ignored since 5.0, set +# TerminalInteractiveShell.prompts object directly. +# c.InteractiveShell.prompt_out = 'Out[\\#]: ' + +# Deprecated since IPython 4.0 and ignored since 5.0, set +# TerminalInteractiveShell.prompts object directly. +# c.InteractiveShell.prompts_pad_left = True + +# +# c.InteractiveShell.quiet = False + +# +# c.InteractiveShell.separate_in = '\n' + +# +# c.InteractiveShell.separate_out = '' + +# +# c.InteractiveShell.separate_out2 = '' + +# Show rewritten input, e.g. for autocall. +# c.InteractiveShell.show_rewritten_input = True + +# Enables rich html representation of docstrings. (This requires the docrepr +# module). +# c.InteractiveShell.sphinxify_docstring = False + +# +# c.InteractiveShell.wildcards_case_sensitive = True + +# +# c.InteractiveShell.xmode = 'Context' + +#------------------------------------------------------------------------------ +# TerminalInteractiveShell configuration +#------------------------------------------------------------------------------ + +# Set to confirm when you try to exit IPython with an EOF (Control-D in Unix, +# Control-Z/Enter in Windows). By typing 'exit' or 'quit', you can force a +# direct exit without any confirmation. +# c.TerminalInteractiveShell.confirm_exit = True + +# +# c.TerminalInteractiveShell.display_completions = 'multicolumn' + +# DEPRECATED +# c.TerminalInteractiveShell.display_completions_in_columns = None + +# Shortcut style to use at the prompt. 'vi' or 'emacs'. +c.TerminalInteractiveShell.editing_mode = 'vi' + +# Set the editor used by IPython (default to $EDITOR/vi/notepad). +# c.TerminalInteractiveShell.editor = 'vi' + +# Highlight matching brackets . +# c.TerminalInteractiveShell.highlight_matching_brackets = True + +# The name of a Pygments style to use for syntax highlighting: manni, igor, +# lovelace, xcode, vim, autumn, vs, rrt, native, perldoc, borland, tango, emacs, +# friendly, monokai, paraiso-dark, colorful, murphy, bw, pastie, algol_nu, +# paraiso-light, trac, default, algol, fruity +# c.TerminalInteractiveShell.highlighting_style = 'legacy' + +# Override highlighting format for specific tokens +# c.TerminalInteractiveShell.highlighting_style_overrides = {} + +# Enable mouse support in the prompt +# c.TerminalInteractiveShell.mouse_support = False + +# Class used to generate Prompt token for prompt_toolkit +# c.TerminalInteractiveShell.prompts_class = 'IPython.terminal.prompts.Prompts' + +# Use `raw_input` for the REPL, without completion, multiline input, and prompt +# colors. +# +# Useful when controlling IPython as a subprocess, and piping STDIN/OUT/ERR. +# Known usage are: IPython own testing machinery, and emacs inferior-shell +# integration through elpy. +# +# This mode default to `True` if the `IPY_TEST_SIMPLE_PROMPT` environment +# variable is set, or the current terminal is not a tty. +# c.TerminalInteractiveShell.simple_prompt = False + +# Number of line at the bottom of the screen to reserve for the completion menu +# c.TerminalInteractiveShell.space_for_menu = 6 + +# Automatically set the terminal title +# c.TerminalInteractiveShell.term_title = True + +#------------------------------------------------------------------------------ +# HistoryAccessorBase configuration +#------------------------------------------------------------------------------ + +# An abstract class for History Accessors + +#------------------------------------------------------------------------------ +# HistoryAccessor configuration +#------------------------------------------------------------------------------ + +# Access the history database without adding to it. +# +# This is intended for use by standalone history tools. IPython shells use +# HistoryManager, below, which is a subclass of this. + +# Options for configuring the SQLite connection +# +# These options are passed as keyword args to sqlite3.connect when establishing +# database conenctions. +# c.HistoryAccessor.connection_options = {} + +# enable the SQLite history +# +# set enabled=False to disable the SQLite history, in which case there will be +# no stored history, no SQLite connection, and no background saving thread. +# This may be necessary in some threaded environments where IPython is embedded. +# c.HistoryAccessor.enabled = True + +# Path to file to use for SQLite history database. +# +# By default, IPython will put the history database in the IPython profile +# directory. If you would rather share one history among profiles, you can set +# this value in each, so that they are consistent. +# +# Due to an issue with fcntl, SQLite is known to misbehave on some NFS mounts. +# If you see IPython hanging, try setting this to something on a local disk, +# e.g:: +# +# ipython --HistoryManager.hist_file=/tmp/ipython_hist.sqlite +# +# you can also use the specific value `:memory:` (including the colon at both +# end but not the back ticks), to avoid creating an history file. +# c.HistoryAccessor.hist_file = u'' + +#------------------------------------------------------------------------------ +# HistoryManager configuration +#------------------------------------------------------------------------------ + +# A class to organize all history-related functionality in one place. + +# Write to database every x commands (higher values save disk access & power). +# Values of 1 or less effectively disable caching. +# c.HistoryManager.db_cache_size = 0 + +# Should the history database include output? (default: no) +# c.HistoryManager.db_log_output = False + +#------------------------------------------------------------------------------ +# ProfileDir configuration +#------------------------------------------------------------------------------ + +# An object to manage the profile directory and its resources. +# +# The profile directory is used by all IPython applications, to manage +# configuration, logging and security. +# +# This object knows how to find, create and manage these directories. This +# should be used by any code that wants to handle profiles. + +# Set the profile location directly. This overrides the logic used by the +# `profile` option. +# c.ProfileDir.location = u'' + +#------------------------------------------------------------------------------ +# BaseFormatter configuration +#------------------------------------------------------------------------------ + +# A base formatter class that is configurable. +# +# This formatter should usually be used as the base class of all formatters. It +# is a traited :class:`Configurable` class and includes an extensible API for +# users to determine how their objects are formatted. The following logic is +# used to find a function to format an given object. +# +# 1. The object is introspected to see if it has a method with the name +# :attr:`print_method`. If is does, that object is passed to that method +# for formatting. +# 2. If no print method is found, three internal dictionaries are consulted +# to find print method: :attr:`singleton_printers`, :attr:`type_printers` +# and :attr:`deferred_printers`. +# +# Users should use these dictionaries to register functions that will be used to +# compute the format data for their objects (if those objects don't have the +# special print methods). The easiest way of using these dictionaries is through +# the :meth:`for_type` and :meth:`for_type_by_name` methods. +# +# If no function/callable is found to compute the format data, ``None`` is +# returned and this format type is not used. + +# +# c.BaseFormatter.deferred_printers = {} + +# +# c.BaseFormatter.enabled = True + +# +# c.BaseFormatter.singleton_printers = {} + +# +# c.BaseFormatter.type_printers = {} + +#------------------------------------------------------------------------------ +# PlainTextFormatter configuration +#------------------------------------------------------------------------------ + +# The default pretty-printer. +# +# This uses :mod:`IPython.lib.pretty` to compute the format data of the object. +# If the object cannot be pretty printed, :func:`repr` is used. See the +# documentation of :mod:`IPython.lib.pretty` for details on how to write pretty +# printers. Here is a simple example:: +# +# def dtype_pprinter(obj, p, cycle): +# if cycle: +# return p.text('dtype(...)') +# if hasattr(obj, 'fields'): +# if obj.fields is None: +# p.text(repr(obj)) +# else: +# p.begin_group(7, 'dtype([') +# for i, field in enumerate(obj.descr): +# if i > 0: +# p.text(',') +# p.breakable() +# p.pretty(field) +# p.end_group(7, '])') + +# +# c.PlainTextFormatter.float_precision = '' + +# Truncate large collections (lists, dicts, tuples, sets) to this size. +# +# Set to 0 to disable truncation. +# c.PlainTextFormatter.max_seq_length = 1000 + +# +# c.PlainTextFormatter.max_width = 79 + +# +# c.PlainTextFormatter.newline = '\n' + +# +# c.PlainTextFormatter.pprint = True + +# +# c.PlainTextFormatter.verbose = False + +#------------------------------------------------------------------------------ +# Completer configuration +#------------------------------------------------------------------------------ + +# Activate greedy completion PENDING DEPRECTION. this is now mostly taken care +# of with Jedi. +# +# This will enable completion on elements of lists, results of function calls, +# etc., but can be unsafe because the code is actually evaluated on TAB. +# c.Completer.greedy = False + +#------------------------------------------------------------------------------ +# IPCompleter configuration +#------------------------------------------------------------------------------ + +# Extension of the completer class with IPython-specific features + +# DEPRECATED as of version 5.0. +# +# Instruct the completer to use __all__ for the completion +# +# Specifically, when completing on ``object.``. +# +# When True: only those names in obj.__all__ will be included. +# +# When False [default]: the __all__ attribute is ignored +# c.IPCompleter.limit_to__all__ = False + +# Whether to merge completion results into a single list +# +# If False, only the completion results from the first non-empty completer will +# be returned. +# c.IPCompleter.merge_completions = True + +# Instruct the completer to omit private method names +# +# Specifically, when completing on ``object.``. +# +# When 2 [default]: all names that start with '_' will be excluded. +# +# When 1: all 'magic' names (``__foo__``) will be excluded. +# +# When 0: nothing will be excluded. +# c.IPCompleter.omit__names = 2 + +#------------------------------------------------------------------------------ +# Magics configuration +#------------------------------------------------------------------------------ + +# Base class for implementing magic functions. +# +# Shell functions which can be reached as %function_name. All magic functions +# should accept a string, which they can parse for their own needs. This can +# make some functions easier to type, eg `%cd ../` vs. `%cd("../")` +# +# Classes providing magic functions need to subclass this class, and they MUST: +# +# - Use the method decorators `@line_magic` and `@cell_magic` to decorate +# individual methods as magic functions, AND +# +# - Use the class decorator `@magics_class` to ensure that the magic +# methods are properly registered at the instance level upon instance +# initialization. +# +# See :mod:`magic_functions` for examples of actual implementation classes. + +#------------------------------------------------------------------------------ +# ScriptMagics configuration +#------------------------------------------------------------------------------ + +# Magics for talking to scripts +# +# This defines a base `%%script` cell magic for running a cell with a program in +# a subprocess, and registers a few top-level magics that call %%script with +# common interpreters. + +# Extra script cell magics to define +# +# This generates simple wrappers of `%%script foo` as `%%foo`. +# +# If you want to add script magics that aren't on your path, specify them in +# script_paths +# c.ScriptMagics.script_magics = [] + +# Dict mapping short 'ruby' names to full paths, such as '/opt/secret/bin/ruby' +# +# Only necessary for items in script_magics where the default path will not find +# the right interpreter. +# c.ScriptMagics.script_paths = {} + +#------------------------------------------------------------------------------ +# StoreMagics configuration +#------------------------------------------------------------------------------ + +# Lightweight persistence for python variables. +# +# Provides the %store magic. + +# If True, any %store-d variables will be automatically restored when IPython +# starts. +# c.StoreMagics.autorestore = False diff --git a/pylintrc b/pylintrc new file mode 100644 index 0000000..457f1a6 --- /dev/null +++ b/pylintrc @@ -0,0 +1,425 @@ +[MASTER] + +# A comma-separated list of package or module names from where C extensions may +# be loaded. Extensions are loading into the active Python interpreter and may +# run arbitrary code +extension-pkg-whitelist= + +# Add files or directories to the blacklist. They should be base names, not +# paths. +ignore=CVS + +# Add files or directories matching the regex patterns to the blacklist. The +# regex matches against base names, not paths. +ignore-patterns= + +# Python code to execute, usually for sys.path manipulation such as +# pygtk.require(). +#init-hook= + +# Use multiple processes to speed up Pylint. +jobs=1 + +# List of plugins (as comma separated values of python modules names) to load, +# usually to register additional checkers. +load-plugins= + +# Pickle collected data for later comparisons. +persistent=yes + +# Specify a configuration file. +#rcfile= + +# Allow loading of arbitrary C extensions. Extensions are imported into the +# active Python interpreter and may run arbitrary code. +unsafe-load-any-extension=no + + +[MESSAGES CONTROL] + +# Only show warnings with the listed confidence levels. Leave empty to show +# all. Valid levels: HIGH, INFERENCE, INFERENCE_FAILURE, UNDEFINED +confidence= + +# Disable the message, report, category or checker with the given id(s). You +# can either give multiple identifiers separated by comma (,) or put this +# option multiple times (only on the command line, not in the configuration +# file where it should appear only once).You can also use "--disable=all" to +# disable everything first and then reenable specific checks. For example, if +# you want to run only the similarities checker, you can use "--disable=all +# --enable=similarities". If you want to run only the classes checker, but have +# no Warning level messages displayed, use"--disable=all --enable=classes +# --disable=W" +disable=apply-builtin,backtick,bad-continuation,bad-inline-option,bad-python3-import,basestring-builtin,buffer-builtin,cmp-builtin,cmp-method,coerce-builtin,coerce-method,delslice-method,deprecated-pragma,deprecated-str-translate-call,deprecated-string-function,dict-iter-method,dict-view-method,disable=print-statement,div-method,eq-without-hash,exception-message-attribute,execfile-builtin,file-builtin,file-ignored,filter-builtin-not-iterating,getslice-method,hex-method,idiv-method,import-error,import-star-module-level,indexing-exception,input-builtin,intern-builtin,invalid-name,invalid-str-codec,len-as-condition,locally-disabled,locally-enabled,long-builtin,long-suffix,map-builtin-not-iterating,metaclass-assignment,next-method-called,no-absolute-import,nonzero-method,oct-method,old-division,old-ne-operator,old-octal-literal,old-raise-syntax,parameter-unpacking,raising-string,range-builtin-not-iterating,raw-checker-failed,raw_input-builtin,rdiv-method,redefined-builtin,redefined-outer-name,reduce-builtin,reload-builtin,round-builtin,setslice-method,standarderror-builtin,suppressed-message,sys-max-int,too-few-public-methods,too-many-branches,too-many-locals,unichr-builtin,unicode-builtin,unpacking-in-except,unused-import,useless-suppression,using-cmp-argument,xrange-builtin,zip-builtin-not-iterating,missing-super-argument,no-name-in-module,too-many-statements,too-many-instance-attributes,too-many-arguments + +# Enable the message, report, category or checker with the given id(s). You can +# either give multiple identifier separated by comma (,) or put this option +# multiple time (only on the command line, not in the configuration file where +# it should appear only once). See also the "--disable" option for examples. +enable= + + +[REPORTS] + +# Python expression which should return a note less than 10 (10 is the highest +# note). You have access to the variables errors warning, statement which +# respectively contain the number of errors / warnings messages and the total +# number of statements analyzed. This is used by the global evaluation report +# (RP0004). +evaluation=10.0 - ((float(5 * error + warning + refactor + convention) / statement) * 10) + +# Template used to display messages. This is a python new-style format string +# used to format the message information. See doc for all details +#msg-template= + +# Set the output format. Available formats are text, parseable, colorized, json +# and msvs (visual studio).You can also give a reporter class, eg +# mypackage.mymodule.MyReporterClass. +output-format=text + +# Tells whether to display a full report or only the messages +reports=no + +# Activate the evaluation score. +score=yes + + +[REFACTORING] + +# Maximum number of nested blocks for function / method body +max-nested-blocks=5 + + +[LOGGING] + +# Logging modules to check that the string format arguments are in logging +# function parameter format +logging-modules=logging + + +[SIMILARITIES] + +# Ignore comments when computing similarities. +ignore-comments=yes + +# Ignore docstrings when computing similarities. +ignore-docstrings=yes + +# Ignore imports when computing similarities. +ignore-imports=no + +# Minimum lines number of a similarity. +min-similarity-lines=4 + + +[BASIC] + +# Naming hint for argument names +argument-name-hint=(([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$ + +# Regular expression matching correct argument names +argument-rgx=(([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$ + +# Naming hint for attribute names +attr-name-hint=(([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$ + +# Regular expression matching correct attribute names +attr-rgx=(([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$ + +# Bad variable names which should always be refused, separated by a comma +bad-names=foo,bar,baz,toto,tutu,tata + +# Naming hint for class attribute names +class-attribute-name-hint=([A-Za-z_][A-Za-z0-9_]{2,30}|(__.*__))$ + +# Regular expression matching correct class attribute names +class-attribute-rgx=([A-Za-z_][A-Za-z0-9_]{2,30}|(__.*__))$ + +# Naming hint for class names +class-name-hint=[A-Z_][a-zA-Z0-9]+$ + +# Regular expression matching correct class names +class-rgx=[A-Z_][a-zA-Z0-9]+$ + +# Naming hint for constant names +const-name-hint=(([A-Z_][A-Z0-9_]*)|(__.*__))$ + +# Regular expression matching correct constant names +const-rgx=(([A-Z_][A-Z0-9_]*)|(__.*__))$ + +# Minimum line length for functions/classes that require docstrings, shorter +# ones are exempt. +docstring-min-length=-1 + +# Naming hint for function names +function-name-hint=(([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$ + +# Regular expression matching correct function names +function-rgx=(([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$ + +# Good variable names which should always be accepted, separated by a comma +good-names=i,j,k,ex,Run,_ + +# Include a hint for the correct naming format with invalid-name +include-naming-hint=no + +# Naming hint for inline iteration names +inlinevar-name-hint=[A-Za-z_][A-Za-z0-9_]*$ + +# Regular expression matching correct inline iteration names +inlinevar-rgx=[A-Za-z_][A-Za-z0-9_]*$ + +# Naming hint for method names +method-name-hint=(([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$ + +# Regular expression matching correct method names +method-rgx=(([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$ + +# Naming hint for module names +module-name-hint=(([a-z_][a-z0-9_]*)|([A-Z][a-zA-Z0-9]+))$ + +# Regular expression matching correct module names +module-rgx=(([a-z_][a-z0-9_]*)|([A-Z][a-zA-Z0-9]+))$ + +# Colon-delimited sets of names that determine each other's naming style when +# the name regexes allow several styles. +name-group= + +# Regular expression which should only match function or class names that do +# not require a docstring. +no-docstring-rgx=^_ + +# List of decorators that produce properties, such as abc.abstractproperty. Add +# to this list to register other decorators that produce valid properties. +property-classes=abc.abstractproperty + +# Naming hint for variable names +variable-name-hint=(([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$ + +# Regular expression matching correct variable names +variable-rgx=(([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$ + + +[MISCELLANEOUS] + +# List of note tags to take in consideration, separated by a comma. +notes=FIXME,XXX,TODO + + +[TYPECHECK] + +# List of decorators that produce context managers, such as +# contextlib.contextmanager. Add to this list to register other decorators that +# produce valid context managers. +contextmanager-decorators=contextlib.contextmanager + +# List of members which are set dynamically and missed by pylint inference +# system, and so shouldn't trigger E1101 when accessed. Python regular +# expressions are accepted. +generated-members= + +# Tells whether missing members accessed in mixin class should be ignored. A +# mixin class is detected if its name ends with "mixin" (case insensitive). +ignore-mixin-members=yes + +# This flag controls whether pylint should warn about no-member and similar +# checks whenever an opaque object is returned when inferring. The inference +# can return multiple potential results while evaluating a Python object, but +# some branches might not be evaluated, which results in partial inference. In +# that case, it might be useful to still emit no-member and other checks for +# the rest of the inferred objects. +ignore-on-opaque-inference=yes + +# List of class names for which member attributes should not be checked (useful +# for classes with dynamically set attributes). This supports the use of +# qualified names. +ignored-classes=optparse.Values,thread._local,_thread._local + +# List of module names for which member attributes should not be checked +# (useful for modules/projects where namespaces are manipulated during runtime +# and thus existing member attributes cannot be deduced by static analysis. It +# supports qualified module names, as well as Unix pattern matching. +ignored-modules= + +# Show a hint with possible names when a member name was not found. The aspect +# of finding the hint is based on edit distance. +missing-member-hint=yes + +# The minimum edit distance a name should have in order to be considered a +# similar match for a missing member name. +missing-member-hint-distance=1 + +# The total number of similar names that should be taken in consideration when +# showing a hint for a missing member. +missing-member-max-choices=1 + + +[VARIABLES] + +# List of additional names supposed to be defined in builtins. Remember that +# you should avoid to define new builtins when possible. +additional-builtins= + +# Tells whether unused global variables should be treated as a violation. +allow-global-unused-variables=yes + +# List of strings which can identify a callback function by name. A callback +# name must start or end with one of those strings. +callbacks=cb_,_cb + +# A regular expression matching the name of dummy variables (i.e. expectedly +# not used). +dummy-variables-rgx=_+$|(_[a-zA-Z0-9_]*[a-zA-Z0-9]+?$)|dummy|^ignored_|^unused_ + +# Argument names that match this expression will be ignored. Default to name +# with leading underscore +ignored-argument-names=_.*|^ignored_|^unused_ + +# Tells whether we should check for unused import in __init__ files. +init-import=no + +# List of qualified module names which can have objects that can redefine +# builtins. +redefining-builtins-modules=six.moves,future.builtins + + +[FORMAT] + +# Expected format of line ending, e.g. empty (any line ending), LF or CRLF. +expected-line-ending-format= + +# Regexp for a line that is allowed to be longer than the limit. +ignore-long-lines=^\s*(# )??$ + +# Number of spaces of indent required inside a hanging or continued line. +indent-after-paren=4 + +# String used as indentation unit. This is usually " " (4 spaces) or "\t" (1 +# tab). +indent-string=' ' + +# Maximum number of characters on a single line. +max-line-length=100 + +# Maximum number of lines in a module +max-module-lines=1000 + +# List of optional constructs for which whitespace checking is disabled. `dict- +# separator` is used to allow tabulation in dicts, etc.: {1 : 1,\n222: 2}. +# `trailing-comma` allows a space between comma and closing bracket: (a, ). +# `empty-line` allows space-only lines. +no-space-check=trailing-comma,dict-separator + +# Allow the body of a class to be on the same line as the declaration if body +# contains single statement. +single-line-class-stmt=no + +# Allow the body of an if to be on the same line as the test if there is no +# else. +single-line-if-stmt=no + + +[SPELLING] + +# Spelling dictionary name. Available dictionaries: none. To make it working +# install python-enchant package. +spelling-dict= + +# List of comma separated words that should not be checked. +spelling-ignore-words= + +# A path to a file that contains private dictionary; one word per line. +spelling-private-dict-file= + +# Tells whether to store unknown words to indicated private dictionary in +# --spelling-private-dict-file option instead of raising a message. +spelling-store-unknown-words=no + + +[DESIGN] + +# Maximum number of arguments for function / method +max-args=5 + +# Maximum number of attributes for a class (see R0902). +max-attributes=7 + +# Maximum number of boolean expressions in a if statement +max-bool-expr=5 + +# Maximum number of branch for function / method body +max-branches=12 + +# Maximum number of locals for function / method body +max-locals=15 + +# Maximum number of parents for a class (see R0901). +max-parents=7 + +# Maximum number of public methods for a class (see R0904). +max-public-methods=20 + +# Maximum number of return / yield for function / method body +max-returns=6 + +# Maximum number of statements in function / method body +max-statements=50 + +# Minimum number of public methods for a class (see R0903). +min-public-methods=2 + + +[IMPORTS] + +# Allow wildcard imports from modules that define __all__. +allow-wildcard-with-all=no + +# Analyse import fallback blocks. This can be used to support both Python 2 and +# 3 compatible code, which means that the block might have code that exists +# only in one or another interpreter, leading to false positives when analysed. +analyse-fallback-blocks=no + +# Deprecated modules which should not be used, separated by a comma +deprecated-modules=regsub,TERMIOS,Bastion,rexec + +# Create a graph of external dependencies in the given file (report RP0402 must +# not be disabled) +ext-import-graph= + +# Create a graph of every (i.e. internal and external) dependencies in the +# given file (report RP0402 must not be disabled) +import-graph= + +# Create a graph of internal dependencies in the given file (report RP0402 must +# not be disabled) +int-import-graph= + +# Force import order to recognize a module as part of the standard +# compatibility libraries. +known-standard-library= + +# Force import order to recognize a module as part of a third party library. +known-third-party=enchant + + +[CLASSES] + +# List of method names used to declare (i.e. assign) instance attributes. +defining-attr-methods=__init__,__new__,setUp + +# List of member names, which should be excluded from the protected access +# warning. +exclude-protected=_asdict,_fields,_replace,_source,_make + +# List of valid names for the first argument in a class method. +valid-classmethod-first-arg=cls + +# List of valid names for the first argument in a metaclass class method. +valid-metaclass-classmethod-first-arg=mcs + + +[EXCEPTIONS] + +# Exceptions that will emit a warning when being caught. Defaults to +# "Exception" +overgeneral-exceptions=Exception