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

chore(deps): update dependency pylint to v2.14.3#2076

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
nejch merged 1 commit intomainfromrenovate/pylint-2.x
Jun 20, 2022

Conversation

renovate[bot]
Copy link
Contributor

@renovaterenovatebot commentedJun 20, 2022
edited
Loading

Mend Renovate

This PR contains the following updates:

PackageChangeAgeAdoptionPassingConfidence
pylint (changelog)==2.13.9 ->==2.14.3ageadoptionpassingconfidence

Release Notes

PyCQA/pylint

v2.14.3

Compare Source

  • Fixed two false positives forbad-super-call for calls that refer to a non-direct parent.

    Closes#​4922, Closes#​2903

  • Fixed a false positive foruseless-super-delegation for subclasses that specify the number of
    of parameters against a parent that uses a variadic argument.

    Closes#​2270

  • Allow suppressingundefined-loop-variable andundefined-variable without raisinguseless-suppression.

  • Fixed false positive forundefined-variable for__class__ in inner methods.

    Closes#​4032

v2.14.2

Compare Source

  • Fixed a false positive forunused-variable when a function returns an
    argparse.Namespace object.

    Closes#​6895

  • Avoided raising an identicalundefined-loop-variable message twice on the same line.

  • Don't crash iflint.run._query_cpu() is run within a Kubernetes Pod, that has only
    a fraction of a cpu core assigned. Just go with one process then.

    Closes#​6902

  • Fixed a false positive inconsider-using-f-string if the left side of a% is not a string.

    Closes#​6689

  • Fixed a false positive inunnecessary-list-index-lookup andunnecessary-dict-index-lookup
    when the subscript is updated in the body of a nested loop.

    Closes#​6818

  • Fixed an issue with multi-lineinit-hook options which did not record the line endings.

    Closes#​6888

  • Fixed a false positive forused-before-assignment when a try block returns
    but an except handler defines a name via type annotation.

  • --errors-only no longer enables previously disabled messages. It was acting as
    "emitall and only error messages" without being clearly documented that way.

    Closes#​6811

v2.14.1

Compare Source

  • Avoid reportingunnecessary-dict-index-lookup orunnecessary-list-index-lookup
    when the index lookup is part of a destructuring assignment.

    Closes#​6788

  • Fixed parsing of unrelated options intox.ini.

    Closes#​6800

  • Fixed a crash when linting__new__() methods that return a call expression.

    Closes#​6805

  • Don't crash if we can't find the user's home directory.

    Closes#​6802

  • Fixed false positives forunused-import when aliasingtyping e.g. ast
    and guarding imports undert.TYPE_CHECKING.

    Closes#​3846

  • Fixed a false positive regression in 2.13 forused-before-assignment where it is safe to rely
    on a name defined only in anexcept block because theelse block returned.

    Closes#​6790

  • Fixed the use of abbreviations for some special options on the command line.

    Closes#​6810

  • Fix a crash in the optionalpylint.extensions.private_import extension.

    Closes#​6624

  • bad-option-value (E0012) is now a warningunknown-option-value (W0012). Deleted messages that do not exist
    anymore in pylint now raiseuseless-option-value (R0022) instead ofbad-option-value. This allows to
    distinguish between genuine typos and configuration that could be cleaned up. Existing message disables for
    bad-option-value will still work on both new messages.

    Refs#​6794

v2.14.0

Compare Source

Summary -- Release highlights

With 2.14pylint only supports Python version 3.7.2 and above.

We introduced several new checks among whichduplicate-value for sets,
comparison-of-constants, and checks related to lambdas. We removedno-init and
madeno-self-use optional as they were too opinionated. We also added an option
to generate a toml configuration:--generate-toml-config.

We migrated toargparse fromoptparse and refactored the configuration handling
thanks to Daniël van Noord. On the user side it should change the output of the
--help command, and some inconsistencies and bugs should disappear. The behavior
between options set in a config file versus on the command line will be more consistent. For us,
it will permit to maintain this part of the code easily in the future and anticipate
optparse's removal in Python 3.12.

As a result of the refactor there are a lot of internal deprecations. If you're a library
maintainer that depends on pylint, please verify that you're ready for pylint 3.0
by activating deprecation warnings.

