summaryrefslogtreecommitdiff
path: root/tests/pyreverse
Commit message (Collapse)AuthorAgeFilesLines
* Modify sources along with results of pr review.Takahide Nojima2021-10-2613-15/+43
| | | | | | | - move "tests/prop_data/*" to "tests/data/." - make tests/data/property_pattern.py correctly executable. - remove class members not related to "property" from test/data/property_pattern.py. - modify tests of pyreverse to pass all tests.
* Fix exception of pyreverse in handling property function within a class.Takahide Nojima2021-10-261-0/+27
|
* pyreverse - Add project modules to sys.path (#4856)Mark Byrne2021-10-173-17/+48
| | | | | | | | | | | | | | | * pyreverse - Add project modules to sys.path - Use the fix_import_path context manager in the existing pyreverse tests - Style refactor: - Use a constant for the path - Move the constants closer to the top of the module - Add a test for the fix_import_path context manager to ensure the project root directory is in sys.path - Prevent re-defining from outer scope - Add a type-hint & docstrings Closes #2479
* Spelling and grammar fixesVille Skyttä2021-09-171-1/+1
|
* Bump pylint to 2.11.0, update changelogv2.11.0Pierre Sassoulas2021-09-165-0/+5
|
* Move PyreverseConfig to pylint.testutil (#5013)Pierre Sassoulas2021-09-153-47/+4
| | | See : https://github.com/PyCQA/pylint/pull/5010#issuecomment-920291278
* Fix PyreverseConfig imports in pyreverse's testsPierre Sassoulas2021-09-152-2/+2
|
* Pylint reporter cleanup (#5003)Pierre Sassoulas2021-09-141-1/+1
| | | | | | | | | | * Create a file for pylint.reporters.BaseWritter * Calculate visitor name only once in Reporter nodes Remove dead code that was always failing and replace it by an attribute directly. Co-authored-by: Marc Mueller <30130371+cdce8p@users.noreply.github.com>
* Add typing with `PyAnnotate` to `./tests` (#4950)Daniël van Noord2021-09-046-52/+83
| | | | | | * Add mypy_extensions to requirement for ``NoReturn`` Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com>
* Refactor various typing related issues (#4940)Daniël van Noord2021-09-031-2/+2
| | | | | | | | | | | | | | | * 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>
* Add ``Consider-using-f-string`` checker (#4796)Daniël van Noord2021-08-301-1/+1
| | | | | | | | | | | | | | | | * 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.2-dev0, update changelogAshley Whetter2021-08-201-0/+1
|
* Bump pylint to 2.10.1, update changelogv2.10.1Ashley Whetter2021-08-201-0/+1
|
* Bump pylint to 2.10.0, update changelogv2.10.0Pierre Sassoulas2021-08-204-3/+8
|
* Use alias for astroid.nodes 04 (#4869)Marc Mueller2021-08-193-11/+13
| | | | | | | | | * 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-186-3/+25
| | | | | | | | | | | | | | | | | * 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>
* ``pyreverse``: Add option for colored output (#4850)Andreas Finkler2021-08-158-22/+150
| | | | | | | * Add option to produce colored output from ``pyreverse`` * Use indentation in PlantUML diagrams Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com>
* ``pyreverse``: add PlantUML output (#4846)Andreas Finkler2021-08-149-22/+146
| | | | | | | | | | | | | | | | | | | | | | | * Extract helper method to get annotated arguments into ``Printer`` base class. * Add ``Printer`` subclass for PlantUML output * Add functional test for ``PlantUmlPrinter`` * Add tests for specific layout for ``PlantUmlPrinter`` * Extract test helper function to remove code duplication * Add new test class to check type annotations * Cleanup generated .puml files after tests finished * Create a factory function to get the correct ``Printer`` class for a given filetype. * Fix unittest after adding a new class to the test data. * Add changelog and whatsnew entry * Add "plantuml" as possible extension for PlantUML output
* Convert ``get_project`` to a fixture instead of implementing it under ↵DudeNr332021-08-094-18/+31
| | | | ``pylint.testutils.pyreverse``.
* Update license link to point to main, not masterDudeNr332021-08-091-1/+1
|
* Use custom class, as ``dataclasses`` was only introduced in Python 3.7.DudeNr332021-08-091-17/+33
| | | | NamedTuple is not possible as some tests modify the instance attributes.
* Use ``default_factory`` for mutable attribute.DudeNr332021-08-091-3/+3
|
* Add tests for ``Printer`` classes which are not covered yet implicitly ↵DudeNr332021-08-091-0/+32
| | | | through ``test_writer``
* Extract commonly used test helpers into ``conftest.py`` and a testutils ↵DudeNr332021-08-094-27/+54
| | | | component.
* Extract tests for ``pylint.pyreverse.utils`` into own test module.DudeNr332021-08-092-108/+119
|
* Rename test files to follow the same conventions as other test modulesDudeNr332021-08-093-2/+2
|
* Move tests for ``pyreverse`` into a own subdirectory.DudeNr332021-08-097-0/+678