Title: Update Pylint RC file · Issue #1256 · googleapis/google-cloud-python · GitHub
Open Graph Title: Update Pylint RC file · Issue #1256 · googleapis/google-cloud-python
X Title: Update Pylint RC file · Issue #1256 · googleapis/google-cloud-python
Description: @tseaver After running pylint --generate-rcfile I curated the output to mostly match ours and made a simple diff: diff --git a/pylintrc_default b/pylintrc_default index 27c4b5d..72bb922 100644 --- a/pylintrc_default +++ b/pylintrc_defaul...
Open Graph Description: @tseaver After running pylint --generate-rcfile I curated the output to mostly match ours and made a simple diff: diff --git a/pylintrc_default b/pylintrc_default index 27c4b5d..72bb922 100644 --- ...
X Description: @tseaver After running pylint --generate-rcfile I curated the output to mostly match ours and made a simple diff: diff --git a/pylintrc_default b/pylintrc_default index 27c4b5d..72bb922 100644 --- ...
Opengraph URL: https://github.com/googleapis/google-cloud-python/issues/1256
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Update Pylint RC file","articleBody":"@tseaver After running\n\n```\npylint --generate-rcfile\n```\n\nI curated the output to mostly match ours and made a simple diff:\n\n``` diff\ndiff --git a/pylintrc_default b/pylintrc_default\nindex 27c4b5d..72bb922 100644\n--- a/pylintrc_default\n+++ b/pylintrc_default\n@@ -19,9 +19,6 @@\n # pygtk.require().\n # DEFAULT: init-hook=\n\n-# Profiled execution.\n-# DEFAULT: profile=no\n-\n # Add files or directories to the blacklist. They should be base names, not\n # paths.\n # DEFAULT: ignore=CVS\n@@ -42,15 +39,33 @@ ignore =\n # they document.\n load-plugins=pylint.extensions.check_docs\n\n-# DEPRECATED\n-# DEFAULT: include-ids=no\n+# Use multiple processes to speed up Pylint.\n+jobs=1\n+\n+# Allow loading of arbitrary C extensions. Extensions are imported into the\n+# active Python interpreter and may run arbitrary code.\n+unsafe-load-any-extension=no\n+\n+# A comma-separated list of package or module names from where C extensions may\n+# be loaded. Extensions are loading into the active Python interpreter and may\n+# run arbitrary code\n+extension-pkg-whitelist=\n\n-# DEPRECATED\n-# DEFAULT: symbols=no\n+# Allow optimization of some AST trees. This will activate a peephole AST\n+# optimizer, which will apply various small optimizations. For instance, it can\n+# be used to obtain the result of joining multiple strings with the addition\n+# operator. Joining a lot of strings can lead to a maximum recursion error in\n+# Pylint and this flag can prevent that. It has one side effect, the resulting\n+# AST will be different than the one from reality.\n+optimize-ast=no\n\n\n [MESSAGES CONTROL]\n\n+# Only show warnings with the listed confidence levels. Leave empty to show\n+# all. Valid levels: HIGH, INFERENCE, INFERENCE_FAILURE, UNDEFINED\n+confidence=\n+\n # Enable the message, report, category or checker with the given id(s). You can\n # either give multiple identifier separated by comma (,) or put this option\n # multiple time. See also the \"--disable\" option for examples.\n@@ -120,13 +135,9 @@ reports=no\n # (RP0004).\n # DEFAULT: evaluation=10.0 - ((float(5 * error + warning + refactor + convention) / statement) * 10)\n\n-# Add a comment according to your evaluation note. This is used by the global\n-# evaluation report (RP0004).\n-# DEFAULT: comment=no\n-\n # Template used to display messages. This is a python new-style format string\n # used to format the message information. See doc for all details\n-#msg-template=\n+# DEFAULT: msg-template=\n\n\n [SIMILARITIES]\n@@ -157,6 +168,27 @@ reports=no\n # you should avoid to define new builtins when possible.\n # DEFAULT: additional-builtins=\n\n+# List of strings which can identify a callback function by name. A callback\n+# name must start or end with one of those strings.\n+callbacks=cb_,_cb\n+\n+\n+[SPELLING]\n+\n+# Spelling dictionary name. Available dictionaries: none. To make it working\n+# install python-enchant package.\n+spelling-dict=\n+\n+# List of comma separated words that should not be checked.\n+spelling-ignore-words=\n+\n+# A path to a file that contains private dictionary; one word per line.\n+spelling-private-dict-file=\n+\n+# Tells whether to store unknown words to indicated private dictionary in\n+# --spelling-private-dict-file option instead of raising a message.\n+spelling-store-unknown-words=no\n+\n\n [LOGGING]\n\n@@ -168,7 +200,7 @@ reports=no\n [FORMAT]\n\n # Maximum number of characters on a single line.\n-# DEFAULT: max-line-length=80\n+max-line-length=100\n\n # Regexp for a line that is allowed to be longer than the limit.\n # DEFAULT: ignore-long-lines=^\\s*(# )?\u003c?https?://\\S+\u003e?$\n@@ -198,6 +230,9 @@ max-module-lines=1500\n # Number of spaces of indent required inside a hanging or continued line.\n # DEFAULT: indent-after-paren=4\n\n+# Expected format of line ending, e.g. empty (any line ending), LF or CRLF.\n+expected-line-ending-format=\n+\n\n [MISCELLANEOUS]\n\n@@ -207,15 +242,12 @@ max-module-lines=1500\n\n [BASIC]\n\n-# Required attributes for module, separated by a comma\n-# DEFAULT: required-attributes=\n-\n # List of builtins function names that should not be used, separated by a comma\n # DEFAULT: bad-functions=map,filter,apply,input,file\n\n # Good variable names which should always be accepted, separated by a comma\n # DEFAULT: good-names=i,j,k,ex,Run,_\n-# RATIONALE: 'pb' and 'id' have well-understood meainings in the code.\n+# RATIONALE: 'pb' and 'id' have well-understood meanings in the code.\n good-names = i, j, k, ex, Run, _,\n pb,\n id,\n@@ -292,13 +324,19 @@ good-names = i, j, k, ex, Run, _,\n\n # Regular expression which should only match function or class names that do\n # not require a docstring.\n-# DEFAULT: no-docstring-rgx=__.*__\n+no-docstring-rgx=^_\n\n # Minimum line length for functions/classes that require docstrings, shorter\n # ones are exempt.\n # DEFAULT: docstring-min-length=-1\n\n\n+[ELIF]\n+\n+# Maximum number of nested blocks for function / method body\n+max-nested-blocks=5\n+\n+\n [TYPECHECK]\n\n # Tells whether missing members accessed in mixin class should be ignored. A\n@@ -307,21 +345,19 @@ good-names = i, j, k, ex, Run, _,\n\n # List of module names for which member attributes should not be checked\n # (useful for modules/projects where namespaces are manipulated during runtime\n-# and thus existing member attributes cannot be deduced by static analysis\n+# and thus existing member attributes cannot be deduced by static analysis. It\n+# supports qualified module names, as well as Unix pattern matching.\n # DEFAULT: ignored-modules=\n\n # List of classes names for which member attributes should not be checked\n-# (useful for classes with attributes dynamically set).\n-# DEFAULT: ignored-classes=SQLObject\n-\n-# When zope mode is activated, add a predefined set of Zope acquired attributes\n-# to generated-members.\n-# DEFAULT: zope=no\n+# (useful for classes with attributes dynamically set). This supports can work\n+# with qualified names.\n+ignored-classes=\n\n # List of members which are set dynamically and missed by pylint inference\n-# system, and so shouldn't trigger E0201 when accessed. Python regular\n+# system, and so shouldn't trigger E1101 when accessed. Python regular\n # expressions are accepted.\n-# DEFAULT: generated-members=REQUEST,acl_users,aq_parent\n+generated-members=\n\n\n [IMPORTS]\n@@ -344,10 +380,6 @@ good-names = i, j, k, ex, Run, _,\n\n [CLASSES]\n\n-# List of interface methods to ignore, separated by a comma. This is used for\n-# instance to not check methods defines in Zope's Interface base class.\n-# DEFAULT: ignore-iface-methods=isImplementedBy,deferred,extends,names,namesAndDescriptions,queryDescriptionFor,getBases,getDescriptionFor,getDoc,getName,getTaggedValue,getTaggedValueTags,isEqualOrExtendedBy,setTaggedValue,isImplementedByInstancesOf,adaptWith,is_implemented_by\n-\n # List of method names used to declare (i.e. assign) instance attributes.\n # DEFAULT: defining-attr-methods=__init__,__new__,setUp\n\n@@ -357,6 +389,10 @@ good-names = i, j, k, ex, Run, _,\n # List of valid names for the first argument in a metaclass class method.\n # DEFAULT: valid-metaclass-classmethod-first-arg=mcs\n\n+# List of member names, which should be excluded from the protected access\n+# warning.\n+exclude-protected=_asdict,_fields,_replace,_source,_make\n+\n\n [DESIGN]\n\n@@ -400,6 +436,9 @@ min-public-methods=0\n # RATIONALE: API mapping\n max-public-methods=40\n\n+# Maximum number of boolean expressions in a if statement\n+max-bool-expr=5\n+\n\n [EXCEPTIONS]\n\n```\n\n---\n\nSome things worth noting\n- the default list of disabled went from empty to [include 50 things](https://gist.github.com/dhermes/f1586b902d8c67c0a7df)\n- max line length went from 80 to 100 (but AFAIK it's 79 in the `pep8` defaults)\n- adding `[MASTER].jobs` to speed up execution (happy, happy)\n- a `[SPELLING]` section was enabled for spellcheck (via `python-enchant`)\n- `[FORMAT].expected-line-ending-format` added (so we can disallow Windows line endings)\n","author":{"url":"https://github.com/dhermes","@type":"Person","name":"dhermes"},"datePublished":"2015-12-01T05:52:39.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":7},"url":"https://github.com/1256/google-cloud-python/issues/1256"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:48974643-3a94-7708-7a32-31e9accb2ee6 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 8E20:1AB22E:9A744D:9DFBE1:6A4DB28E |
| html-safe-nonce | abca2d79ad97a5c2dc5ee10bd4007503784f3908b21f26841d4cff143721725a |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4RTIwOjFBQjIyRTo5QTc0NEQ6OURGQkUxOjZBNERCMjhFIiwidmlzaXRvcl9pZCI6IjE5MTA2NDgwODgxMTc3MDUxMCIsInJlZ2lvbl9lZGdlIjoic2VhIiwicmVnaW9uX3JlbmRlciI6InNlYSJ9 |
| visitor-hmac | c266b9ba08532a04e9f6124d3e23e0ee4a9d8484ebafeea688a5b90e1f233333 |
| hovercard-subject-tag | issue:119647235 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/googleapis/google-cloud-python/1256/issue_layout |
| twitter:image | https://opengraph.githubassets.com/59f81b9eb703ff9e45e7db05c12b4791e2e629bba083a0e199aa1efba913e9db/googleapis/google-cloud-python/issues/1256 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/59f81b9eb703ff9e45e7db05c12b4791e2e629bba083a0e199aa1efba913e9db/googleapis/google-cloud-python/issues/1256 |
| og:image:alt | @tseaver After running pylint --generate-rcfile I curated the output to mostly match ours and made a simple diff: diff --git a/pylintrc_default b/pylintrc_default index 27c4b5d..72bb922 100644 --- ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | dhermes |
| hostname | github.com |
| expected-hostname | github.com |
| None | 06b8a6144231bf3a234f1c2e9993861e07ce98a905912b114aa386c2d7e84b33 |
| turbo-cache-control | no-preview |
| go-import | github.com/googleapis/google-cloud-python git https://github.com/googleapis/google-cloud-python.git |
| octolytics-dimension-user_id | 16785467 |
| octolytics-dimension-user_login | googleapis |
| octolytics-dimension-repository_id | 16316451 |
| octolytics-dimension-repository_nwo | googleapis/google-cloud-python |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 16316451 |
| octolytics-dimension-repository_network_root_nwo | googleapis/google-cloud-python |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 32f7b614aca06e6bbd89842b1370df1328264f68 |
| ui-target | canary-2 |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width