We continued the integration ofpylint-error and are now at 33%!. We still welcome
any community effort to help review, integrate, and add good/bad examples in#​5953.
This should be doable without anypylint orastroid knowledge, so this is the perfect
entrypoint if you want to contribute topylint or open source without any experience
with our code!

New checkers

  • Added new checkercomparison-of-constants.

    Closes#​6076

  • Added new checkertypevar-name-mismatch: TypeVar must be assigned to a variable with the same name as its name argument.

    Closes#​5224

  • invalid-enum-extension: Used when a class tries to extend an inherited Enum class.

    Closes#​5501

  • Added new checkertypevar-double-variance: The "covariant" and "contravariant" keyword arguments
    cannot both be set to "True" in a TypeVar.

    Closes#​5895

  • Add new checkunnecessary-dunder-call for unnecessary dunder method calls.

    Closes#​5936

  • unnecessary-lambda-assignment: Lambda expression assigned to a variable.
    Define a function using the "def" keyword instead.
    unnecessary-direct-lambda-call: Lambda expression called directly.
    Execute the expression inline instead.

    Closes#​5976

  • potential-index-error: Emitted when the index of a list or tuple exceeds its length.
    This checker is currently quite conservative to avoid false positives. We welcome
    suggestions for improvements.

    Closes#​578

  • Added new checkerunnecessary-list-index-lookup for indexing into a list while
    iterating overenumerate().

    Closes#​4525

  • Added new message calledduplicate-value which identifies duplicate values inside sets.

    Closes#​5880

  • Added thesuper-without-brackets checker, raised when a super call is missing its brackets.

    Closes#​4008

Removed checkers

  • Theno-init (W0232) warning has been removed. It's ok to not have an__init__ in a class.

    Closes#​2409

  • Removed theassign-to-new-keyword message as there are no new keywords in the supported Python
    versions any longer.

    Closes#​4683

  • Movedno-self-use check to optional extension.
    You now need to explicitly enable this check using
    load-plugins=pylint.extensions.no_self_use.

    Closes#​5502

Extensions

  • RedefinedLoopNameChecker

    • Added optional extensionredefined-loop-name to emit messages when a loop variable
      is redefined in the loop body.

    Closes#​5072

  • DocStringStyleChecker

    • Re-enable checkerbad-docstring-quotes for Python <= 3.7.

    Closes#​6087

  • NoSelfUseChecker

    • Addedno-self-use check, previously enabled by default.

    Closes#​5502

