summaryrefslogtreecommitdiff
path: root/pylint/pyreverse/utils.py
Commit message (Collapse)AuthorAgeFilesLines
* [PyCQA migration] Upgrade links to the repositories in code and doc (#8514)Pierre Sassoulas2023-03-291-2/+2
|
* Remove remaining code parts related to __implements__ (#8414)Andreas Finkler2023-03-091-5/+0
| | | Refs #8404
* Turn on ``mypy`` strict mode 🎉 (#7448)Daniël van Noord2022-09-091-4/+4
| | | | | | | | | | * Ignore subclasses of Any * Add ignores for imported code and remove casts * Add disables for uninferable return values * Turn on ``mypy`` strict mode
* Fix typing of most inference callsDaniël van Noord2022-07-131-1/+2
|
* Fix `pyreverse` type annotations for attributes using alternative union ↵Andreas Finkler2022-05-291-1/+3
| | | | | | | | | | | syntax (#6720) * Fix `pyreverse` type annotations for attributes using alternative union syntax. * Fix `dot` output and add additional test cases * Apply suggestions from code review * Add changelog entry in `full.rst`
* Remove unnecessary base class and dead code in `pylint.pyreverse.utils` (#6712)Andreas Finkler2022-05-271-43/+6
| | | | | * Remove unnecessary base class and dead code * Add ChangeLog and whatsnew entry
* Finish typing of `pylint.pyreverse.utils` (#6549)Andreas Finkler2022-05-111-35/+29
| | | Co-authored-by: Marc Mueller <30130371+cdce8p@users.noreply.github.com>
* Run development version of ``pydocstringformatter`` (#6469)Daniël van Noord2022-04-281-3/+3
|
* [spelling] Remove remaining typoes detected by the spelling checkerPierre Sassoulas2022-04-261-2/+2
|
* Add typing and small refactors to pyreverseDaniël van Noord2022-04-151-2/+2
|
* Use ``python-typing-update`` on ``pylint/pyreverse`` directoryDaniël van Noord2022-04-141-5/+7
|
* Add a pre-commit hook to check the copyright noticePierre Sassoulas2022-03-241-1/+1
| | | | | Fix the existing file so they have a notice. No header for setup.py or examples or doc
* Simplify hard to maintain copyright noticePierre Sassoulas2022-03-241-18/+1
| | | | | | git is the source of truth for the copyright, copyrite (the tool) was taking exponentially longer with each release, and it's polluting the code with sometime as much as 50 lines of names.
* ``pyreverse``: better error messages for unsupported file formats (#5951)Andreas Finkler2022-03-221-3/+28
| | | | | * Pyreverse: better error messages for unsupported file formats * Apply suggestions from code review.
* Fix pyreverse type hints for methods returning None (#5916)Téo Bouvard2022-03-191-7/+6
|
* Upgrade ``pydocstringformatter`` to ``0.5.0`` (#5910)Daniël van Noord2022-03-131-0/+1
|
* Update ``pydocstringformatter`` to 0.4.0 (#5787)Daniël van Noord2022-02-101-16/+16
|
* [pre-commit.ci] pre-commit autoupdate (#5758)pre-commit-ci[bot]2022-02-011-1/+1
| | | | | | | | | | | | | * [pre-commit.ci] pre-commit autoupdate updates: - [github.com/psf/black: 21.12b0 → 22.1.0](https://github.com/psf/black/compare/21.12b0...22.1.0) * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci 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>
* Format docstrings with ``pydocstringformatter``Daniël van Noord2022-01-021-2/+4
|
* Bump pylint to 2.12.0, update changelogv2.12.0Pierre Sassoulas2021-11-251-0/+1
| | | | Closes #5250
* [pre-commit.ci] pre-commit autoupdate (#5082)pre-commit-ci[bot]2021-09-281-1/+1
| | | | | | | | | | | * [pre-commit.ci] pre-commit autoupdate updates: - [github.com/asottile/pyupgrade: v2.26.0 → v2.28.0](https://github.com/asottile/pyupgrade/compare/v2.26.0...v2.28.0) * [pre-commit.ci] auto fixes from pre-commit.com hooks 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>
* Bump pylint to 2.11.0, update changelogv2.11.0Pierre Sassoulas2021-09-161-1/+1
|
* Add ``Consider-using-f-string`` checker (#4796)Daniël van Noord2021-08-301-4/+4
| | | | | | | | | | | | | | | | * Add ``consider-using-f-string`` checker This adds a checker for normal strings which are formatted with ``.format()`` or '%'. The message is a convention to nudge users towards using f-strings. This closes #3592 * Update pylint code to use f-strings After adding `consider-using-f-strings` the codebase showed numerous cases of formatting which could be f-strings. This commit changes most of these to become f-strings, or adds ignores. * Apply suggestions from code review Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com>
* Bump pylint to 2.10.0, update changelogv2.10.0Pierre Sassoulas2021-08-201-0/+1
|
* Use alias for astroid.nodes 04 (#4869)Marc Mueller2021-08-191-9/+10
| | | | | | | | | * Use alias for astroid nodes 04 * Resolve name conflicts * Apply suggestions from code review Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com>
* pyreverse - Handle a regression with typehints of type astroid.Subscript (#4859)Mark Byrne2021-08-181-0/+2
| | | | | | | | | | | | | | | | | * pyreverse - Handle a regression with typehints of type astroid.Subscript Closes #4845 * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * pyreverse - Handle a regression with typehints of type astroid.Subscript - Add test-case to pyreverse data files Closes #4845 Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* Create common ``Printer`` base class for ``pyreverse`` and improve typing. ↵Andreas Finkler2021-08-031-0/+14
| | | | | | | (#4731) * Create common ``Printer`` base class for Pyreverse, and improve typing. * Use ``abc.ABC`` as metaclass for ``Printer`` instead of raising ``NotImplementedError`` * Rename ``vcgutils.py`` to ``vcg_printer.py``
* Handle has-a relationships for type-hinted arguments in class diagrams (#4745)Mark Byrne2021-07-301-3/+3
| | | | | | | * Pyreverse - Show class has-a relationships inferred from type-hints Closes #4744 Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com>
* Add unspecified-encoding checker #3826 (#4753)Daniël van Noord2021-07-281-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | * 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.3, update changelogv2.9.3Pierre Sassoulas2021-07-011-0/+1
|
* Fix copyright links (#4647)Marc Mueller2021-07-011-1/+1
| | | | * Fix link in license header * Update link to astroid bump_changelog
* Bump pylint to 2.9.0, update changelog, add python 3.10 to package metav2.9.0Pierre Sassoulas2021-06-291-0/+1
|
* Add type annotations to pyreverse (#4551)Mark Byrne2021-06-261-0/+60
| | | | | | | | | | | | | | | | | * Add type annotations to pyreverse dot files Closes #1548 - Indicate the attribute is optional in the dot files by inspecting the default value. - Handle the Subscript type annotations - Refactor & move the logic to obtain annotations to utils.py as re-usable functions - Add unittests for the added functions - Add a try/except to deal with a possible InferenceError when using NodeNG.infer method - Create a function in utils and so remove repeated logic in inspector.py - Add unittests to check the InferenceError logic - Adjust the types in function input
* Bump pylint to 2.9.0-dev1, update changelogPierre Sassoulas2021-06-171-0/+1
|
* Consider using with no assign (#4476)DudeNr332021-05-171-1/+2
| | | | * Emit ``consider-using-with`` also if calls like ``open()`` are used without an assignment
* Rename copying to license and upgrade the setup.cfg (#4338)Pierre Sassoulas2021-04-111-1/+1
|
* Apply copyrite --contribution-thresholdPierre Sassoulas2021-02-211-1/+3
|
* Fix E266 too many leading '#' for block commentPierre Sassoulas2021-02-151-9/+2
|
* Bug: fix vulnerable regexes to avoid potential ReDoS.yeting li2020-09-101-3/+2
| | | | Fix issue #3811
* Update formatting following black and isort updatePierre Sassoulas2020-09-101-8/+4
|
* Sets up copyrighthippo912020-08-201-1/+1
|
* Add missing copyright annotations for the past releasesClaudiu Popa2020-04-271-1/+4
|
* pyupgrade: automated removal of python2 constructsAnthony Sottile2020-03-241-1/+1
| | | | | | | | | | | | | 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/) ```
* Allow non-ASCII characters in identifiers in the invalid-name rule and add ↵bernie gray2020-03-111-5/+5
| | | | | | | non-ascii-name check Non-ASCII characters are now allowed by ``invalid-name`` check. Also this commit adds a new check ``non-ascii-name``, which is used to detect identifiers with non-ASCII characters.
* Remove redundant compatibility code (#3097)Hugo van Kemenade2019-09-121-2/+0
| | | | We no longer support Python 2 so we can remove the compatibility code we had in place for that version.
* Fix a bunch of linting errors from the codebaseClaudiu Popa2019-05-221-2/+3
|
* Reformat the code with blackClaudiu Popa2018-09-171-31/+45
|
* Update copyright noticesClaudiu Popa2018-07-151-1/+2
|
* fix lint issue w.r.t useless-object-inheritance.ssolanki2018-06-201-2/+2
|
* Regenerate copyright noticesClaudiu Popa2017-12-151-0/+4
|