summaryrefslogtreecommitdiff
path: root/pylint/checkers/stdlib.py
Commit message (Collapse)AuthorAgeFilesLines
* Fix crash on ``open()`` calls for non-string ``mode`` arguments (#5332)Daniël van Noord2021-11-201-1/+6
| | | Co-authored-by: Marc Mueller <30130371+cdce8p@users.noreply.github.com>
* Add ``no-implicit-optional`` flag to ``mypy`` (#5075)Daniël van Noord2021-09-261-2/+2
|
* Fix ``unspecified-encoding`` for ``Path.read_text()``Daniël van Noord2021-09-171-3/+8
| | | | Closes #5029
* Fix ``unspecified-encoding`` for `Path()`Daniël van Noord2021-09-161-3/+10
| | | | This closes #5017
* Bump pylint to 2.11.0, update changelogv2.11.0Pierre Sassoulas2021-09-161-1/+1
|
* Refactor various typing related issues (#4940)Daniël van Noord2021-09-031-7/+11
| | | | | | | | | | | | | | | * Add type annotations to ``visit`` & ``leave`` calls This adds typing to most calls that visit nodes. All other changes are due to mypy errors resulting from introduction of typing. * Fix outstanding mypy issues This removes some of the `type: ignore` comments in favour of solving the mypy issues these comments were surpressing. * Fix remaining references to node_classes Except for two references to node_classes in the changelog this should be the last of them Co-authored-by: Marc Mueller <30130371+cdce8p@users.noreply.github.com> Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com>
* Extend ``unspecified-encoding`` checkerDaniël van Noord2021-09-011-3/+3
| | | | | | The ``unspecified-encoding`` checker now also checks calls to ``pathlib.Path().read_text()`` and ``pathlib.Path().write_text()`` This closes #4945
* Fix a crash from astroid.InferenceError raised on copy.copyPierre Sassoulas2021-08-211-3/+7
| | | | Closes #4891
* Bump pylint to 2.10.0, update changelogv2.10.0Pierre Sassoulas2021-08-201-2/+2
|
* Add cached infer_all helper functionMarc Mueller2021-08-191-38/+35
|
* Use alias for astroid.nodes 02 (#4863)Marc Mueller2021-08-181-13/+11
| | | | * Use alias for astroid nodes * Resolve name conflicts
* Revert "Extended consider-using-tuple check to cover 'in' comparisons (#4768)"Marc Mueller2021-08-121-1/+1
| | | | This reverts commit ca3bc53fd8d628473fba25c7736d0abfac8e4a4a.
* Add ``forgotten-debug-statement`` checker (#4771)Daniël van Noord2021-07-291-0/+10
| | | | | | | | * Add ``no-breakpoint`` checker this adds a checker for calls to ``breakpoint()``, ``pdb.set_trace()``, or ``sys.breakpointhook()``. Closes #3692 Co-authored-by: Marc Mueller <30130371+cdce8p@users.noreply.github.com> Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com>
* Add new checkers ``use-list-literal`` and ``use-dict-literal`` (#4769)Daniël van Noord2021-07-291-2/+2
| | | | | | | | | | | | | | | | | | | | | | * Add ``use-list-literal`` and ``use-dict-literal`` This adds two checks for when empty lists and dicts are created using a function call instead of their literals. This closes #4365 * Conform code to use-list-literal, use-dict-literal With addition of the use-list-literal and use-dict-literal checkers some code had to be updated. As there is a real performance difference, the literal is preferred when it is as clear as using the function call. * Conform test to use-list-literal, use-dict-literal With addition of the use-list-literal and use-dict-literal checkers some code had to be updated. As there is a real performance difference, the literal is preferred when it is as clear as using the function call. For some tests ignoring the checker seemed better for clarity of the test. Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com> Co-authored-by: Marc Mueller <30130371+cdce8p@users.noreply.github.com>
* Extended consider-using-tuple check to cover 'in' comparisons (#4768)Marc Mueller2021-07-291-1/+1
|
* Add unspecified-encoding checker #3826 (#4753)Daniël van Noord2021-07-281-3/+51
| | | | | | | | | | | | | | | | | | | | | | | | | | | * Add unspecified-encoding checker #3826 This adds an unspecified-encoding checker that adds a warning whenever open() is called without an explicit encoding argument. This closes #3826 * Update tests to conform to unspecified-encoding With addition of the unspecified-encoding checker calls of open() need an encoding argument. Where necessary this argument has been added, or the message has been disabled. This also includes small linting changes to a small number of tests. Their test-data has been updated to reflect new line numbers. * Update scripts to conform to unspecified-encoding With addition of the unspecified-encoding checker calls of open() need an encoding argument. Where necessary this argument has been added. * Update pylint to conform to unspecified-encoding With addition of the unspecified-encoding checker calls of open() need an encoding argument. Where necessary this argument has been added. Co-authored-by: Marc Mueller <30130371+cdce8p@users.noreply.github.com> Co-authored-by: Marc Mueller <30130371+cdce8p@users.noreply.github.com>
* Bump pylint to 2.9.4, update changelogv2.9.4Pierre Sassoulas2021-07-201-0/+1
|
* Added `time.clock` to deprecated functions/methods for python 3.3.Yilei "Dolee" Yang2021-07-201-0/+1
| | | | It was deprecated in 3.3 and removed in 3.8.
* Bump pylint to 2.9.3, update changelogv2.9.3Pierre Sassoulas2021-07-011-1/+1
|
* Fix copyright links (#4647)Marc Mueller2021-07-011-1/+1
| | | | * Fix link in license header * Update link to astroid bump_changelog
* Fix deprecated methods from #4620Matus Valo2021-06-291-6/+1
|
* Added various deprecated functions/methods for python 3.10, 3.7, 3.6 and 3.3Matus Valo2021-06-291-1/+24
|
* Bump pylint to 2.9.0-dev1, update changelogPierre Sassoulas2021-06-171-1/+2
|
* Added deprecated decorators check (#4513)Matus Valo2021-05-271-0/+22
| | | | | | | * Added deprecated decorators check * Updated Changelog and whatsnew Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com>
* Moved stdlib module deprecation from imports checker to stdlib checker (#4454)Matus Valo2021-05-101-0/+19
| | | | | * Moved stdlib module deprecation from imports checker to stdlib checker * Ignore deprecated-module error in pylint/config modules
* warn deprecated x argument of int(), bool(), float() in all python versions ↵Matus Valo2021-05-031-1/+1
| | | | (#4435)
* Add deprecated methods, classes and arguments to stdlib checker (#4424)Matus Valo2021-05-021-1/+23
| | | * Add deprecated methods, classes and arguments to stdlib checker
* Add support for checking deprecated class arguments. (#4425)Matus Valo2021-05-011-0/+2
| | | * Add deprecated class arguments
* Add new warning ``deprecated-class`` #4388 (#4419)victor2021-04-301-0/+47
| | | * Add new warning ``deprecated-class``, fix pre-commit ci pipeline.
* Update copyrite noticev2.8.2Pierre Sassoulas2021-04-261-0/+1
|
* Changes after black updateMarc Mueller2021-04-261-1/+1
|
* Prepare for 2.8.0 releasepylint-2.8.0Pierre Sassoulas2021-04-241-1/+1
|
* Rename copying to license and upgrade the setup.cfg (#4338)Pierre Sassoulas2021-04-111-1/+1
|
* Added deprecated attribute checks to stdlib (#4128)Matus Valo2021-03-301-123/+170
|
* Import astroid with import x or from x import y but not bothPierre Sassoulas2021-03-281-4/+5
| | | | Remove unused imports for astroid
* Apply copyrite --contribution-thresholdPierre Sassoulas2021-02-211-1/+5
|
* Remove the # coding, since PEP3120 the default is UTF8Pierre Sassoulas2021-02-211-1/+0
|
* Move message definition to the DeprecatedMixin classMatus Valo2021-02-211-1/+1
|
* Introduced DeprecatedMixinMatus Valo2021-02-211-34/+12
|
* Fix regression about getfullargspec deprecationSorin Sbarnea2020-12-141-1/+0
| | | | | | Fixes regression introduced by https://github.com/PyCQA/pylint/commit/9d4f2c082e4f17fb5165deb0c9e4a0fd329d5cbd which incorrectly added getfullargspec as deprecated, which in fact was never deprecated, not even in the latest 3.9.0
* Add checks for deprecated functions since 3.6Federico Bond2020-11-271-0/+29
|
* Update formatting following black and isort updatePierre Sassoulas2020-09-101-1/+1
|
* Sets up copyrighthippo912020-08-201-1/+2
|
* Chore: use https links (#3679)谭九鼎2020-06-111-2/+2
|
* Add missing copyright annotations for the past releasesClaudiu Popa2020-04-271-1/+10
|
* pyupgrade: automated removal of python2 constructsAnthony Sottile2020-03-241-1/+0
| | | | | | | | | | | | | using configuration: ```yaml - repo: https://github.com/asottile/pyupgrade rev: v2.1.0 hooks: - id: pyupgrade args: [--py3-plus, --keep-percent-format] exclude: ^tests/(extensions/data/|functional/|input/|regrtest_data/) ```
* FIX: Typo. (#3264)Julien Palard2019-11-211-1/+1
|
* Move inspect.getargvalues and inspect.formatargvalues out of deprecated ↵laike9m2019-10-151-2/+0
| | | | | | functions (#3189) inspect.getargvalues was inadvertently marked as deprecated in Python 3.5, and was deprecated in Python 3.6. See https://bugs.python.org/issue28814 for details.
* Remove redundant compatibility code (#3097)Hugo van Kemenade2019-09-121-8/+2
| | | | We no longer support Python 2 so we can remove the compatibility code we had in place for that version.
* Report unnecessary else after continue and breakRobert Schweizer2019-09-101-1/+1
| | | | Close #2327