Other Changes

  • Started ignoring underscore as a local variable fortoo-many-locals.

    Closes#​6488

  • Pylint can now be installed with an extra-require calledspelling (pip install pylint[spelling]).
    This will addpyenchant to pylint's dependencies. You will still need to install the
    requirements forpyenchant (theenchant library and any dictionaries) yourself. You will also
    need to set thespelling-dict option.

    Refs#​6462

  • Improved wording of the message ofdeprecated-module

    Closes#​6169

  • Pylint now requires Python 3.7.2 or newer to run.

    Closes#​4301

  • We made a greater effort to reraise failures stemming from theastroid
    library asAstroidError, with the effect that pylint emitsastroid-error
    rather than merelyfatal. Regardless, please report any such issues you encounter!

  • We have improved our recognition of inline disable and enable comments. It is
    now possible to disablebad-option-value inline (as long as you disable it before
    the bad option value is raised, i.e.disable=bad-option-value,bad-message notdisable=bad-message,bad-option-value ) as well as certain other
    previously unsupported messages.

    Closes#​3312

  • The main checker name is nowmain instead ofmaster. The configuration does not need to be updated as sections' name are optional.

    Closes#​5467

  • Updateinvalid-slots-object message to show bad object rather than its inferred value.

    Closes#​6101

  • Fixed a crash in thenot-an-iterable checker involving multiple starred expressions
    inside a call.

    Closes#​6372

  • Fixed a crash in theunused-private-member checker involving chained private attributes.

    Closes#​6709

  • Disable spellchecking of mypy rule names in ignore directives.

    Closes#​5929

  • implicit-str-concat will now be raised on calls likeopen("myfile.txt" "a+b") too.

    Closes#​6441

  • Fix a failure to respect inline disables forfixme occurring on the last line
    of a module when pylint is launched with--enable=fixme.

  • Removed the brokengenerate-man option.

    Closes#​5283
    Closes#​1887

  • Fixed failure to enabledeprecated-module after adisable=all
    by makingImportsChecker solely responsible for emittingdeprecated-module instead
    of sharing responsibility withStdlibChecker. (This could have led to double messages.)

  • Added thegenerate-toml-config option.

    Refs#​5462

  • bad-option-value will be emitted whenever a configuration value or command line invocation
    includes an unknown message.

    Closes#​4324

  • Added theunrecognized-option message. Raised if we encounter any unrecognized options.

    Closes#​5259

  • Fix false negative forbad-string-format-type if the value to be formatted is passed in
    as a variable holding a constant.

  • The concept of checker priority has been removed.

  • Thecache-max-size-none checker has been renamed tomethod-cache-max-size-none.

    Closes#​5670

  • Themethod-cache-max-size-none checker will now also checkfunctools.cache.

    Closes#​5670

  • BaseChecker classes now require thelinter argument to be passed.

  • Theset_config_directly decorator has been removed.

  • Don't reportuseless-super-delegation for the__hash__ method in classes that also override the__eq__ method.

    Closes#​3934

  • Fix falsely issuinguseless-suppression on thewrong-import-position checker.

    Closes#​5219

  • Fixed false positiveno-member for Enums with self-defined members.

    Closes#​5138

  • Fix false negative forno-member when attempting to assign an instance
    attribute to itself without any prior assignment.

    Closes#​1555

  • Changed message type fromredefined-outer-name toredefined-loop-name
    (optional extension) for redefinitions of outer loop variables by inner loops.

    Closes#​5608

  • By default the similarity checker will now ignore imports and ignore function signatures when computing
    duplication. If you want to keep the previous behaviour setignore-imports andignore-signatures toFalse.

  • Pylint now expands the user path (i.e.~ tohome/yusef/) and expands environment variables (i.e.home/$USER/$project
    tohome/yusef/pylint forUSER=yusef andproject=pylint) for pyreverse'soutput-directory,
    import-graph,ext-import-graph,int-import-graph options, and the spell checker'sspelling-private-dict-file
    option.

    Refs#​6493

  • Don't emitunsubscriptable-object for string annotations.
    Pylint doesn't check if class is only generic in type stubs only.

    Closes#​4369 and#​6523

  • Fix pyreverse crashRuntimeError: dictionary changed size during iteration

    Refs#​6612

  • Fix syntax for return type annotations in MermaidJS diagrams produced withpyreverse.

    Closes#​6467

  • Fix type annotations of class and instance attributes using the alternative union syntax inpyreverse diagrams.

  • Fix bug where it writes a plain text error message to stdout, invalidating output formats.

    Closes#​6597

  • The refactoring checker now also raises 'consider-using-a-generator' messages for
    max(),min() andsum().

    Refs#​6595

  • Update ranges forusing-constant-test andmissing-parentheses-for-call-in-test
    error messages.

  • Don't emitno-member inside type annotations with
    from __future__ import annotations.

    Closes#​6594

  • Fixunexpected-special-method-signature false positive for__init_subclass__ methods with one or more arguments.

    Closes#​6644

Deprecations

  • Theignore-mixin-members option has been deprecated. You should now use the new
    ignored-checks-for-mixins option.

    Closes#​5205

  • interfaces.implements has been deprecated and will be removed in 3.0. Please use standard inheritance
    patterns instead of__implements__.

    Refs#​2287

  • AllInterface classes inpylint.interfaces have been deprecated. You can subclass
    the respective normal classes to get the same behaviour. The__implements__ functionality
    was based on a rejected PEP from 2001:
    https://peps.python.org/pep-0245/

    Closes#​2287

  • MapReduceMixin has been deprecated.BaseChecker now implementsget_map_data and
    reduce_map_data. If a checker actually needs to reduce data it should defineget_map_data
    as returning something different thanNone and let itsreduce_map_data handle a list
    of the types returned byget_map_data.
    An example can be seen by looking atpylint/checkers/similar.py.

  • Theconfig attribute ofBaseChecker has been deprecated. You can usechecker.linter.config
    to access the global configuration object instead of a checker-specific object.

    Refs#​5392

  • Thelevel attribute ofBaseChecker has been deprecated: everything is now
    displayed in--help, all the time.

    Refs#​5392

  • Theset_option method ofBaseChecker has been deprecated. You can usechecker.linter.set_option
    to set an option on the global configuration object instead of a checker-specific object.

    Refs#​5392

  • Theoptions_providers attribute ofArgumentsManager has been deprecated.

    Refs#​5392

  • Fix saving of persistent data files in environments where the user's cache
    directory and the linted file are on a different drive.

    Closes#​6394

  • Themethod-cache-max-size-none checker will now also checkfunctools.cache.

  • Theconfig attribute ofPyLinter is now of theargparse.Namespace type instead of
    optparse.Values.

    Refs#​5392

  • UnsupportedAction has been deprecated.

    Refs#​5392

  • OptionsManagerMixIn has been deprecated.

    Refs#​5392

  • OptionParser has been deprecated.

    Refs#​5392

  • Option has been deprecated.

    Refs#​5392

  • OptionsProviderMixIn has been deprecated.

    Refs#​5392

  • ConfigurationMixIn has been deprecated.

  • Theoption_groups attribute ofPyLinter has been deprecated.

    Refs#​5392

  • get_global_config has been deprecated. You can now access all global options from
    checker.linter.config.

    Refs#​5392

  • OptionsManagerMixIn has been replaced withArgumentsManager.ArgumentsManager is considered
    private API and most methods that were public onOptionsManagerMixIn have now been deprecated and will
    be removed in a future release.

    Refs#​5392

  • OptionsProviderMixIn has been replaced withArgumentsProvider.ArgumentsProvider is considered
    private API and most methods that were public onOptionsProviderMixIn have now been deprecated and will
    be removed in a future release.

    Refs#​5392

  • pylint.pyreverse.ASTWalker has been removed, as it was only used internally by a single child class.

    Refs#​6712

  • pyreverse: Resolving and displaying implemented interfaces that are defined by the__implements__
    attribute has been deprecated and will be removed in 3.0.

    Refs#​6713

  • is_class_subscriptable_pep585_with_postponed_evaluation_enabled has been deprecated.
    Useis_postponed_evaluation_enabled(node) and is_node_in_type_annotation_context(node)
    instead.

    Refs#​6536


Configuration

📅Schedule: Branch creation - "before 3am on Monday" (UTC), Automerge - At any time (no schedule defined).

🚦Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, click this checkbox.

This PR has been generated byMend Renovate. View repository job loghere.

@renovaterenovatebotforce-pushed therenovate/pylint-2.x branch from4406fb8 to8d612e8CompareJune 20, 2022 02:18
@codecov-commenter
Copy link

Codecov Report

Merging#2076 (8d612e8) intomain (f117b2f) willincrease coverage by4.39%.
The diff coverage isn/a.

@@            Coverage Diff             @@##             main    #2076      +/-   ##==========================================+ Coverage   90.24%   94.64%   +4.39%==========================================  Files          78       78                Lines        5003     5003              ==========================================+ Hits         4515     4735     +220+ Misses        488      268     -220
FlagCoverage Δ
cli_func_v482.45% <ø> (ø)
py_func_v481.03% <ø> (?)
unit85.60% <ø> (ø)

Flags with carried forward coverage won't be shown.Click here to find out more.

Impacted FilesCoverage Δ
gitlab/v4/objects/members.py94.82% <0.00%> (+1.72%)⬆️
gitlab/types.py98.07% <0.00%> (+1.92%)⬆️
gitlab/client.py98.67% <0.00%> (+3.31%)⬆️
gitlab/v4/objects/wikis.py96.55% <0.00%> (+3.44%)⬆️
gitlab/v4/objects/notes.py94.28% <0.00%> (+3.80%)⬆️
gitlab/v4/objects/groups.py88.73% <0.00%> (+4.22%)⬆️
gitlab/v4/objects/projects.py89.93% <0.00%> (+4.69%)⬆️
gitlab/v4/objects/pages.py100.00% <0.00%> (+5.00%)⬆️
gitlab/v4/objects/events.py98.73% <0.00%> (+5.06%)⬆️
gitlab/mixins.py92.15% <0.00%> (+5.60%)⬆️
... and20 more

@renovaterenovatebotforce-pushed therenovate/pylint-2.x branch from8d612e8 to9a16bb1CompareJune 20, 2022 07:18
@nejchnejch merged commite48ad91 intomainJun 20, 2022
@nejchnejch deleted the renovate/pylint-2.x branchJune 20, 2022 07:35
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers
No reviews
Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

2 participants
@codecov-commenter@nejch

[8]ページ先頭

©2009-2025 Movatter.jp